From: Michael R Sweet Date: Wed, 14 May 2025 16:22:44 +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=f0c25a56e8f8be9d6e572f8f45f8933428f7c6bb;p=thirdparty%2Fcups.git Sanitize requesting-user-name as needed (Issue #1145) --- diff --git a/backend/ipp.c b/backend/ipp.c index 6fff9bde20..c0c93956c3 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -1552,6 +1552,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))