Skip to content

Commit

Permalink
FIxed http_auth (#42)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
danistrigaro authored and mantonovic committed Dec 11, 2019
1 parent 9f8648b commit b647da0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions application_walib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -194,4 +192,4 @@ def executeWa(environ, start_response):
start_response(wsgi_status, wsgi_headers)
print(sys.version, sys.executable)

return [wsgi_response.encode()]
return [wsgi_response.encode()]
3 changes: 1 addition & 2 deletions walib/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.")
"Sorry, you are not authorized to execute this request.")

0 comments on commit b647da0

Please sign in to comment.