mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix an utf8 error in auth code
This commit is contained in:
1 file changed
+1
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user