aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-18 15:44:27 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-18 15:44:27 +0100
commitd3b8d3ea5a0f20e83ca3b64bbe896a1bdaadcd95 (patch)
tree4326a37a85768b979ddf2ddc595264338bb23145
parentdb1bb1e0e405f1d319c5360bf9896c03f0257907 (diff)
downloadrspamd-d3b8d3ea5a0f20e83ca3b64bbe896a1bdaadcd95.tar.gz
rspamd-d3b8d3ea5a0f20e83ca3b64bbe896a1bdaadcd95.zip
[Minor] Fix shift
-rw-r--r--src/libserver/url.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c
index 379be6293..73daf043a 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -2292,11 +2292,12 @@ rspamd_url_parse (struct rspamd_url *uri,
uri->flags |= RSPAMD_URL_FLAG_UNNORMALISED;
}
+ rspamd_url_shift (uri, unquoted_len, UF_HOST);
+
if (rspamd_url_remove_dots (uri)) {
uri->flags |= RSPAMD_URL_FLAG_OBSCURED;
}
-
if (uri->protocol & (PROTOCOL_HTTP|PROTOCOL_HTTPS|PROTOCOL_MAILTO|PROTOCOL_FTP|PROTOCOL_FILE)) {
/* Ensure that hostname starts with something sane (exclude numeric urls) */
const gchar* host = rspamd_url_host_unsafe (uri);
@@ -2306,8 +2307,6 @@ rspamd_url_parse (struct rspamd_url *uri,
}
}
- rspamd_url_shift (uri, unquoted_len, UF_HOST);
-
/* Apply nameprep algorithm */
static UStringPrepProfile *nameprep = NULL;
UErrorCode uc_err = U_ZERO_ERROR;