Closed ascholerChemeketa closed 2 years ago
I don't know if Captchas are supported by web2py anymore or not. I haven't used them in years. This will require a little investigation.
@LYisus and I are working on this for a project.
Current hunch right now is based on documentation, ours currently is: from gluon.tools import Recaptcha
But the web2py documentation suggests: from gluon.tools import Recaptcha2
Investigating.
Also worth noting: reCAPTCHA may not work if you access the web site as 'localhost' or '127.0.0.1', because it is registered to work with publicly visible web sites only, unless you add them to the domains in the reCAPTCHA admin panel.
We were working on this, but it seems in the time that we started working on this issue, the 1.py file has been deleted from the main RunestoneServer branch. We're a little confused as to our next moves? @bnmnetp is there any chance you could advise?
1.py
was never part of the master branch. It is called 1.py.prototype
to indicate that the user should copy it to 1.py
and edit it.
After some work over this weekend, we found that we can enable everything just fine and get it to run, but when I change the keys over to the Google developer keys for reCaptcha2, Runestone will no longer build.
We believe that new keys need to be generated anyhow, and we wanted to check in with you about that.
@bnmnetp After a bit of fiddling and a bit of research, and I'm decently confident the issue is that captcha is in v1. I wanted to see if you could help us upgrade to v2-- I believe that we need new keys, and generating the keys is done on your Google account and has you register the website and whatnot, so I don't think I should be doing it personally? Let me know if that's not accurate.
I got the actual button working, but there's no server-side validation. That's the next thing to tackle.
The domains need to be all registered through Google, so it might be best for you to register your own keys and change the ones I made. Otherwise if anyone is running through their own server, there's a good chance the Captcha is gonna break the site for them.
Stale issue message
If
settings.enable_captchas = True
is set inmodels/1.py1
then the runestone server fails to start. (Using docker based server setup). Error below is reported in logs. Disabling that setting allows normal startup.