Skip to content

ADD ReCaptcha feature for anonymous User#682

Merged
souravbadami merged 2 commits intoOWASP-BLT:masterfrom
ankit2001:recaptcha
Mar 4, 2021
Merged

ADD ReCaptcha feature for anonymous User#682
souravbadami merged 2 commits intoOWASP-BLT:masterfrom
ankit2001:recaptcha

Conversation

@ankit2001
Copy link
Copy Markdown
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.

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
Copy Markdown
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
Copy Markdown
Collaborator

@ankit2001 - Left a comment, otherwise LGTM!

@ankit2001
Copy link
Copy Markdown
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
Copy Markdown
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