]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
RFC 7230 forbids generation of userinfo subcomponent of https URL (#405)
authorAmos Jeffries <yadij@users.noreply.github.com>
Thu, 16 May 2019 15:22:54 +0000 (15:22 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 18 May 2019 15:24:03 +0000 (15:24 +0000)
src/anyp/Uri.cc

index c6d68369892d43b7d4c027f2d1bbfe7bc9dcf5cc..12b1aafd410f009387f0f7653e48d719a3f03835 100644 (file)
@@ -496,7 +496,7 @@ AnyP::Uri::absolute() const
         if (getScheme() != AnyP::PROTO_URN) {
             absolute_.append("//", 2);
             const bool omitUserInfo = getScheme() == AnyP::PROTO_HTTP ||
-                                      getScheme() != AnyP::PROTO_HTTPS ||
+                                      getScheme() == AnyP::PROTO_HTTPS ||
                                       userInfo().isEmpty();
             if (!omitUserInfo) {
                 absolute_.append(userInfo());