From: Michael R Sweet Date: Wed, 14 May 2025 16:19:43 +0000 (-0400) Subject: Sanitize requesting-user-name as needed (Issue #1145) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ccd0de370dbec0c6cf502ddf79b87db01d36b66;p=thirdparty%2Fcups.git Sanitize requesting-user-name as needed (Issue #1145) --- diff --git a/backend/ipp.c b/backend/ipp.c index f99f103612..e9bbeb2ca1 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -1528,6 +1528,8 @@ main(int argc, /* I - Number of command-line args */ char *argptr = argv[2], /* Pointer into local username */ *userptr = username; /* Pointer into requesting-user-name value */ + fputs("DEBUG: Trying sanitized requesting-user-name value.\n", stderr); + while (*argptr && userptr < (username + sizeof(username) - 1)) { if (isalnum(*argptr & 255))