Skip to content

Commit a84d66c

Browse files
committed
added digit check to prevent forced 4-digit year evaluation
1 parent 91e6a58 commit a84d66c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/email/_parseaddr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def _parsedate_tz(data):
149149
# calls for a two-digit yy, but RFC 2822 (which obsoletes RFC 822)
150150
# mandates a 4-digit yy. For more information, see the documentation for
151151
# the time module.
152-
if yy < 100:
152+
if len(str(yy)) >= 2 and yy < 100:
153153
# The year is between 1969 and 1999 (inclusive).
154154
if yy > 68:
155155
yy += 1900

0 commit comments

Comments
 (0)