From b647da053739e57131209959924fcb40ef8dceea Mon Sep 17 00:00:00 2001 From: Daniele Strigaro Date: Wed, 11 Dec 2019 17:57:54 +0100 Subject: [PATCH] FIxed http_auth (#42) * spatialFilter bug fixed * bug fixed - removed brackets in queries with UNION operator * bug fixed * bug fixed * fixed issue in upating FOI * update fastInsert * fixed auth issue --- application_walib.py | 6 ++---- walib/users.py | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/application_walib.py b/application_walib.py index c07bf091..a8c94f6c 100755 --- a/application_walib.py +++ b/application_walib.py @@ -88,9 +88,7 @@ def executeWa(environ, start_response): # Passing the basic authentication header in waEnviron # Shall be used in istSOS lib request from walib if 'HTTP_AUTHORIZATION' in environ: - print("AUTH") - waEnviron['HTTP_AUTHORIZATION'] = str(len(environ['HTTP_AUTHORIZATION'])) - print("AUTH OK") + waEnviron['HTTP_AUTHORIZATION'] = str(environ['HTTP_AUTHORIZATION']) try: try: @@ -194,4 +192,4 @@ def executeWa(environ, start_response): start_response(wsgi_status, wsgi_headers) print(sys.version, sys.executable) - return [wsgi_response.encode()] \ No newline at end of file + return [wsgi_response.encode()] diff --git a/walib/users.py b/walib/users.py index aef53763..c7c45b09 100755 --- a/walib/users.py +++ b/walib/users.py @@ -43,7 +43,6 @@ def getUser(environ): ) raise ie s, base64string = environ['HTTP_AUTHORIZATION'].split() - print('AUTH: ', base64string) username, password = base64.b64decode(base64string).decode().split(':') passwordFile = path.join(config.services_path, "istsos.passwd") with open(passwordFile, 'rb') as f: @@ -164,4 +163,4 @@ def executeGet(self): class waUserUnauthorized(resource.waResource): def executeGet(self): self.setException( - "Sorry, you are not authorized to execute this request.") \ No newline at end of file + "Sorry, you are not authorized to execute this request.")