Fossil SCM

It appears that calls to url_parse(0,x) are used to establish who the user is using user_select(). In this case we should not overwrite a password that has been provided prior to calling user_select() with one from the database.

andybradford 2013-11-02 06:17 UTC url-password-fixes
Commit a01c714c3ae01318e3eda1078b314ac527a5e224
1 file changed +3 -1
+3 -1
--- src/url.c
+++ src/url.c
@@ -76,11 +76,13 @@
7676
int bSetUrl = 1;
7777
7878
if( zUrl==0 ){
7979
zUrl = db_get("last-sync-url", 0);
8080
if( zUrl==0 ) return;
81
- g.urlPasswd = unobscure(db_get("last-sync-pw", 0));
81
+ if( g.urlPasswd==0 ){
82
+ g.urlPasswd = unobscure(db_get("last-sync-pw", 0));
83
+ }
8284
bSetUrl = 0;
8385
}
8486
8587
if( strncmp(zUrl, "http://", 7)==0
8688
|| strncmp(zUrl, "https://", 8)==0
8789
--- src/url.c
+++ src/url.c
@@ -76,11 +76,13 @@
76 int bSetUrl = 1;
77
78 if( zUrl==0 ){
79 zUrl = db_get("last-sync-url", 0);
80 if( zUrl==0 ) return;
81 g.urlPasswd = unobscure(db_get("last-sync-pw", 0));
 
 
82 bSetUrl = 0;
83 }
84
85 if( strncmp(zUrl, "http://", 7)==0
86 || strncmp(zUrl, "https://", 8)==0
87
--- src/url.c
+++ src/url.c
@@ -76,11 +76,13 @@
76 int bSetUrl = 1;
77
78 if( zUrl==0 ){
79 zUrl = db_get("last-sync-url", 0);
80 if( zUrl==0 ) return;
81 if( g.urlPasswd==0 ){
82 g.urlPasswd = unobscure(db_get("last-sync-pw", 0));
83 }
84 bSetUrl = 0;
85 }
86
87 if( strncmp(zUrl, "http://", 7)==0
88 || strncmp(zUrl, "https://", 8)==0
89

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button