Debug version
Temporarily disable hashing for bug search.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,5 +2,6 @@
|
||||
logs/*.log.txt
|
||||
logs/*.srv.txt
|
||||
logs/*.tck.txt
|
||||
logs/*.captcha.txt
|
||||
config/user-*.json
|
||||
php_errors.log
|
||||
|
||||
@@ -315,7 +315,7 @@ class action_plugin_botmon extends DokuWiki_Action_Plugin {
|
||||
$today = substr((new DateTime())->format('c'), 0, 10);
|
||||
|
||||
$raw = $this->getConf('captchaSeed') . '|' . $_SERVER['SERVER_NAME'] . '|' . $_SERVER['REMOTE_ADDR'] . '|' . $today;
|
||||
$expected = hash('sha256', $raw);
|
||||
$expected = $raw; //hash('sha256', $raw);
|
||||
|
||||
// for debugging: write captcha data to the log:
|
||||
$this->writeCaptchaLog($_SERVER['REMOTE_ADDR'], $cookieVal, $_SERVER['SERVER_NAME'], $expected);
|
||||
|
||||
@@ -175,8 +175,8 @@ const $BMCaptcha = {
|
||||
document._botmon.ip || '0.0.0.0',
|
||||
(new Date()).toISOString().substring(0, 10)
|
||||
];
|
||||
if ($BMCaptcha._st - performance.now() >= 0) dat.push($BMCaptcha._st - performance.now());
|
||||
const hash = $BMCaptcha.digest.hash(dat.join('|'));
|
||||
//if ($BMCaptcha._st - performance.now() >= 0) dat.push($BMCaptcha._st - performance.now());
|
||||
const hash = /*$BMCaptcha.digest.hash(*/dat.join('|')/*)*/;
|
||||
|
||||
// set the cookie:
|
||||
document.cookie = "DWConfirm=" + encodeURIComponent(hash) + ';path=/;hostOnly;session;sameSite=strict;'
|
||||
|
||||
Reference in New Issue
Block a user