Skip to content

Commit

Permalink
Removing the email regex because it's susceptible to DoS (see https:/…
Browse files Browse the repository at this point in the history
  • Loading branch information
asweigart committed Jul 20, 2022
1 parent 089bf80 commit 56f74a8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/ezgmail/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
from httplib2 import Http
from oauth2client import file, client, tools

# Copied from https://emailregex.com/:
EMAIL_ADDRESS_REGEX = re.compile(r'''(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])''')

# SCOPES = 'https://www.googleapis.com/auth/gmail.readonly' # read-only mode
SCOPES = "https://mail.google.com/" # read-write mode
SERVICE_GMAIL = None
Expand Down

0 comments on commit 56f74a8

Please sign in to comment.