FriendsOfFlarum / recaptcha

Increase your forum's security with Google reCAPTCHA
https://discuss.flarum.org/d/18399
MIT License
13 stars 11 forks source link

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

Closed davwheat closed 9 months ago

davwheat commented 9 months ago

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

dsevillamartin commented 9 months ago

(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 commented 9 months ago

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