Closed (outdated)
Project:
Antibot
Version:
8.x-1.3
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 May 2020 at 19:36 UTC
Updated:
9 Nov 2021 at 10:16 UTC
Jump to comment: Most recent
Hi,
I had antibot running on form. It is not generating unique key after every submission. With current static key on form id basis bots are bypassing antibot and submitting the spam messages.
If we able to generate new key for every submission i think we can resolve this issue
Thanks
Rakesh
Comments
Comment #2
mstef commentedUnfortunately, no way to really do that without disabling caching on pages with forms, and that goes against one of the main points of this module. Are you really sure that bots are specifically injecting the keys in order to get past antibot? If that is true, you need to find out if they are hard-coding them or actually pulling them from the Drupal JS settings.
Comment #3
rkamepalli commentedThanks for the quick reply.
$key = Crypt::hmacBase64(uniqid($form['#form_id']), Settings::getHashSalt()); would that help. Just a thought
Thanks
Rakesh
Comment #4
mstef commentedThat's exactly what is already being done:
$key = Crypt::hmacBase64($form['#form_id'], Settings::getHashSalt());This means a bot would either have had hard-coded your site's unique keys for each form, or there are bots out there designed for antibot and they are reading the keys in the JS settings; either is possible. And for either of these, these bots must have JS enabled and are triggering mouse or keyboard actions. That would be quite sophisticated for an anti-spam measure only installed on about 27K sites. It is possible though.
I'm very open to any other ideas to increase the randomness of the keys as long as it doesn't interfere with page caching.
Comment #5
gaurav.kapoor commented