]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix a parsing bug in the new authentication code.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 11 Apr 2018 17:10:51 +0000 (13:10 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 11 Apr 2018 17:10:51 +0000 (13:10 -0400)
CHANGES.md
cups/auth.c

index b7ec2c1b33595472ddfa26c27acce27a908994bc..4c4fd2b8810bf0ad2fc409d80131ae25fa7f8da0 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES - 2.2.8 - 2018-04-10
+CHANGES - 2.2.8 - 2018-04-11
 ============================
 
 
@@ -15,6 +15,7 @@ Changes in CUPS v2.2.8
   the supplied HTTP connection (Issue #5288)
 - Fixed another crash in the scheduler when adding an IPP Everywhere printer
   (Issue #5290)
+- Fixed a parsing bug in the new authentication code.
 
 
 Changes in CUPS v2.2.7
index 4c38c9bb3a1511b0727248d4e1288ad4118dd8ef..5a13de008cf2848aff73dc1d1ae07f6edcba103b 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Authentication functions for CUPS.
  *
- * Copyright 2007-2016 by Apple Inc.
- * Copyright 1997-2007 by Easy Software Products.
+ * Copyright © 2007-2018 by Apple Inc.
+ * Copyright © 1997-2007 by Easy Software Products.
  *
  * This file contains Kerberos support code, copyright 2006 by
  * Jelmer Vernooij.
@@ -218,7 +218,7 @@ cupsDoAuthentication(
       if (!cg->lang_default)
        cg->lang_default = cupsLangDefault();
 
-      if (cups_auth_param(scheme, "username", default_username, sizeof(default_username)))
+      if (cups_auth_param(schemedata, "username", default_username, sizeof(default_username)))
        cupsSetUser(default_username);
 
       snprintf(prompt, sizeof(prompt), _cupsLangString(cg->lang_default, _("Password for %s on %s? ")), cupsUser(), http->hostname[0] == '/' ? "localhost" : http->hostname);
@@ -801,7 +801,7 @@ cups_auth_scheme(const char *www_authenticate,      /* I - Pointer into WWW-Authentic
     * Parse the scheme name or param="value" string...
     */
 
-    for (sptr = scheme, start = www_authenticate, param = 0; *www_authenticate && !isspace(*www_authenticate & 255); www_authenticate ++)
+    for (sptr = scheme, start = www_authenticate, param = 0; *www_authenticate && *www_authenticate != ',' && !isspace(*www_authenticate & 255); www_authenticate ++)
     {
       if (*www_authenticate == '=')
         param = 1;