-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Port the NoCaptcha implementation of ReCaptcha from gh-5315 #5323
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
Conversation
Close gh-5315 # Executive summary This is a fork of the work done in gh-5315 by @nonumber to implement the new NoCaptcha feature of reCAPTCHA. Since the new noCAPTCHA API is incompatible with the parameters of the old reCAPTCHA implementation we have no implemented it as a new plugin called "Captcha-NoCaptcha". The same tests as gh-5315 apply to this PR.
PLG_NOCAPTCHA_PUBLIC_KEY_LABEL="Site key" | ||
PLG_NOCAPTCHA_PUBLIC_KEY_DESC="Used in the JavaScript code that is served to your users. See the plugin description for instructions on getting a site key." | ||
PLG_NOCAPTCHA_PRIVATE_KEY_LABEL="Secret key" | ||
PLG_NOCAPTCHA_PRIVATE_KEY_DESC="Used in the communication between your server and the ReCaptha server. Be sure to keep it a secret. See the plugin description for instructions on getting a secret key." |
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.
ReCaptha ?? Shouldnt that be reCAPTCHA
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.
Add you write it reCAPTCHA on line 6 and ReCaptha here
So it should be consistent and spelt correctly
Great work - thanks - I made a few small comments on the english language file |
@brianteeman I used the same capitalization as the reCAPTCHA plugin. Yeah, it's inconsistent with the product branding but I had two choices:
Regarding index.html, it is not required by JED for third party extensions. The core plugins still have those files. |
The same caps but not the same spelling ;) re index.html see #3788 On 4 December 2014 at 15:39, Nicholas K. Dionysopoulos <
Brian Teeman |
@test success! I tested with postgresql and mssql on the user registration form. |
@@ -610,6 +610,7 @@ INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder` | |||
(449, 'plg_authentication_cookie', 'plugin', 'cookie', 'authentication', 0, 1, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), | |||
(450, 'plg_twofactorauth_yubikey', 'plugin', 'yubikey', 'twofactorauth', 0, 0, 1, 0, '', '', '', '', 0, '0000-00-00 00:00:00', 0, 0), | |||
(451, 'plg_search_tags', 'plugin', 'tags', 'search', 0, 1, 1, 0, '', '{"search_limit":"50","show_tagged_items":"1"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), | |||
(452, 'plg_captcha_nocaptcha', 'plugin', 'nocaptcha', 'captcha', 0, 0, 1, 0, '', '{"public_key":"","private_key":"","theme":"clean"}', '', '', 0, '0000-00-00 00:00:00', 0, 0), |
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.
Shoundn't the theme be light
instead of clean
? The new API only supports light and dark
Could we perhaps include the data-type attribute? |
I fixed the language strings and the default theme. I am not sure what you mean regarding the data-type attribute @losedk |
@nikosdion Cool! Included a screenshot from the API documentation: Perhaps it could be a setting in the plugin? |
I think it shouldn't. We have not implemented it for the old reCAPTCHA plugin. Moreover –if I understand it correctly– Google will serve the correct type (image or audio) depending on the user's accessibility settings. I wonder if we have any people with impaired vision who can test it for us using their real world browser settings? |
Point taken! :) |
@test Almost but there are issues with the captcha responsiveness which you can see if you use Isis and the testing data (or have anything in both left and right columns)
|
Correction - the old captcha plugin has the exact same issues. And as you;ve corrected the test I am marking this as a successful test |
FYI @brianteeman the responsiveness is one part Google problem and one part Joomla! issue. If/when Joomla! switches to Bootstrap 3 this issue will go away. BS3 renders forms differently on extra small widths. Instead of having the label left and the fields to the right it moves the label on top of the fields and this fixes the layout. |
Installed the plugin on developer.joomla.org, working fine. |
@nikosdion can you disable the CS stuff for the google lib and fix the CS stuff for the new file?
|
@nikosdion i have add a CS PR to fix the issues: https://github.com/nikosdion/joomla-cms/pull/3 |
Fix CS for Port the NoCaptcha implementation of ReCaptcha from gh-5315
Thank you! I just merged your PR. |
``` FILE: .../travis/build/joomla/joomla-cms/plugins/captcha/nocaptcha/nocaptcha.php -------------------------------------------------------------------------------- FOUND 2 ERROR(S) AFFECTING 2 LINE(S) -------------------------------------------------------------------------------- 31 | ERROR | Expected 2 spaces after the longest type 71 | ERROR | Expected 2 spaces after the longest variable name -------------------------------------------------------------------------------- ``` Sorry @nikosdion
Thanks but it looks like i have missed two errors. https://github.com/nikosdion/joomla-cms/pull/4 Sorry @nikosdion |
hmm looks like i have missed two errors
There you go, merged :) |
thanks Travis is happy now 😄 |
Thank you! I tested it on developer.joomla.org and everything tested fine. |
Awesome! I guess we can set it RTC now that we have tested it on project property and Travis is happy? :) |
moving to RTC but i think @Bakual @phproberto @mbabker @dbhurley or others form the PLT need to accept it bevor we can merge this 😄 |
@nikosdion Can you correct the spelling mistake in the english as I commented on github. Once thats done I will set it RTC |
Corrected spelling mistake
Update en-GB.plg_captcha_nocaptcha.ini
Thanks for merging that spelling correction |
Why add deprecated strings in a new plugin? |
@committer |
Add the new language files to the install.xml & remove the not longer used lang strings
@infograf768 Issues fixed thanks to @zero-24's speedy PR :) |
Works great! |
Close gh-5315
Executive summary
This is a fork of the work done in gh-5315 by @nonumber to implement the new NoCaptcha feature of reCAPTCHA. Since the new noCAPTCHA API is incompatible with the parameters of the old reCAPTCHA implementation we have no implemented it as a new plugin called "Captcha-NoCaptcha". The same tests as gh-5315 apply to this PR.