aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-08 18:57:41 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-08 18:59:56 +0000
commit46f219c1ad01fb4ea85f4bfedfbc718e1a46054d (patch)
tree406bfc8a423f84fa41dc355664ae314420c8cab0 /src
parentfbb1cb12a6e0e17a143593adf60483ad1e70fbca (diff)
downloadrspamd-46f219c1ad01fb4ea85f4bfedfbc718e1a46054d.tar.gz
rspamd-46f219c1ad01fb4ea85f4bfedfbc718e1a46054d.zip
[Minor] Normalize paths in URLs detected by Rspamd
Diffstat (limited to 'src')
-rw-r--r--src/libserver/url.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c
index 6bd42daea..7df4cb98a 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -1578,6 +1578,9 @@ rspamd_url_parse (struct rspamd_url *uri, gchar *uristring, gsize len,
if (uri->datalen) {
unquoted_len = rspamd_decode_url (uri->data, uri->data, uri->datalen);
rspamd_url_shift (uri, unquoted_len, UF_PATH);
+ /* We now normalize path */
+ rspamd_http_normalize_path_inplace (uri->data, uri->datalen, &unquoted_len);
+ rspamd_url_shift (uri, unquoted_len, UF_PATH);
}
if (uri->querylen) {
unquoted_len = rspamd_decode_url (uri->query,