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
Updated Google reCaptcha V1 to Google reCaptcha V2 #47
Conversation
Updated Google reCaptcha V1 to Google reCaptcha V2 Updated Google reCaptcha V1 to Google reCaptcha V2 Updated Google reCaptcha V1 to Google reCaptcha V2 Updated ReCaptchaTheme for Google reCaptcha V2
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.
Don't worry about the extra commits, I can squash them while merging the pull request.
lib/Flux/LoginServer.php
Outdated
$_POST['recaptcha_response_field']); | ||
|
||
if (!$resp->is_valid) { | ||
$response; |
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.
Does this line have a purpose?
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.
It's intended to be $response = false; basically.
I suppose I could change it to $response = $_POST["g-recaptcha-response"]; which is the client side check with the form and then change if($_POST["g-recaptcha-response"]) to if($response).
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.
Please do, it makes the purpose much more clear
lib/Flux/SessionData.php
Outdated
$_POST['recaptcha_response_field']); | ||
|
||
if (!$resp->is_valid) { | ||
$response; |
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.
Same as above, does this have a purpose, or is it intended to be $response = false;
or something similar?
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.
This is the same as above but for the login captcha.
Merged branch master into master Updated Google reCaptcha V1 to Google reCaptcha V2 Updated Google reCaptcha V1 to Google reCaptcha V2 Updated Google reCaptcha V1 to Google reCaptcha V2 Updated Google reCaptcha V1 to Google reCaptcha V2 Updated ReCaptchaTheme for Google reCaptcha V2
Alright, done with the changes. Any advice on how to avoid the commit spam? I tried squashing them using my git client but they still show up on github. Also, I don't know why it's adding and readding lines to commits. It makes reviewing changes a real pain. =/ Edit: Fixed the newline issue. This shouldn't be a problem anymore. Had to do with a package in atom.io |
To squash, I do the following. It assumes that you have two remotes:
But don't worry about it now, I can just squash them from the GitHub UI while merging. For the newline issue: yeah, it's mostly the FluxCP codebase's fault though. The original author had their text editor severely misconfigured, and was leaving a mess of trailing whitespace on empty lines. |
Awesome, thanks for the tip! Are there any other changes that need made? Would you like me to host a copy of FluxCP with this working before pulling? |
I've updated Google reCaptcha V1 to Google reCaptcha V2. I also updated recaptchalib.php to the latest version: https://github.com/google/recaptcha/blob/1.0.0/php/recaptchalib.php
As you can see, I kinda messed up and ended up with a ton of commits. Sorry about that.