diff --git a/.gitignore b/.gitignore index a377e1b..61335d4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ logs/*.log.txt logs/*.srv.txt logs/*.tck.txt +logs/*.captcha.txt config/user-*.json php_errors.log diff --git a/action.php b/action.php index cb3830d..e9f7652 100644 --- a/action.php +++ b/action.php @@ -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); diff --git a/captcha.js b/captcha.js index 778cef6..4ff05c0 100644 --- a/captcha.js +++ b/captcha.js @@ -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;'