Fossil SCM

Use db_get_boolean() instead of db_get_int() for the localauth setting, since localauth is a boolean value.

drh 2025-04-18 15:32 trunk
Commit 00638d9a838324db83c2d3a98f077aaa00459842ac07f8a2db593c9605fd9d3c
2 files changed +1 -1 +1 -1
+1 -1
--- src/login.c
+++ src/login.c
@@ -1416,11 +1416,11 @@
14161416
*/
14171417
zIpAddr = PD("REMOTE_ADDR","nil");
14181418
if( ( cgi_is_loopback(zIpAddr)
14191419
|| (g.fSshClient & CGI_SSH_CLIENT)!=0 )
14201420
&& g.useLocalauth
1421
- && db_get_int("localauth",0)==0
1421
+ && db_get_boolean("localauth",0)==0
14221422
&& P("HTTPS")==0
14231423
){
14241424
char *zSeed;
14251425
if( g.localOpen ) zLogin = db_lget("default-user",0);
14261426
if( zLogin!=0 ){
14271427
--- 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 @@
11231123
** Return a string that contains supplemental information about a
11241124
** "not authorized" error. The string might be empty if no additional
11251125
** information is available.
11261126
*/
11271127
static char *whyNotAuth(void){
1128
- if( g.useLocalauth && db_get_int("localauth",0)!=0 ){
1128
+ if( g.useLocalauth && db_get_boolean("localauth",0)!=0 ){
11291129
return "\\sbecause\\sthe\\s'localauth'\\ssetting\\sis\\senabled";
11301130
}
11311131
return "";
11321132
}
11331133
11341134
--- 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

Keyboard Shortcuts

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