diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-03-09 02:24:02 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-03-09 02:24:02 +0000 |
commit | 09517318b131b067b8859ea47caf83c60593c8e9 (patch) | |
tree | 714e49b8e9de064773eb63963dcfa9ad4c176a5d | |
parent | 451e295d099884f9a1cdac6face13fa5793fbf53 (diff) | |
download | php-git-09517318b131b067b8859ea47caf83c60593c8e9.tar.gz |
Fixed bug #27530 (broken http auth when safe_mode is on and PCRE is
disabled).
-rw-r--r-- | main/SAPI.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index 722c83e978..349a4f4fe6 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -657,14 +657,9 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC) #else { myuid = php_getuid(); - result = emalloc(sizeof("WWW-Authenticate: ")+20); - newlen = sprintf(result, "WWW-Authenticate: %ld", myuid); - newheader = estrndup(result,newlen); efree(header_line); - sapi_header.header = newheader; - sapi_header.header_len = newlen; - efree(result); - } + sapi_header.header_len = spprintf(&sapi_header.header, 0, "WWW-Authenticate: Basic realm=\"%ld\"", myuid); + } #endif } if (sapi_header.header==header_line) { |