Edgewall Software
Modify

Opened 6 years ago

Closed 6 years ago

#12379 closed defect (fixed)

Recaptcha2Captcha doesn't handle response correctly

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: plugin - spam-filter
Component: plugin/spamfilter Version:
Severity: normal Keywords:
Cc: Dirk Stöcker Branch:
Release Notes:
  • Fixed incorrect parsing of JSON response from the reCAPTCHA2 API.
  • Fixed reCAPTCHA2 image not rendering because input was placed inside the div where the captcha is rendered, but the div must be empty.
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

Seeing the following error with reCAPTCHA2:

2016-03-02 19:39:42,444 Trac[recaptcha2] WARNING: reCAPTCHA returned error:   "success": true,

The problem is that the reCAPTCHA2 API returns JSON, but the response is handled as if it was a newline delimited string: plugins/1.0/spam-filter/tracspamfilter/captcha/recaptcha2.py@14567:82#L63.

The reCAPTCHA API returns string data, so the issue here may be that the code was copied from tracspamfilter.captcha.recaptcha.

Another issue I noticed while working in a dev environment is that the reCAPTCHA2 image is not rendered because the Submit button is placed inside the div where the captcha is rendered. The JavaScript that adds the image expects the div to be empty.

Patch forthcoming.

Attachments (1)

Screen Shot 2016-03-02 at 18.39.51.png (27.9 KB ) - added by Ryan J Ollos 6 years ago.

Download all attachments as: .zip

Change History (5)

by Ryan J Ollos, 6 years ago

comment:1 by Ryan J Ollos, 6 years ago

Release Notes: modified (diff)

Fixed in [14578], but I'll leave the ticket open until the fix is confirmed on the production server.

Last edited 6 years ago by Ryan J Ollos (previous) (diff)

comment:2 by Ryan J Ollos, 6 years ago

Description: modified (diff)

comment:3 by Ryan J Ollos, 6 years ago

Release Notes: modified (diff)

comment:4 by Ryan J Ollos, 6 years ago

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.