-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement invisible Recaptcha #18146
Conversation
Because of the keys issue would it not make sense to create this as a new plugin? |
V1 and V2 keys also were incompatible, and we had them in the same plugin. Additionally, V2 and invisible share very much of the code (e.g. the whole server-side validation), so I don't see any advantage when using a separate plugin. Additionally, the "key issue" is pretty clear on the Google reCAPTCHA admin page, so I think it shouldn't confuse users. I just wrote it down in the testing information to make clear that new keys has to be created to test this. |
I thought it was a mistake last time as well |
Well, we could do it as a separate plugin now (it is not very much work to disassemble it), but where do you see the advantage exactly? |
You would be able to use invisible!e on some forms and V2 on others. |
Okay, true. Especially the first point is very interesting. I think we should wait for some more feedback, but if the broad agreement is to put it into a separate plugin, I will be very glad to do so. |
i vote for same plugin |
it should be a plugin, there even a pull request for it, already, somewhere here |
Hi This looks a nice feature to add :) |
@paulus103 can you please test? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18146. |
@franz-wohlkoenig I have tested this on a live server and it works :) This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18146. |
@paulus103 thanks for Info. Please mark your Test as successfully:
|
I have tested this item ✅ successfully on 259a657 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18146. |
What can be done, so this pr will be included in 3.8.3. I was disappointed not seeing it in 3.8.2. If I can help, let me know, Pascal |
@pmleconte Pull Requests needs 2 successfully Tests. If you can test this PR, next Step is done. |
@continga can you please resolve conflicting Files so PR can be tested? |
I would really suggest to make/test a plugin (there even already one #16599) |
Status is set on "Needs Review". |
I have tested this item ✅ successfully on 259a657 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18146. |
259a657
to
b9c03c9
Compare
… registration form
I now fixed the label issue, see commit f75d99c6. Now from my point of view every feedback and review-change-request has been applied. Can you guys maybe take a look again and check whether this is mergable? This PR is pretty old and I am crossing fingers we finally get this thing merged 🙂 Thank you in advance! |
@continga I am sure we will get it merged once all issues are solved :) When I do a Same when I do So I think for these 2 pages you still need to add the layout fix. Looking good:
Those are the only places I can think of and find where the captcha could be shown. |
…nd login/remind/reset forms. This fixes some problems with formfields not being rendered correctly (e.g. the invisible recaptcha field)
Thanks @roland-d I fixed the cases you found. Additionally I checked the sourcecode for other cases where form fields are being rendered manually and found some additional ones in the com_users login, password reset confirmation and success views. There shouldn't be a captcha there, but just to be sure I replaced the manual rendering with the Form renderer. As far as I see, the only other places where forms are being rendered manually now are in several com_config views, and in the profile edit view of com_users. Both cases are not easily straight-forward replaceable by the Form renderer, so I left them in their current state, also because they don't display a captcha at all. Can you check again? |
I have tested this item ✅ successfully on 67ac41a
All the views show the Captcha logo and allowed me to process the form successfully. I had a look at the JS callbacks as well they work fine for me. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18146. |
I have tested this item ✅ successfully on 67ac41a This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18146. |
Ready to Commit after two successful tests. |
Merged to 3.9-dev via 9a12f28 |
PLG_RECAPTCHA_CALLBACK_DESC="(Optional) JavaScript callback, executed after successful reCAPTCHA response" | ||
PLG_RECAPTCHA_EXPIRED_CALLBACK_LABEL="Expired callback" | ||
PLG_RECAPTCHA_EXPIRED_CALLBACK_DESC="(Optional) JavaScript callback, executed when the reCAPTCHA expired" | ||
PLG_RECAPTCHA_EXPIRED_CALLBACK_LABEL="Error callback" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has to be PLG_RECAPTCHA_ERROR_CALLBACK_LABEL
PLG_RECAPTCHA_EXPIRED_CALLBACK_LABEL="Expired callback" | ||
PLG_RECAPTCHA_EXPIRED_CALLBACK_DESC="(Optional) JavaScript callback, executed when the reCAPTCHA expired" | ||
PLG_RECAPTCHA_EXPIRED_CALLBACK_LABEL="Error callback" | ||
PLG_RECAPTCHA_EXPIRED_CALLBACK_DESC="(Optional) JavaScript callback, executed when the reCAPTCHA encounters an error" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hast to be PLG_RECAPTCHA_ERROR_CALLBACK_DESC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two strings are duplicated in the en-GB.plg_captcha_recaptcha.ini file and must be corrected.
@tecpromotion as this has been merged already can you do a PR to fix it - or shall I ? |
@brianteeman |
There were two double strings
thanks @brianteeman fix order
* Implement invisible Recaptcha #18146 There were two double strings * Implement invisible Recaptcha #18146 thanks @brianteeman fix order
Pull Request for Issue #14565 and following up #14583 and #16599 et al.
Summary of Changes
This PR implements the possiblity to use the Invisible reCAPTCHA using a separate plugin. Besides implementing the basic functionality to make invisible reCAPTCHA working, there has been made some smaller architectural changes to the whole captcha process (e.g. using Exception instead of JError for errors) and the reCAPTCHA PHP library from Google has been updated, alongside with some smaller changes in the old reCAPTCHA (V1 und V2) plugin.
As this is one of my first PRs for Joomla!, please dont hesitate to make suggestions of how to improve it.
Testing Instructions
We also need to make sure that the reCAPTCHA plugin (V1 and V2) still is working correctly (as there has been made some bigger changes to the code by me), although I have tested this toroughly already, but I would be very glad if other people could take a look at this too, I don't want to take chances that this PR breaks something.
Additionally, as this PR changes the rendering of form fields for the registration form (this was needed as the registration form was using its own rendering of form fields, which caused issues with the invisible reCAPTCHA), we need to make sure the registration form for users is working as expected. So we need to test the registration form in resprect to custom fields of users etc, and whether they get displayed correctly now.
Expected result