Fossil SCM
Use db_get_boolean() instead of db_get_int() for the localauth setting, since localauth is a boolean value.
Commit
00638d9a838324db83c2d3a98f077aaa00459842ac07f8a2db593c9605fd9d3c
Parent
2765f04694d36e6…
2 files changed
+1
-1
+1
-1
+1
-1
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -1416,11 +1416,11 @@ | ||
| 1416 | 1416 | */ |
| 1417 | 1417 | zIpAddr = PD("REMOTE_ADDR","nil"); |
| 1418 | 1418 | if( ( cgi_is_loopback(zIpAddr) |
| 1419 | 1419 | || (g.fSshClient & CGI_SSH_CLIENT)!=0 ) |
| 1420 | 1420 | && g.useLocalauth |
| 1421 | - && db_get_int("localauth",0)==0 | |
| 1421 | + && db_get_boolean("localauth",0)==0 | |
| 1422 | 1422 | && P("HTTPS")==0 |
| 1423 | 1423 | ){ |
| 1424 | 1424 | char *zSeed; |
| 1425 | 1425 | if( g.localOpen ) zLogin = db_lget("default-user",0); |
| 1426 | 1426 | if( zLogin!=0 ){ |
| 1427 | 1427 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1416,11 +1416,11 @@ | |
| 1416 | */ |
| 1417 | zIpAddr = PD("REMOTE_ADDR","nil"); |
| 1418 | if( ( cgi_is_loopback(zIpAddr) |
| 1419 | || (g.fSshClient & CGI_SSH_CLIENT)!=0 ) |
| 1420 | && g.useLocalauth |
| 1421 | && db_get_int("localauth",0)==0 |
| 1422 | && P("HTTPS")==0 |
| 1423 | ){ |
| 1424 | char *zSeed; |
| 1425 | if( g.localOpen ) zLogin = db_lget("default-user",0); |
| 1426 | if( zLogin!=0 ){ |
| 1427 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1416,11 +1416,11 @@ | |
| 1416 | */ |
| 1417 | zIpAddr = PD("REMOTE_ADDR","nil"); |
| 1418 | if( ( cgi_is_loopback(zIpAddr) |
| 1419 | || (g.fSshClient & CGI_SSH_CLIENT)!=0 ) |
| 1420 | && g.useLocalauth |
| 1421 | && db_get_boolean("localauth",0)==0 |
| 1422 | && P("HTTPS")==0 |
| 1423 | ){ |
| 1424 | char *zSeed; |
| 1425 | if( g.localOpen ) zLogin = db_lget("default-user",0); |
| 1426 | if( zLogin!=0 ){ |
| 1427 |
+1
-1
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1123,11 +1123,11 @@ | ||
| 1123 | 1123 | ** Return a string that contains supplemental information about a |
| 1124 | 1124 | ** "not authorized" error. The string might be empty if no additional |
| 1125 | 1125 | ** information is available. |
| 1126 | 1126 | */ |
| 1127 | 1127 | static char *whyNotAuth(void){ |
| 1128 | - if( g.useLocalauth && db_get_int("localauth",0)!=0 ){ | |
| 1128 | + if( g.useLocalauth && db_get_boolean("localauth",0)!=0 ){ | |
| 1129 | 1129 | return "\\sbecause\\sthe\\s'localauth'\\ssetting\\sis\\senabled"; |
| 1130 | 1130 | } |
| 1131 | 1131 | return ""; |
| 1132 | 1132 | } |
| 1133 | 1133 | |
| 1134 | 1134 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1123,11 +1123,11 @@ | |
| 1123 | ** Return a string that contains supplemental information about a |
| 1124 | ** "not authorized" error. The string might be empty if no additional |
| 1125 | ** information is available. |
| 1126 | */ |
| 1127 | static char *whyNotAuth(void){ |
| 1128 | if( g.useLocalauth && db_get_int("localauth",0)!=0 ){ |
| 1129 | return "\\sbecause\\sthe\\s'localauth'\\ssetting\\sis\\senabled"; |
| 1130 | } |
| 1131 | return ""; |
| 1132 | } |
| 1133 | |
| 1134 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1123,11 +1123,11 @@ | |
| 1123 | ** Return a string that contains supplemental information about a |
| 1124 | ** "not authorized" error. The string might be empty if no additional |
| 1125 | ** information is available. |
| 1126 | */ |
| 1127 | static char *whyNotAuth(void){ |
| 1128 | if( g.useLocalauth && db_get_boolean("localauth",0)!=0 ){ |
| 1129 | return "\\sbecause\\sthe\\s'localauth'\\ssetting\\sis\\senabled"; |
| 1130 | } |
| 1131 | return ""; |
| 1132 | } |
| 1133 | |
| 1134 |