- Timestamp:
- 7 Dec 2011, 06:01:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/captcha.py
r7297 r7299 189 189 ## 190 190 class IdCaptcha(object): 191 """The IdCaptcha allows all solutions that equal a challenge. 192 193 The challenge is a permutation of 'abcdefg'. 194 195 It is of no use for real world but for tests. In tests we cannot 196 easily solve really strong captchas. But we can use a captcha that 197 works like a real one but is easy to solve even for machines. 198 199 It is called IdCaptcha because solutions and challenges for this 200 captcha type are mapped by identitiy function. 201 """ 191 202 grok.implements(ICaptcha) 192 203 … … 197 208 198 209 def verify(self, request): 210 """Verify that a solution sent equals the challenge. 211 """ 199 212 form = getattr(request, 'form', {}) 200 213 solution=form.get(self.sol_field, None) … … 205 218 206 219 def display(self, error_code=None): 220 """Display challenge and input field for solution as HTML. 221 """ 207 222 challenge = list('abcdef') 208 223 random().shuffle(challenge)
Note: See TracChangeset for help on using the changeset viewer.