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

fix: don't apply recaptcha requirements when it's not configured #48

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

davwheat
Copy link
Member

Fixes #47

Changes proposed in this pull request:

This prevents ReCaptcha code from attempting to load, and prevents backend validation, when ReCaptcha isn't configured.

(God I'm rusty at this... let me know what I've inevitably missed!)

Reviewers should focus on:

Screenshot

With config:

image

Without config:

image
image

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).

@davwheat davwheat requested a review from imorland February 20, 2024 00:31
@dsevillamartin
Copy link
Member

(God I'm rusty at this... let me know what I've inevitably missed!)

Mood lol.

We might want to strip the settings of whitespace as well. Since the fields are required, users might set them to to bypass that.

@davwheat
Copy link
Member Author

True, though I have no idea why someone would purposely bypass this...

Copy link
Member

@imorland imorland left a comment

Choose a reason for hiding this comment

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

Great enhancement here @davwheat nice one :)

@davwheat davwheat merged commit 5cd2e41 into master Feb 21, 2024
14 checks passed
@davwheat davwheat deleted the fix/47 branch February 21, 2024 16:14
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.

recaptcha should be disabled unless extension has been properly configured
4 participants