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

Undefined array key "honey_time" again #59

Closed v1ncen closed 1 year ago

v1ncen commented 2 years ago

Sometimes I get Undefined array key "honey_time" errors on production. It happens only some times when it's a spammer that tries to submit our form. Not all spammers are triggering the error. Non-spammer submissions are working fine. Seems to me that some spammers found a way to remove 'honey_time' key from form payload.

I am using:

# My route:
Route::post('contact-us', 'ContactFormController@post')
    ->middleware(['honey'])
    ->name('contact.us');
# My form
<form action="{{ route('contact.us') }}" method="post">
    @csrf
    <x-honey/>
    ...
AntonioJABV commented 2 years ago

The same thing is happening to me. When a spammer submits the form without the honey_time field, I get a 500 error instead of denying the request.

I have created a PR to try to solve it: #60

encodiaweb commented 1 year ago

Same problem here. Is this PR mergeable? Thank you

AntonioJABV commented 1 year ago

Hi @encodiaweb, technically the PR is ready to be merged, it's just pending of approval 😉 in the meantime, in our team, we are using the version of my fork until the merge is completed.

lukeraymonddowning commented 1 year ago

Thanks for the fix @AntonioJABV. And sorry for the very long delay 😛