lukeraymonddowning / honey

A spam prevention package for Laravel, providing honeypot techniques, ip blocking and beautifully simple Recaptcha integration. Stop spam. Use Honey.
MIT License
406 stars 23 forks source link

The payload is invalid. #39

Open EGYWEB-Mohamed opened 3 years ago

EGYWEB-Mohamed commented 3 years ago

The payload is invalid. {"exception":"[object] (Illuminate\Contracts\Encryption\DecryptException(code: 0): The payload is invalid. at vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:195)

davidjr82 commented 2 years ago

Sometimes it happens the same to me. I think it happens when a user left the browser opened for a long time in the login page (not logged in), and tries to login.

MarlonRaphael commented 1 year ago

Tenho este problema ocorrendo aqui também

v1ncen commented 1 year ago

Same issue with a basic contact form (no auth required). I think it happens when a spammer tries to send some kind of hacked token.

For now I am encapsulating the decrypt attempt with a try/catch to prevent the DecryptException being logged over and over:

# vendor/lukeraymonddowning/honey/src/InputValues/JavascriptInputValue.php

public function checkValue($value): bool
{
    try {
        return Crypt::decrypt($value) == "Honey";
    } catch (\Throwable $exception) {
        return false;
    }
}