Skip to content

feat(security): Block abusive email patterns #10152

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

Merged
merged 1 commit into from
Oct 16, 2018
Merged

Conversation

dcramer
Copy link
Member

@dcramer dcramer commented Oct 16, 2018

We're seeing a lot of junk signups from \d@qq.com so this is a simply quick fix to make a configurable pattern match on blocking email addresses.

It's not the be-all-end-all, but it prevents this simplistic attack. We'll likely also want to restore captcha in some cases in the future, but thats going to be a much more complex feature.

@dcramer
Copy link
Member Author

dcramer commented Oct 16, 2018

cc @adhiraj

@@ -1377,3 +1378,6 @@ def get_raven_config():
JS_SDK_LOADER_SDK_VERSION = ''
# This should be the url pointing to the JS SDK
JS_SDK_LOADER_DEFAULT_SDK_URL = ''

# too much junk happening from bots, lets kill things that clearly shouldn't be humans
INVALID_EMAIL_ADDRESS_PATTERN = re.compile(r'^\d\@qq\.com$', re.I)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
INVALID_EMAIL_ADDRESS_PATTERN = re.compile(r'^\d\@qq\.com$', re.I)
INVALID_EMAIL_ADDRESS_PATTERN = re.compile(r'^\d+\@qq\.com$', re.I)

I think you want this, otherwise it won't work for anything I've seen.

@dcramer dcramer force-pushed the feat/email-blocklist branch from 2521824 to 3c1719e Compare October 16, 2018 21:58
@dcramer
Copy link
Member Author

dcramer commented Oct 16, 2018

Its VERY possible this will block legit email addresses, but clealry people are also using this for abuse, so Im ok with that.

https://www.reddit.com/r/todayilearned/comments/3xpeaf/til_that_many_chinese_people_use_phonenumber/

@dcramer
Copy link
Member Author

dcramer commented Oct 16, 2018

I'm also ok if we block qq.com entirely.

Copy link
Contributor

@mattrobenolt mattrobenolt left a comment

Choose a reason for hiding this comment

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

🔨

@dcramer dcramer force-pushed the feat/email-blocklist branch from 3c1719e to b03122c Compare October 16, 2018 23:07
We're seeing a lot of junk signups from \d@qq.com so this is a simply quick fix to make a configurable pattern match on blocking email addresses.

It's not the be-all-end-all, but it prevents this simplistic attack. We'll likely also want to restore captcha in some cases in the future, but thats going to be a much more complex feature.
@dcramer dcramer force-pushed the feat/email-blocklist branch from b03122c to a0d9292 Compare October 16, 2018 23:24
@dcramer dcramer merged commit 6ad37e7 into master Oct 16, 2018
@dcramer dcramer deleted the feat/email-blocklist branch October 16, 2018 23:45
@markstory
Copy link
Member

👍 to banning qq.com it is generally a spam fountain.

wedamija added a commit that referenced this pull request Jan 10, 2019
Fixes a bug in #10152, so that we actually block invalid email addresses.
wedamija added a commit that referenced this pull request Jan 10, 2019
Fixes a bug in #10152, so that we actually block invalid email addresses.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants