Fossil SCM

When a user correctly enters the captcha for /ityaar, do not change their login to anonymous if they are already logged in.

drh 2024-08-22 20:10 trunk
Commit 160126c043374d3771d77dcf0bc2f915fea32763d3d8624143b9613e5d5b775a
1 file changed +4 -1
+4 -1
--- src/captcha.c
+++ src/captcha.c
@@ -723,11 +723,14 @@
723723
*/
724724
void captcha_callback(void){
725725
int bTest = atoi(PD("istest","0"));
726726
if( captcha_is_correct(1) ){
727727
if( bTest==0 ){
728
- login_set_anon_cookie(0, 0);
728
+ login_check_credentials();
729
+ if( g.zLogin==0 ){
730
+ login_set_anon_cookie(0, 0);
731
+ }
729732
cgi_append_header("X-Robot: 0\r\n");
730733
}
731734
login_redirect_to_g();
732735
}else{
733736
g.isHuman = 0;
734737
--- src/captcha.c
+++ src/captcha.c
@@ -723,11 +723,14 @@
723 */
724 void captcha_callback(void){
725 int bTest = atoi(PD("istest","0"));
726 if( captcha_is_correct(1) ){
727 if( bTest==0 ){
728 login_set_anon_cookie(0, 0);
 
 
 
729 cgi_append_header("X-Robot: 0\r\n");
730 }
731 login_redirect_to_g();
732 }else{
733 g.isHuman = 0;
734
--- src/captcha.c
+++ src/captcha.c
@@ -723,11 +723,14 @@
723 */
724 void captcha_callback(void){
725 int bTest = atoi(PD("istest","0"));
726 if( captcha_is_correct(1) ){
727 if( bTest==0 ){
728 login_check_credentials();
729 if( g.zLogin==0 ){
730 login_set_anon_cookie(0, 0);
731 }
732 cgi_append_header("X-Robot: 0\r\n");
733 }
734 login_redirect_to_g();
735 }else{
736 g.isHuman = 0;
737

Keyboard Shortcuts

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