]> 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:24 +0000 (13:10 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 11 Apr 2018 17:10:24 +0000 (13:10 -0400)
CHANGES.md
cups/auth.c

index 03517e0336dd445b70c7f81f9f17cb61143fd7d4..8fb9d6cfddea26748935fb9e4aaf7b76e5e1a4a9 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES - 2.3rc1 - 2018-04-09
+CHANGES - 2.3rc1 - 2018-04-11
 =============================
 
 Changes in CUPS v2.3rc1
@@ -10,6 +10,7 @@ Changes in CUPS v2.3rc1
   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.3b4
index f545b2331d7c623c986b6bfa678fcf5daeaa5de9..ab2ce996a00c436614b1fa00a39de4c0b412c2c1 100644 (file)
@@ -212,7 +212,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);
@@ -795,7 +795,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;