Skip to content

Commit

Permalink
Basic http auth not allowed for os auth provider.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiarn committed Jan 31, 2023
1 parent ce72a85 commit a663fec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ajenti-core/aj/gate/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ def handle(self, http_context):
authresp = False

try:
username,pw = base64.b64decode(authorization_header.replace('Basic ', '')).decode().split(':')
authresp = AuthenticationService.get(self.context).get_provider().authenticate(username, pw)
auth_provider = AuthenticationService.get(self.context).get_provider()
if auth_provider.id != 'os':
username,pw = base64.b64decode(authorization_header.replace('Basic ', '')).decode().split(':')
authresp = auth_provider.authenticate(username, pw)
except Exception as e:
pass

Expand Down

0 comments on commit a663fec

Please sign in to comment.