Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fix a bug in the /xfer login logic. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
bfe6e64f94a6407a3f4270c5f97ec0f4 |
| User & Date: | drh 2007-07-30 18:38:43.000 |
Context
|
2007-07-30
| ||
| 18:57 | Send the HOST header parameter with /xfer requests. check-in: 211c476d23 user: drh tags: trunk | |
| 18:38 | Fix a bug in the /xfer login logic. check-in: bfe6e64f94 user: drh tags: trunk | |
| 17:43 | Fix a bug in login. check-in: 947842fb0b user: drh tags: trunk | |
Changes
Changes to src/http.c.
| ︙ | ︙ | |||
173 174 175 176 177 178 179 |
if( g.urlPasswd==0 ){
if( strcmp(g.urlUser,"anonymous")!=0 ){
char *zPrompt = mprintf("password for %s: ", g.urlUser);
Blob x;
prompt_for_password(zPrompt, &x, 0);
free(zPrompt);
g.urlPasswd = blob_str(&x);
| > | > > | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
if( g.urlPasswd==0 ){
if( strcmp(g.urlUser,"anonymous")!=0 ){
char *zPrompt = mprintf("password for %s: ", g.urlUser);
Blob x;
prompt_for_password(zPrompt, &x, 0);
free(zPrompt);
g.urlPasswd = blob_str(&x);
}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);
blob_reset(&sig);
if( g.fHttpTrace ){
|
| ︙ | ︙ |
Changes to src/xfer.c.
| ︙ | ︙ | |||
228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
if( db_step(&q)==SQLITE_ROW ){
Blob pw, combined, hash;
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));
sha1sum_blob(&combined, &hash);
rc = blob_compare(&hash, pSig);
blob_reset(&hash);
blob_reset(&combined);
if( rc==0 ){
const char *zCap;
zCap = db_column_text(&q, 1);
| > | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
if( db_step(&q)==SQLITE_ROW ){
Blob pw, combined, hash;
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 ){
const char *zCap;
zCap = db_column_text(&q, 1);
|
| ︙ | ︙ |