]> granicus.if.org Git - php/commitdiff
Fixed bug #28670 (WWW-Authentication header mangling with PCRE in safe_mode
authorIlia Alshanetsky <iliaa@php.net>
Mon, 7 Jun 2004 13:51:50 +0000 (13:51 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 7 Jun 2004 13:51:50 +0000 (13:51 +0000)
adds extra spaces).

main/SAPI.c

index 7fa56b02bcdfc35242fe8ce5a1dff207e3691447..979b37d9c8b5ce8afe39adf058d63fd732f6b975 100644 (file)
@@ -606,6 +606,11 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
                                        char *ptr = colon_offset+1;
                                        int ptr_len=0, result_len = 0;
 
+                                       /* skip white space */
+                                       while (isspace(*ptr)) {
+                                               ptr++;
+                                       }
+
                                        myuid = php_getuid();
 
                                        ptr_len = strlen(ptr);