Browse Source

[Minor] Normalize paths in URLs detected by Rspamd

tags/1.5.0
Vsevolod Stakhov 7 years ago
parent
commit
46f219c1ad
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/libserver/url.c

+ 3
- 0
src/libserver/url.c View File

@@ -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,

Loading…
Cancel
Save