Skip to content

Commit f652b3e

Browse files
wp_die() instead of invalid password
1 parent 27ae3d1 commit f652b3e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

includes/protect-wp-login.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
}
2525
requestAnimationFrame(() => {
2626
button.classList.add('waiting-animate');
27+
button.disabled = true;
2728
});
2829

2930
window.setTimeout(() => {
@@ -33,6 +34,7 @@
3334
input.value = '1';
3435
document.querySelector('#loginform').prepend(input);
3536
button.classList.remove('waiting-animate');
37+
button.disabled = false;
3638
}, 2500);
3739
})
3840

@@ -46,7 +48,8 @@
4648

4749
$js_timeout_check = ($_POST['login-ok'] ?? '') === '1';
4850
$csrf_check = parse_url($_SERVER['HTTP_ORIGIN'] ?? '', PHP_URL_HOST) === parse_url(home_url(), PHP_URL_HOST);
51+
4952
if (!$js_timeout_check || ! $csrf_check) {
50-
$password = 'invalid';
53+
wp_die("Sorry, we are unable to process your login request as we think you are a bot. Please try again if you're not.");
5154
}
5255
}, 10, 2);

0 commit comments

Comments
 (0)