From: Vsevolod Stakhov Date: Mon, 13 Jan 2020 13:58:42 +0000 (+0000) Subject: [Fix] Fix urls encode function X-Git-Tag: 2.3~116 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1f10961d98ce1b0f8b3bcb1f4431eacbe5a01b5a;p=rspamd.git [Fix] Fix urls encode function --- 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); }