From 1f10961d98ce1b0f8b3bcb1f4431eacbe5a01b5a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 13 Jan 2020 13:58:42 +0000 Subject: [PATCH] [Fix] Fix urls encode function --- src/libserver/url.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libserver/url.c b/src/libserver/url.c index cb9c214d2..d792177e8 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -3677,13 +3677,13 @@ rspamd_url_encode (struct rspamd_url *url, gsize *pdlen, } if (url->querylen > 0) { - *d++ = '/'; + *d++ = '?'; ENCODE_URL_COMPONENT ((guchar *)url->query, url->querylen, RSPAMD_URL_FLAGS_QUERYSAFE); } if (url->fragmentlen > 0) { - *d++ = '/'; + *d++ = '#'; ENCODE_URL_COMPONENT ((guchar *)url->fragment, url->fragmentlen, RSPAMD_URL_FLAGS_FRAGMENTSAFE); } -- 2.39.5