Changeset 3688 in products for quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha/widget.py
- Timestamp:
- Jun 27, 2013 4:37:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha/widget.py
r3137 r3688 16 16 from Products.CMFCore.interfaces import ISiteRoot 17 17 18 from quintagroup.captcha.core.utils import decrypt, parseKey, encrypt1, getWord 18 from quintagroup.captcha.core.utils import (decrypt, parseKey, 19 encrypt1, getWord, 20 detectInlineValidation) 21 22 try: 23 from plone.app.form import inline_validation 24 except ImportError: 25 # BBB Plone < 4.3 compatibility. 26 # The implementation of inline validation was switched 27 # to a non-KSS-based in plone.app.form-2.2.0 28 from plone.app.form.kss import validation as inline_validation 19 29 20 30 _ = MessageFactory('quintagroup.formlib.captcha') … … 63 73 64 74 def _toFieldValue(self, input): 65 # Verify the user input against the captcha 75 # Captcha validation is one-time process to prevent hacking 76 # This is the reason for in-line validation to be disabled. 77 if detectInlineValidation(inline_validation): 78 return input 66 79 67 # get captcha type (static or dynamic) 80 # Verify the user input against the captcha. 81 # Get captcha type (static or dynamic) 68 82 site = self.get_site() 69 83 captcha_type = site.getCaptchaType()
Note: See TracChangeset
for help on using the changeset viewer.