mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 03:08:14 +00:00
Fix an utf8 error in auth code
This commit is contained in:
parent
80e361ff2e
commit
ac05db5d1b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user