Skip to content

Commit 317558d

Browse files
authored
Merge pull request #46 from zfi/master
Null email address causes Null Pointer exception
2 parents 5fe8a17 + 22a7668 commit 317558d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

app/Email/services.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ def _convert_email_uri(email):
211211
to create a URI that contains an email address that, when submitted to a
212212
server, will not be replaced with a space character.
213213
"""
214-
if "+" in email:
215-
return email.replace("+", "%2B")
216-
else:
217-
return email
214+
if email is not None:
215+
if "+" in email:
216+
return email.replace("+", "%2B")
217+
218+
return email

app/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@
2424
app = Flask(__name__)
2525

2626
# Application version (major,minor,patch-level)
27-
version = "1.1.4"
27+
version = "1.1.5"
2828

2929
"""
3030
Change Log
3131
32+
1.1.5 Refactor _convert_email_uri(email) to properly handle a null
33+
email address.
34+
3235
1.1.4 Add code to convert plus signs located the the username portion
3336
of an email address to a '%2B'when the email address is embedded
3437
in a URL.

0 commit comments

Comments
 (0)