Fix an utf8 error in auth code

This commit is contained in:
Julien Duponchelle committed 2017-03-27 10:38:41 +02:00
1 parent 80e361ff2e
commit ac05db5d1b
1 file changed
+1 -2
+1 -2
View File
@@ -21,7 +21,6 @@ import urllib
import asyncio
import aiohttp
import logging
import urllib
import traceback
import jsonschema
@@ -114,7 +113,7 @@ class Route(object):
return
if "AUTHORIZATION" in request.headers:
if request.headers["AUTHORIZATION"] == aiohttp.helpers.BasicAuth(user, password).encode():
if request.headers["AUTHORIZATION"] == aiohttp.helpers.BasicAuth(user, password, "utf-8").encode():
return
log.error("Invalid auth. Username should %s", user)