Check-in [bfe6e64f94]
Not logged in
Overview

SHA1 Hash:bfe6e64f94a6407a3f4270c5f97ec0f4a7ba58d2
Date: 2007-07-30 18:38:43
User: drh
Comment:Fix a bug in the /xfer login logic.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/http.c from [93a1f90e4d] to [2375258986].

@@ -175,13 +175,16 @@
         char *zPrompt = mprintf("password for %s: ", g.urlUser);
         Blob x;
         prompt_for_password(zPrompt, &x, 0);
         free(zPrompt);
         g.urlPasswd = blob_str(&x);
-        blob_append(&pw, g.urlPasswd, -1);
+      }else{
+        g.urlPasswd = "";
       }
     }
+    blob_append(&pw, g.urlPasswd, -1);
+    /* printf("presig=[%s]\n", blob_str(&pw)); */
     sha1sum_blob(&pw, &sig);
     blob_appendf(&login, "login %s %b %b\n", g.urlUser, &nonce, &sig);
   }
   blob_reset(&nonce);
   blob_reset(&pw);

Modified src/xfer.c from [5c87619787] to [6321404911].

@@ -230,10 +230,11 @@
     blob_zero(&pw);
     db_ephemeral_blob(&q, 0, &pw);
     blob_zero(&combined);
     blob_copy(&combined, pNonce);
     blob_append(&combined, blob_buffer(&pw), blob_size(&pw));
+    /* CGIDEBUG(("presig=[%s]\n", blob_str(&combined))); */
     sha1sum_blob(&combined, &hash);
     rc = blob_compare(&hash, pSig);
     blob_reset(&hash);
     blob_reset(&combined);
     if( rc==0 ){