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

ADD ReCaptcha feature for anonymous User #682

Merged
merged 2 commits into from
Mar 4, 2021

Conversation

ankit2001
Copy link
Contributor

@ankit2001 ankit2001 commented Mar 1, 2021

This PR aims to add captcha feature and fixing the issue #681 .
You can make your own secret and site key for captcha by registering on https://www.google.com/recaptcha/admin/create
and add them in .env file or replace with the keys described in settings.py, also i have added default key for testing.

Below are the some results of the added feature.

If Captcha is not configured.

Screenshot 2021-03-01 at 7 41 04 PM

The output of request

Screenshot 2021-03-01 at 7 42 27 PM

If Captcha is Configured.

Screenshot 2021-03-01 at 7 44 57 PM

The output of request

Screenshot 2021-03-01 at 7 45 20 PM

Please review it @fredfalcon , @souravbadami , @srahulbadami and suggest me changes if needed.
Thanks.

@@ -386,3 +386,6 @@
STRIPE_TEST_PUBLIC_KEY = os.environ.get("STRIPE_TEST_PUBLIC_KEY", "pk_test_51HFiXMFf0OkkOVnDkNs4opFLqM0Sx5GA6Pedf63uGzG1gHhumFYHEOLfCA7yzZwXUpjaa5j9ZhS1yciNhouYCMh400pSx5ZEx6")
STRIPE_TEST_SECRET_KEY = os.environ.get("STRIPE_TEST_SECRET_KEY", "sk_test_51HFiXMFf0OkkOVnDiAnuYiq6JInx3VSXw2HzIV6ihGWzaO8un5djIi990OCLTAv5PRnY7Yl8v8yuxf6yU47gvKYj00hkKaKaQ0")
STRIPE_LIVE_MODE = False # Change to True in production

GOOGLE_RECAPTCHA_SECRET_KEY = env('GOOGLE_RECAPTCHA_SECRET_KEY', default="6LeV4GwaAAAAAC3AluQ3i3GgAv7XHA2EhK9sAkgi")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these dummy values? If not, could you replace it with something like dummy?

@souravbadami
Copy link
Collaborator

@ankit2001 - Left a comment, otherwise LGTM!

@ankit2001
Copy link
Contributor Author

@souravbadami I have done the required changes, please review it, also please register on the link i provided in the first comment and add site and secret key to settings.py to make it work.

@souravbadami souravbadami merged commit 66f7629 into OWASP-BLT:master Mar 4, 2021
@souravbadami
Copy link
Collaborator

LGTM! Thanks @ankit2001.

DonnieBLT pushed a commit that referenced this pull request Aug 12, 2023
ADD ReCaptcha feature for anonymous User
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.

2 participants