Fossil SCM

Fix the use of captchas on the /msgadmin page.

drh 2018-06-23 19:51 trunk
Commit 43532cd1d563bc66bed5d65d20b04667e30125d7166805f94ffefc1e39813ff2
1 file changed +2 -1
+2 -1
--- src/email.c
+++ src/email.c
@@ -1800,10 +1800,11 @@
18001800
const char *zAdminEmail = db_get("email-admin",0);
18011801
unsigned int uSeed;
18021802
const char *zDecoded;
18031803
char *zCaptcha = 0;
18041804
1805
+ login_check_credentials();
18051806
if( zAdminEmail==0 || zAdminEmail[0]==0 ){
18061807
style_header("Admin Messaging Disabled");
18071808
@ <p>Messages to the administrator are disabled on this repository
18081809
style_footer();
18091810
return;
@@ -1845,11 +1846,11 @@
18451846
zDecoded = captcha_decode(uSeed);
18461847
zCaptcha = captcha_render(zDecoded);
18471848
}
18481849
style_header("Message To Administrator");
18491850
form_begin(0, "%R/msgadmin");
1850
- @ <p>Enter a message for the repository administrator below:</p>
1851
+ @ <p>Enter a message to the repository administrator below:</p>
18511852
@ <table class="subscribe">
18521853
if( zCaptcha ){
18531854
@ <tr>
18541855
@ <td class="form_label">Security&nbsp;Code:</td>
18551856
@ <td><input type="text" name="captcha" value="" size="10">
18561857
--- src/email.c
+++ src/email.c
@@ -1800,10 +1800,11 @@
1800 const char *zAdminEmail = db_get("email-admin",0);
1801 unsigned int uSeed;
1802 const char *zDecoded;
1803 char *zCaptcha = 0;
1804
 
1805 if( zAdminEmail==0 || zAdminEmail[0]==0 ){
1806 style_header("Admin Messaging Disabled");
1807 @ <p>Messages to the administrator are disabled on this repository
1808 style_footer();
1809 return;
@@ -1845,11 +1846,11 @@
1845 zDecoded = captcha_decode(uSeed);
1846 zCaptcha = captcha_render(zDecoded);
1847 }
1848 style_header("Message To Administrator");
1849 form_begin(0, "%R/msgadmin");
1850 @ <p>Enter a message for the repository administrator below:</p>
1851 @ <table class="subscribe">
1852 if( zCaptcha ){
1853 @ <tr>
1854 @ <td class="form_label">Security&nbsp;Code:</td>
1855 @ <td><input type="text" name="captcha" value="" size="10">
1856
--- src/email.c
+++ src/email.c
@@ -1800,10 +1800,11 @@
1800 const char *zAdminEmail = db_get("email-admin",0);
1801 unsigned int uSeed;
1802 const char *zDecoded;
1803 char *zCaptcha = 0;
1804
1805 login_check_credentials();
1806 if( zAdminEmail==0 || zAdminEmail[0]==0 ){
1807 style_header("Admin Messaging Disabled");
1808 @ <p>Messages to the administrator are disabled on this repository
1809 style_footer();
1810 return;
@@ -1845,11 +1846,11 @@
1846 zDecoded = captcha_decode(uSeed);
1847 zCaptcha = captcha_render(zDecoded);
1848 }
1849 style_header("Message To Administrator");
1850 form_begin(0, "%R/msgadmin");
1851 @ <p>Enter a message to the repository administrator below:</p>
1852 @ <table class="subscribe">
1853 if( zCaptcha ){
1854 @ <tr>
1855 @ <td class="form_label">Security&nbsp;Code:</td>
1856 @ <td><input type="text" name="captcha" value="" size="10">
1857

Keyboard Shortcuts

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