commit 0a32df2: [Fix] Another corner case in url parsing

Vsevolod Stakhov vsevolod at rspamd.com
Tue Oct 25 10:14:05 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-10-25 07:14:42 +0100
URL: https://github.com/rspamd/rspamd/commit/0a32df228b6b4dedff93610bea639471a23edb89

[Fix] Another corner case in url parsing

---
 src/libserver/url.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libserver/url.c b/src/libserver/url.c
index 7be9d020a..04069a853 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -2894,7 +2894,9 @@ url_web_end (struct url_callback_data *cb,
 	if (last < cb->end && (*last == '>' && last != match->newline_pos)) {
 		/* We need to ensure that url also starts with '>' */
 		if (match->st != '<') {
-			return FALSE;
+			if (last + 1 < cb->end && g_ascii_isspace(last[1])) {
+				return FALSE;
+			}
 		}
 	}
 


More information about the Commits mailing list