]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Don't strip '@domain' portion of username if StripUserDomain isn't enabled (Issue...
authorMichael R Sweet <msweet@msweet.org>
Fri, 22 May 2026 20:14:33 +0000 (16:14 -0400)
committerMichael R Sweet <msweet@msweet.org>
Fri, 22 May 2026 20:14:33 +0000 (16:14 -0400)
scheduler/ipp.c

index 8426da2d0b9392b3cb4da48871e9872bab1b9339..f1e7f45377dfc88fba4f7bc1648f7bb4e2933e8e 100644 (file)
@@ -3612,7 +3612,7 @@ check_quotas(cupsd_client_t  *con,        /* I - Client connection */
 
   cupsCopyString(username, get_username(con), sizeof(username));
 
-  if ((name = strchr(username, '@')) != NULL)
+  if (StripUserDomain && (name = strchr(username, '@')) != NULL)
     *name = '\0';                      /* Strip @REALM */
 
  /*
@@ -11326,7 +11326,7 @@ user_allowed(cupsd_printer_t *p,        /* I - Printer or class */
   if (!strcmp(username, "root"))
     return (1);
 
-  if (strchr(username, '@'))
+  if (StripUserDomain && strchr(username, '@'))
   {
    /*
     * Strip @REALM for username check...