Fossil SCM
Fix the use of captchas on the /msgadmin page.
Commit
43532cd1d563bc66bed5d65d20b04667e30125d7166805f94ffefc1e39813ff2
Parent
0c4d3c128ae0df3…
1 file changed
+2
-1
+2
-1
| --- src/email.c | ||
| +++ src/email.c | ||
| @@ -1800,10 +1800,11 @@ | ||
| 1800 | 1800 | const char *zAdminEmail = db_get("email-admin",0); |
| 1801 | 1801 | unsigned int uSeed; |
| 1802 | 1802 | const char *zDecoded; |
| 1803 | 1803 | char *zCaptcha = 0; |
| 1804 | 1804 | |
| 1805 | + login_check_credentials(); | |
| 1805 | 1806 | if( zAdminEmail==0 || zAdminEmail[0]==0 ){ |
| 1806 | 1807 | style_header("Admin Messaging Disabled"); |
| 1807 | 1808 | @ <p>Messages to the administrator are disabled on this repository |
| 1808 | 1809 | style_footer(); |
| 1809 | 1810 | return; |
| @@ -1845,11 +1846,11 @@ | ||
| 1845 | 1846 | zDecoded = captcha_decode(uSeed); |
| 1846 | 1847 | zCaptcha = captcha_render(zDecoded); |
| 1847 | 1848 | } |
| 1848 | 1849 | style_header("Message To Administrator"); |
| 1849 | 1850 | 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> | |
| 1851 | 1852 | @ <table class="subscribe"> |
| 1852 | 1853 | if( zCaptcha ){ |
| 1853 | 1854 | @ <tr> |
| 1854 | 1855 | @ <td class="form_label">Security Code:</td> |
| 1855 | 1856 | @ <td><input type="text" name="captcha" value="" size="10"> |
| 1856 | 1857 |
| --- 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 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 Code:</td> |
| 1856 | @ <td><input type="text" name="captcha" value="" size="10"> |
| 1857 |