Skip to content

Commit

Permalink
馃悰 Convert decoded header to unicode
Browse files Browse the repository at this point in the history
See #3382
  • Loading branch information
foosel committed Dec 11, 2019
1 parent 5d1ad5d commit 9f85b54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/octoprint/server/util/__init__.py
Expand Up @@ -13,7 +13,7 @@
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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 9f85b54

Please sign in to comment.