🐛 Convert decoded header to unicode

See #3382
This commit is contained in:
Gina Häußge committed 2019-12-11 10:28:32 +01:00
1 parent 5d1ad5d75d
commit 9f85b54681
1 file changed
+2 -2
+2 -2
View File
@@ -13,7 +13,7 @@ from octoprint.settings import settings
import octoprint.timelapse
import octoprint.server
from octoprint.util import deprecated
from octoprint.util import deprecated, to_unicode
from octoprint.plugin import plugin_manager
import flask as _flask
@@ -233,7 +233,7 @@ def get_user_for_authorization_header(header):
header = header.replace('Basic ', '', 1)
try:
header = base64.b64decode(header)
header = to_unicode(base64.b64decode(header))
except TypeError:
return None