Skip to content
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

[fixmystreet.com] Add option for recaptcha. #3050

Merged
merged 2 commits into from Jun 9, 2020
Merged

[fixmystreet.com] Add option for recaptcha. #3050

merged 2 commits into from Jun 9, 2020

Conversation

dracos
Copy link
Member

@dracos dracos commented Jun 1, 2020

This shows a recaptcha to logged out users from non-UK IP addresses on alert and report/update forms. For https://github.com/mysociety/sysadmin/issues/1302.

@dracos dracos requested review from chrismytton and sagepe June 1, 2020 10:30
@codecov
Copy link

codecov bot commented Jun 1, 2020

Codecov Report

Merging #3050 into master will increase coverage by 0.00%.
The diff coverage is 85.71%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3050   +/-   ##
=======================================
  Coverage   83.13%   83.14%           
=======================================
  Files         246      246           
  Lines       15430    15451   +21     
  Branches     2879     2886    +7     
=======================================
+ Hits        12827    12846   +19     
  Misses       1690     1690           
- Partials      913      915    +2     
Impacted Files Coverage Δ
perllib/FixMyStreet/Gaze.pm 40.00% <66.66%> (+6.66%) ⬆️
perllib/FixMyStreet/Cobrand/UK.pm 75.26% <86.66%> (+0.97%) ⬆️
perllib/FixMyStreet/App.pm 87.91% <100.00%> (+0.16%) ⬆️
perllib/FixMyStreet/App/Controller/Auth.pm 84.32% <100.00%> (+0.05%) ⬆️
perllib/Utils.pm 98.98% <0.00%> (+1.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8859e2...766f0ed. Read the comment docs.

Copy link
Member

@chrismytton chrismytton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looking good!

Would it be possible to add a test to check that the <div class="g-recaptcha" /> element is on the page when the user's IP is non-GB?

Can we also add some documentation for RECAPTCHA config? I tried to get this working but wasn't sure what config I needed or where to get it from?

Would also be good to add a changelog entry for this 🙂

@chrismytton
Copy link
Member

chrismytton commented Jun 3, 2020

Oh and there are quite a few red crosses in the checks section. Would be good to reduce those a bit!

We are getting spam submissions of e.g. alert subscribe form,
which causes people to get a confirmation email.
Copy link
Member

@chrismytton chrismytton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩

Copy link
Member

@sagepe sagepe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎸

@dracos dracos merged commit d363f51 into master Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants