From 2edbe1b61c7ace0a13f0d7242f333982a6fc9fde Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 20 Oct 2013 16:20:23 -0400 Subject: add a note so we can defend the choice later --- pyramid/authentication.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- cgit v1.2.3