Closed (fixed)
Project:
CAPTCHA
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2015 at 09:43 UTC
Updated:
10 Apr 2015 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
nicrodgersOn debugging, it looks as if the check in _captcha_get_posted_captcha_info is setting $posted_captcha_token based on whether or not $form_state['input']['captcha_token'] is set.
The trouble is, the default value here is an empty string, so it takes that, and then fails the comparison if ($expected_captcha_token !== $posted_captcha_token) as it's effectively doing if ( NULL != '' ).
Changing isset() to empty() seems to fix the issue. Patch attached.
Comment #2
nicrodgersComment #4
nicrodgersUploading a corrected patch.
Comment #5
nicrodgersComment #6
podarok