]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth: auth_proxy_parse_redirect() - Return failure if host is empty
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 5 May 2022 17:30:28 +0000 (20:30 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 17 May 2022 10:34:24 +0000 (10:34 +0000)
src/lib-auth/auth-proxy.c

index a06e68dbd8ccc217bdb9298a5b138d37897bbbfd..751b48018af24dc41aeab3e749e59bd55c59dd75 100644 (file)
@@ -91,5 +91,7 @@ bool auth_proxy_parse_redirect(const char *target, const char **destuser_r,
        }
        if (net_str2hostport(target, 0, host_r, port_r) < 0)
                return FALSE;
+       if ((*host_r)[0] == '\0')
+               return FALSE;
        return TRUE;
 }