Fossil SCM

The additional db_unprotect() work of check-in [b9fa7e28712c5981] was incomplete. Here is an attempt to finish the job.

drh 2020-09-07 14:08 trunk
Commit 50f61b7ad1b651870c7a8a731693f26fba4fe511ba30dde398b5c38fb9868498
1 file changed +2 -2
--- src/security_audit.c
+++ src/security_audit.c
@@ -604,18 +604,18 @@
604604
if( P("cancel") ){
605605
/* User pressed the cancel button. Go back */
606606
cgi_redirect("secaudit0");
607607
}
608608
if( P("apply") ){
609
- db_unprotect(PROTECT_USER|PROTECT_CONFIG);
609
+ db_unprotect(PROTECT_ALL);
610610
db_multi_exec(
611611
"UPDATE user SET cap=''"
612612
" WHERE login IN ('nobody','anonymous');"
613613
"DELETE FROM config WHERE name='public-pages';"
614614
);
615
- db_protect_pop();
616615
db_set("self-register","0",0);
616
+ db_protect_pop();
617617
cgi_redirect("secaudit0");
618618
}
619619
style_header("Make This Website Private");
620620
@ <p>Click the "Make It Private" button below to disable all
621621
@ anonymous access to this repository. A valid login and password
622622
--- src/security_audit.c
+++ src/security_audit.c
@@ -604,18 +604,18 @@
604 if( P("cancel") ){
605 /* User pressed the cancel button. Go back */
606 cgi_redirect("secaudit0");
607 }
608 if( P("apply") ){
609 db_unprotect(PROTECT_USER|PROTECT_CONFIG);
610 db_multi_exec(
611 "UPDATE user SET cap=''"
612 " WHERE login IN ('nobody','anonymous');"
613 "DELETE FROM config WHERE name='public-pages';"
614 );
615 db_protect_pop();
616 db_set("self-register","0",0);
 
617 cgi_redirect("secaudit0");
618 }
619 style_header("Make This Website Private");
620 @ <p>Click the "Make It Private" button below to disable all
621 @ anonymous access to this repository. A valid login and password
622
--- src/security_audit.c
+++ src/security_audit.c
@@ -604,18 +604,18 @@
604 if( P("cancel") ){
605 /* User pressed the cancel button. Go back */
606 cgi_redirect("secaudit0");
607 }
608 if( P("apply") ){
609 db_unprotect(PROTECT_ALL);
610 db_multi_exec(
611 "UPDATE user SET cap=''"
612 " WHERE login IN ('nobody','anonymous');"
613 "DELETE FROM config WHERE name='public-pages';"
614 );
 
615 db_set("self-register","0",0);
616 db_protect_pop();
617 cgi_redirect("secaudit0");
618 }
619 style_header("Make This Website Private");
620 @ <p>Click the "Make It Private" button below to disable all
621 @ anonymous access to this repository. A valid login and password
622

Keyboard Shortcuts

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