Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Simplified interaction on the honeypot. Humans can prove themselves with just two simple clicks when the auto-captcha setting is enabled. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
0e675ad32cb71c6b5dfeae97f41c08b6 |
| User & Date: | drh 2024-07-27 17:28:21.288 |
Context
|
2024-07-27
| ||
| 19:11 | Updates to the recommended value for the robot-restrict setting. ... (check-in: de7bf23a90 user: drh tags: trunk) | |
| 17:28 | Simplified interaction on the honeypot. Humans can prove themselves with just two simple clicks when the auto-captcha setting is enabled. ... (check-in: 0e675ad32c user: drh tags: trunk) | |
| 14:30 | Only apply the complex-request restriction to pages listed in the robot-restrict setting. Deprecate the robot-limiter and robot-allow settings. ... (check-in: cee1af5a37 user: drh tags: trunk) | |
Changes
Changes to src/cgi.c.
| ︙ | ︙ | |||
1914 1915 1916 1917 1918 1919 1920 |
blob_appendf(&url, "%c%t=%t", cSep, p->zName, p->zValue);
}else{
blob_appendf(&url, "%c%t", cSep, p->zName);
}
cSep = '&';
}
}
| | | 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 |
blob_appendf(&url, "%c%t=%t", cSep, p->zName, p->zValue);
}else{
blob_appendf(&url, "%c%t", cSep, p->zName);
}
cSep = '&';
}
}
return blob_str(&url);
}
/*
** Tag query parameter zName so that it is not exported by
** cgi_query_parameters_to_hidden(). Or if zName==0, then
** untag all query parameters.
*/
|
| ︙ | ︙ |
Changes to src/style.c.
| ︙ | ︙ | |||
1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 |
}
/*
** WEBPAGE: honeypot
** This page is a honeypot for spiders and bots.
*/
void honeypot_page(void){
style_header("I think you are a robot");
@ <p>You seem like a robot.</p>
@
| > > > > > | > | | > > > > | > > > > | > > > > > > > > > | < > | > > | 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 |
}
/*
** WEBPAGE: honeypot
** This page is a honeypot for spiders and bots.
*/
void honeypot_page(void){
unsigned int uSeed = captcha_seed();
const char *zDecoded = captcha_decode(uSeed);
int bAutoCaptcha = db_get_boolean("auto-captcha", 0);
char *zCaptcha = captcha_render(zDecoded);
style_header("I think you are a robot");
@ <p>You seem like a robot.</p>
@
@ <p>Is that incorrect? Are you really human?
@ If so, please prove it by transcribing the captcha text
@ into the entry box below and pressing "Submit".
@ <form action="%R/login" method="post">
@ <input type="hidden" id="u" name="u" value="anonymous">
@ <p>
@ Captcha: <input type="text" id="p" name="p" value="">
@ <input type="submit" name="in" value="Submit">
@
@ <p>Alternatively, you can <a href="%R/login">log in</a> using an
@ existing userid.
@
@ <p><input type="hidden" name="cs" value="%u(uSeed)">
@ <div class="captcha"><table class="captcha"><tr><td>\
@ <pre class="captcha">
@ %h(zCaptcha)
@ </pre></td></tr></table>
if( bAutoCaptcha ) {
@ <input type="button" value="Fill out captcha" id='autofillButton' \
@ data-af='%s(zDecoded)'>
builtin_request_js("login.js");
}
@ </div>
free(zCaptcha);
@
@ <p>We regret this inconvenience. However, robots have become so
@ prolific and so aggressive that they will soak up too much CPU time
@ and network bandwidth on our servers if allowed to run unchecked.
@ Your cooperation in demonstrating that you are human is
@ appreciated.
style_finish_page();
}
/*
** Webpages that encounter an error due to missing or incorrect
** query parameters can jump to this routine to render an error
** message screen.
|
| ︙ | ︙ |