Changeset 7305 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 7 Dec 2011, 15:46:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/captcha.py
r7303 r7305 238 238 API_SSL_SERVER = "https://www.google.com/recaptcha/api" 239 239 VERIFY_SERVER = "https://www.google.com/recaptcha/api" 240 # Do not use the following keys in productive environments!241 # As they are both made publicly available, they are not secure any more!242 # Use them for testing and evaluating only!243 PUBLIC_KEY = "6Lc0y8oSAAAAAHwdojrqPtcKn7Rww5qGprb0rrSk"244 PRIVATE_KEY = "6Lc0y8oSAAAAAMHVbMrGWLLjw2pm8v2Uprwm9AbR"245 240 246 241 class ReCaptcha(StaticCaptcha): 242 """ReCaptcha - strong captchas with images, sound, etc. 243 244 This is the SIRP implementation to support captchas as provided by 245 http://www.google.com/recaptcha. 246 247 ReCaptcha is widely used and adopted in web applications 248 """ 247 249 248 250 grok.implements(ICaptcha) … … 252 254 #: name of challenge field in HTTP request 253 255 chal_field = 'recaptcha_challenge_field' 256 257 # Do not use the following keys in productive environments! As 258 # they are both made publicly available, they are not secure any 259 # more! Use them for testing and evaluating only! 260 PUBLIC_KEY = "6Lc0y8oSAAAAAHwdojrqPtcKn7Rww5qGprb0rrSk" 261 PRIVATE_KEY = "6Lc0y8oSAAAAAMHVbMrGWLLjw2pm8v2Uprwm9AbR" 254 262 255 263 def verify(self, request): … … 264 272 params = urllib.urlencode( 265 273 { 266 'privatekey': PRIVATE_KEY,274 'privatekey': self.PRIVATE_KEY, 267 275 'remoteip': '127.0.0.1', 268 276 'challenge': challenge, … … 308 316 u'</noscript>' % { 309 317 'ApiServer' : API_SSL_SERVER, 310 'PublicKey' : PUBLIC_KEY,318 'PublicKey' : self.PUBLIC_KEY, 311 319 'ErrorParam' : error_param, 312 320 }
Note: See TracChangeset for help on using the changeset viewer.