summaryrefslogtreecommitdiff
path: root/Lib/email/headerregistry.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-03-12 11:15:15 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-03-12 11:15:15 +0200
commitaef79164ae10e13c882ce2e10905809d16b85b09 (patch)
tree3ade3038667a84bfc33976d288b2edd951246b25 /Lib/email/headerregistry.py
parentf52cb397c583d106875f30d61ed323e50f18a389 (diff)
parent3d12c5b8e36f281af3dda150def4e1eb7a3b3269 (diff)
downloadcpython-aef79164ae10e13c882ce2e10905809d16b85b09.tar.gz
Issue #22928: Disabled HTTP header injections in http.client.
Original patch by Demian Brecht.
Diffstat (limited to 'Lib/email/headerregistry.py')
-rw-r--r--Lib/email/headerregistry.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/email/headerregistry.py b/Lib/email/headerregistry.py
index 911a2afea7..468ca9e3a0 100644
--- a/Lib/email/headerregistry.py
+++ b/Lib/email/headerregistry.py
@@ -81,7 +81,8 @@ class Address:
return lp
def __repr__(self):
- return "Address(display_name={!r}, username={!r}, domain={!r})".format(
+ return "{}(display_name={!r}, username={!r}, domain={!r})".format(
+ self.__class__.__name__,
self.display_name, self.username, self.domain)
def __str__(self):
@@ -132,7 +133,8 @@ class Group:
return self._addresses
def __repr__(self):
- return "Group(display_name={!r}, addresses={!r}".format(
+ return "{}(display_name={!r}, addresses={!r}".format(
+ self.__class__.__name__,
self.display_name, self.addresses)
def __str__(self):