aboutsummaryrefslogtreecommitdiff
path: root/lib/http_digest.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-09-25 14:09:22 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-09-25 14:09:22 +0000
commit1b9d311b5ce7709a41558b3973c407ffef4a9848 (patch)
tree11fd343b8a44e50112304bd9117604a4620558a5 /lib/http_digest.c
parent4d437416daee0f626988b8c056ae9cd22486c655 (diff)
- Fixed the HTTP Digest auth code to not behave badly when getting a blank realm
with realm="". http://curl.haxx.se/bug/view.cgi?id=2126435
Diffstat (limited to 'lib/http_digest.c')
-rw-r--r--lib/http_digest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/http_digest.c b/lib/http_digest.c
index 81e8612a7..0d92652a0 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -104,6 +104,12 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
include the possibly trailing comma, newline or carriage return */
(2 == sscanf(header, "%255[^=]=%1023[^\r\n,]",
value, content)) ) {
+ if(!strcmp("\"\"", content)) {
+ /* for the name="" case where we get only the "" in the content variable,
+ * simply clear the content then
+ */
+ content[0]=0;
+ }
if(strequal(value, "nonce")) {
d->nonce = strdup(content);
if(!d->nonce)