Fossil SCM
When a user correctly enters the captcha for /ityaar, do not change their login to anonymous if they are already logged in.
Commit
160126c043374d3771d77dcf0bc2f915fea32763d3d8624143b9613e5d5b775a
Parent
6a20a34a6c2278a…
1 file changed
+4
-1
+4
-1
| --- src/captcha.c | ||
| +++ src/captcha.c | ||
| @@ -723,11 +723,14 @@ | ||
| 723 | 723 | */ |
| 724 | 724 | void captcha_callback(void){ |
| 725 | 725 | int bTest = atoi(PD("istest","0")); |
| 726 | 726 | if( captcha_is_correct(1) ){ |
| 727 | 727 | 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 | + } | |
| 729 | 732 | cgi_append_header("X-Robot: 0\r\n"); |
| 730 | 733 | } |
| 731 | 734 | login_redirect_to_g(); |
| 732 | 735 | }else{ |
| 733 | 736 | g.isHuman = 0; |
| 734 | 737 |
| --- 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 |