Skip to content

Commit

Permalink
safari detection was fairly useless
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Nov 22, 2022
1 parent b9ed936 commit 2adfd9b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions clam/clamservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,7 @@ def GET(credentials = None):
if not settings.OAUTH:
return withheaders(flask.make_response("You will be properly logged out only after closing your browser session",403),"text/plain",headers={'allow_origin': settings.ALLOW_ORIGIN, 'Clear-Site-Data': '"cache", "cookies", "storage", "executionContexts"' })
elif not settings.OAUTH_REVOKE_URL:
if 'Safari' in flask.request.headers.get('User-Agent'):
return withheaders(flask.make_response("Safari does not support logging out, and no key revocation mechanism was defined at the remote end. Please clear your browser cookies and cache manually if you are on a public computer.",403),"text/plain",headers={'allow_origin': settings.ALLOW_ORIGIN, 'Clear-Site-Data': '"cache", "cookies", "storage", "executionContexts"' })
else:
return withheaders(flask.make_response("Logged you out locally, (however, no key revocation mechanism was defined at the remote end)",403),"text/plain",headers={'allow_origin': settings.ALLOW_ORIGIN, 'Clear-Site-Data': '"cache", "cookies", "storage", "executionContexts"' })
return withheaders(flask.make_response("Logged you out locally (however, no key revocation mechanism was defined at the remote end)",403),"text/plain",headers={'allow_origin': settings.ALLOW_ORIGIN, 'Clear-Site-Data': '"cache", "cookies", "storage", "executionContexts"' })
else:
response = requests.get(settings.OAUTH_REVOKE_URL + '/', data={'token': oauth_access_token })

Expand Down

0 comments on commit 2adfd9b

Please sign in to comment.