From ac05db5d1b9c2916d55db4e751a4d19abca9f91b Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 27 Mar 2017 10:38:41 +0200 Subject: [PATCH] Fix an utf8 error in auth code --- gns3server/web/route.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gns3server/web/route.py b/gns3server/web/route.py index 3f5a153c..7c06952b 100644 --- a/gns3server/web/route.py +++ b/gns3server/web/route.py @@ -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)