From: Joe Orton Date: Fri, 17 Jul 2026 13:58:04 +0000 (+0000) Subject: Use apr_isspace() instead of isspace() in cookie parsing X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f01170bf5b310a07f5cd65ab200f121d8fd933b;p=thirdparty%2Fapache%2Fhttpd.git Use apr_isspace() instead of isspace() in cookie parsing * modules/proxy/mod_proxy_balancer.c (find_session_route): Replace isspace() with apr_isspace() to avoid locale-dependent behavior and undefined behavior with negative char values. Submitted by: arshsmith1 GitHub: closes #675 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1936266 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index bac659614e..892bde38ae 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -171,10 +171,10 @@ static char *get_cookie_param(request_rec *r, const char *name) if (start_cookie == cookies || start_cookie[-1] == ';' || start_cookie[-1] == ',' || - isspace(start_cookie[-1])) { + apr_isspace(start_cookie[-1])) { start_cookie += strlen(name); - while(*start_cookie && isspace(*start_cookie)) + while(*start_cookie && apr_isspace(*start_cookie)) ++start_cookie; if (*start_cookie++ == '=' && *start_cookie) { /*