Fossil SCM

Do not save the password for syncing operations if the user denied the save password prompt or if the FOSSIL_SECURITY_LEVEL environment variable is ≥1.

florian 2023-04-10 08:46 trunk
Commit 2916ec970b2dfbefaa893650b4bb7e09c9cc29973aa38129abfec1ff39693ce5
1 file changed +1 -1
+1 -1
--- src/http.c
+++ src/http.c
@@ -108,11 +108,11 @@
108108
zProjectCode = db_get("parent-project-code", 0);
109109
}else{
110110
zProjectCode = db_get("project-code", 0);
111111
}
112112
zPw = sha1_shared_secret(zPw, zLogin, zProjectCode);
113
- if( g.url.pwConfig!=0 ){
113
+ if( g.url.pwConfig!=0 && (g.url.flags & URL_REMEMBER_PW)!=0 ){
114114
char *x = obscure(zPw);
115115
db_set(g.url.pwConfig/*works-like:"x"*/, x, 0);
116116
fossil_free(x);
117117
}
118118
fossil_free(g.url.passwd);
119119
--- src/http.c
+++ src/http.c
@@ -108,11 +108,11 @@
108 zProjectCode = db_get("parent-project-code", 0);
109 }else{
110 zProjectCode = db_get("project-code", 0);
111 }
112 zPw = sha1_shared_secret(zPw, zLogin, zProjectCode);
113 if( g.url.pwConfig!=0 ){
114 char *x = obscure(zPw);
115 db_set(g.url.pwConfig/*works-like:"x"*/, x, 0);
116 fossil_free(x);
117 }
118 fossil_free(g.url.passwd);
119
--- src/http.c
+++ src/http.c
@@ -108,11 +108,11 @@
108 zProjectCode = db_get("parent-project-code", 0);
109 }else{
110 zProjectCode = db_get("project-code", 0);
111 }
112 zPw = sha1_shared_secret(zPw, zLogin, zProjectCode);
113 if( g.url.pwConfig!=0 && (g.url.flags & URL_REMEMBER_PW)!=0 ){
114 char *x = obscure(zPw);
115 db_set(g.url.pwConfig/*works-like:"x"*/, x, 0);
116 fossil_free(x);
117 }
118 fossil_free(g.url.passwd);
119

Keyboard Shortcuts

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