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

Null email address causes Null Pointer exception #46

Merged
merged 2 commits into from
Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/Email/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ def _convert_email_uri(email):
to create a URI that contains an email address that, when submitted to a
server, will not be replaced with a space character.
"""
if "+" in email:
return email.replace("+", "%2B")
else:
return email
if email is not None:
if "+" in email:
return email.replace("+", "%2B")

return email
5 changes: 4 additions & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
app = Flask(__name__)

# Application version (major,minor,patch-level)
version = "1.1.4"
version = "1.1.5"

"""
Change Log

1.1.5 Refactor _convert_email_uri(email) to properly handle a null
email address.

1.1.4 Add code to convert plus signs located the the username portion
of an email address to a '%2B'when the email address is embedded
in a URL.
Expand Down