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

There is no nice way to blacklist for all caps patterns #1

Closed
Yalfoosh opened this issue Nov 27, 2021 · 1 comment
Closed

There is no nice way to blacklist for all caps patterns #1

Yalfoosh opened this issue Nov 27, 2021 · 1 comment

Comments

@Yalfoosh
Copy link

Currently, the mail filter works as intended - it filters using regular expressions and it does it well. However, users may sometimes try to evade blacklists because the extension correctly assumes that the pattern written in some casing corresponds exactly to that casing when validations. This is a fine assumption but might not be ideal because Flarum already considers e-mails case-insensitive, meaning something like [email protected] is the same as [email protected]. The extension, however, doesn't assume this, and if you have a deleted users and a blacklist filter in place, they can bypass it by changing the filter.

For whitelisting purposes, this is fine, because users can just type in a correct mail and that is that. However, for blacklisting purposes, it might be smarter to enable at least a flag which enables case insensitive matching - meaning that before mail validation, if such flag is set, the email to be checked is lowercased before the check is ran.

Currently it seems to me that the only way is to manually specify that it is case insensitive with a pattern like [Aa][Bb]12345\@mail\.com$, but it would probably be better if you could apply this to exact blacklists and whitelists (non-pattern ones) to save on processing time and make the process a bit more straightforward and noob-proof.

@dizys
Copy link
Contributor

dizys commented Apr 15, 2022

Sorry for getting back to you late, was caught up with all my schoolwork.
Thank you, this is a very valid point. Please checkout version 1.0.6, it should now be case insensitive on blacklists.

@dizys dizys closed this as completed Apr 26, 2022
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

No branches or pull requests

2 participants