diff --git a/public/auth.php b/public/auth.php index 1ca09efa..3e9a4ce5 100644 --- a/public/auth.php +++ b/public/auth.php @@ -340,6 +340,16 @@ MSG; break; } + $checkSpamBot = mb_strtolower($_POST['auth']['meow'] ?? ''); + $spamBotValid = [ + '19', '21', 'nineteen', 'nine-teen', 'nine teen', 'twentyone', 'twenty-one', 'twenty one', + ]; + + if (!in_array($checkSpamBot, $spamBotValid)) { + $authRegistrationError = 'Human only cool club, robots begone.'; + break; + } + $usernameValidation = user_validate_username($authUsername, true); if ($usernameValidation !== '') { $authRegistrationError = $usernameValidationErrors[$usernameValidation]; diff --git a/templates/auth/auth.twig b/templates/auth/auth.twig index fdee2f62..f72185e5 100644 --- a/templates/auth/auth.twig +++ b/templates/auth/auth.twig @@ -33,6 +33,9 @@ name="auth[email]" placeholder="E-mail" value="{{ auth_email|default('') }}" required> + +