]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The IPP backend did not work with some configurations of Windows (STR #4503)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 21 Oct 2014 13:52:24 +0000 (13:52 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 21 Oct 2014 13:52:24 +0000 (13:52 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12229 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.0.txt
cups/auth.c
cups/http.c

index 38fc1b31614f93e9957b7422965cf128ecd6acf7..714130d9b5abce01d91b7b8b00a5a7b6f15bc54e 100644 (file)
@@ -18,6 +18,8 @@ CHANGES IN CUPS V2.0.1
          configured Group and SystemGroup values (STR #4495)
        - The network backends no longer report waste-receptacle conditions when
          using SNMP (STR #4499)
+       - The IPP backend did not work with some configurations of Windows
+         (STR #4503)
        - RPMs did not build (STR #4490)
 
 
index f61def522dbf68035bae33f38148a2d84b66de97..1593953d0d86f4323621996b674ef0e5739fceb2 100644 (file)
@@ -761,7 +761,7 @@ cups_local_auth(http_t *http)               /* I - HTTP connection to server */
 
   if (
 #    ifdef HAVE_GSSAPI
-      strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9) &&
+      _cups_strncasecmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9) &&
 #    endif /* HAVE_GSSAPI */
 #    ifdef HAVE_AUTHORIZATION_H
       !httpGetSubField2(http, HTTP_FIELD_WWW_AUTHENTICATE, "authkey",
@@ -808,7 +808,7 @@ cups_local_auth(http_t *http)               /* I - HTTP connection to server */
                   filename, strerror(errno)));
 
 #  ifdef HAVE_GSSAPI
-    if (!strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9))
+    if (!_cups_strncasecmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9))
     {
      /*
       * Kerberos required, don't try the root certificate...
index dfcd759ac86267e7738ded23d4418b236bf7a585..493044fedd650f42b32149172abb0404b09a431b 100644 (file)
@@ -2702,6 +2702,19 @@ httpSetField(http_t       *http, /* I - HTTP connection */
         http->server = _cupsStrAlloc(value);
         break;
 
+    case HTTP_FIELD_WWW_AUTHENTICATE :
+       /* CUPS STR #4503 - don't override WWW-Authenticate for unknown auth schemes */
+        if (http->fields[HTTP_FIELD_WWW_AUTHENTICATE][0] &&
+           _cups_strncasecmp(value, "Basic ", 6) &&
+           _cups_strncasecmp(value, "Digest ", 7) &&
+           _cups_strncasecmp(value, "Negotiate ", 10))
+       {
+         DEBUG_printf(("1httpSetField: Ignoring unknown auth scheme in \"%s\".", value));
+          return;
+       }
+
+       /* Fall through to copy */
+
     default :
        strlcpy(http->fields[field], value, HTTP_MAX_VALUE);
        break;