]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fix shift
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 18 Sep 2020 14:44:27 +0000 (15:44 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 18 Sep 2020 14:44:27 +0000 (15:44 +0100)
src/libserver/url.c

index 379be6293d50ef3815869758dc1449b4becf5289..73daf043a948e7891245c9ff14ff07ef13717e3d 100644 (file)
@@ -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;