power-media / prado3

Automatically exported from code.google.com/p/prado3
Other
0 stars 0 forks source link

reCAPTCHA control does not work properly with callbacks #378

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
My original implementation of the recaptcha control (see issue 345 and r3044) 
only worked properly with postback-based interaction, but didn't work well with 
active controls, and when it was validated from callbacks.

The problem was two-fold:
1. TReCaptchaValidator didn't display the error message if the validation 
failed, and
2. TReCaptcha didn't display a new challenge when it was validated successfully 
(which in turn prevented the same challenge to validate ever again), but the 
submission of the page wasn't successful, because of probably some other 
validation failing

So, I've updated the code to work properly even in these situations. 1. 
TReCaptchaValidator now displays an error message if it won't validate in a 
callback, and 
2. TReCaptcha will request a new challenge whenever it gets validated and 
proved to be solved properly in a callback, but in the end doesn't get hidden 
or destroyed as part of the callback action/response.

The sources attached are based on the latest trunk sources.

Original issue reported on code.google.com by google...@pcforum.hu on 19 Dec 2011 at 2:33

Attachments:

GoogleCodeExporter commented 8 years ago
Patch committed as r3081, thank you!
I just changed a "* @since 3.9" back to 3.2.. are you working at prado 3.9? :p

Original comment by ctrlal...@gmail.com on 19 Dec 2011 at 1:21

GoogleCodeExporter commented 8 years ago

Original comment by ctrlal...@gmail.com on 19 Dec 2011 at 1:21

GoogleCodeExporter commented 8 years ago
I didn't touch anything in the version information. If there was 3.9, it must 
have come the fresh checkout I made from the SVN repo. (I also can't remember 
doing a search and replace with something like '.2' to '.9', and I surely 
wouldn't have written 9 back after an possible accidental deletion of the 2 in 
the version either.)

Original comment by google...@pcforum.hu on 19 Dec 2011 at 2:58