Debug version

Temporarily disable hashing for bug search.
This commit is contained in:
Sascha Leib
2025-11-04 09:25:12 +01:00
parent 6728cfa61c
commit 83d954bd67
3 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@@ -2,5 +2,6 @@
logs/*.log.txt
logs/*.srv.txt
logs/*.tck.txt
logs/*.captcha.txt
config/user-*.json
php_errors.log

View File

@@ -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);

View File

@@ -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;'