From f0c25a56e8f8be9d6e572f8f45f8933428f7c6bb Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 14 May 2025 12:22:44 -0400 Subject: [PATCH] Sanitize requesting-user-name as needed (Issue #1145) --- backend/ipp.c | 2 ++ 1 file changed, 2 insertions(+) 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)) -- 2.47.2