summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2013-10-20 16:20:23 -0400
committerChris McDonough <chrism@plope.com>2013-10-20 16:20:23 -0400
commit2edbe1b61c7ace0a13f0d7242f333982a6fc9fde (patch)
tree40dddffc20140d6fef7b2d1882157dd572ca4c10
parent5688b6e76ba8059826ba6ff756b3e94b311320d2 (diff)
downloadpyramid-2edbe1b61c7ace0a13f0d7242f333982a6fc9fde.tar.gz
pyramid-2edbe1b61c7ace0a13f0d7242f333982a6fc9fde.tar.bz2
pyramid-2edbe1b61c7ace0a13f0d7242f333982a6fc9fde.zip
add a note so we can defend the choice later
-rw-r--r--pyramid/authentication.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyramid/authentication.py b/pyramid/authentication.py
index ec8ac0a41..2c301bd29 100644
--- a/pyramid/authentication.py
+++ b/pyramid/authentication.py
@@ -1184,6 +1184,8 @@ class BasicAuthAuthenticationPolicy(CallbackAuthenticationPolicy):
except (TypeError, binascii.Error): # can't decode
return None
+ # try utf-8 first, then latin-1; see discussion in
+ # https://github.com/Pylons/pyramid/issues/898
try:
auth = authbytes.decode('utf-8')
except UnicodeDecodeError: