Skip to content

Commit b647da0

Browse files
danistrigaromantonovic
authored andcommitted
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
1 parent 9f8648b commit b647da0

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

application_walib.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ def executeWa(environ, start_response):
8888
# Passing the basic authentication header in waEnviron
8989
# Shall be used in istSOS lib request from walib
9090
if 'HTTP_AUTHORIZATION' in environ:
91-
print("AUTH")
92-
waEnviron['HTTP_AUTHORIZATION'] = str(len(environ['HTTP_AUTHORIZATION']))
93-
print("AUTH OK")
91+
waEnviron['HTTP_AUTHORIZATION'] = str(environ['HTTP_AUTHORIZATION'])
9492
try:
9593

9694
try:
@@ -194,4 +192,4 @@ def executeWa(environ, start_response):
194192
start_response(wsgi_status, wsgi_headers)
195193
print(sys.version, sys.executable)
196194

197-
return [wsgi_response.encode()]
195+
return [wsgi_response.encode()]

walib/users.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def getUser(environ):
4343
)
4444
raise ie
4545
s, base64string = environ['HTTP_AUTHORIZATION'].split()
46-
print('AUTH: ', base64string)
4746
username, password = base64.b64decode(base64string).decode().split(':')
4847
passwordFile = path.join(config.services_path, "istsos.passwd")
4948
with open(passwordFile, 'rb') as f:
@@ -164,4 +163,4 @@ def executeGet(self):
164163
class waUserUnauthorized(resource.waResource):
165164
def executeGet(self):
166165
self.setException(
167-
"Sorry, you are not authorized to execute this request.")
166+
"Sorry, you are not authorized to execute this request.")

0 commit comments

Comments
 (0)