We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84f283a commit 25c9f0fCopy full SHA for 25c9f0f
wes_service/arvados_wes.py
@@ -24,8 +24,9 @@ def get_api(authtoken=None):
24
if not connexion.request.headers.get('Authorization'):
25
raise MissingAuthorization()
26
authtoken = connexion.request.headers['Authorization']
27
- if authtoken.startswith("Bearer ") or authtoken.startswith("OAuth2 "):
28
- authtoken = authtoken[7:]
+ if not authtoken.startswith("Bearer ") or authtoken.startswith("OAuth2 "):
+ raise ValueError("Authorization token must start with 'Bearer '")
29
+ authtoken = authtoken[7:]
30
return arvados.api_from_config(version="v1", apiconfig={
31
"ARVADOS_API_HOST": os.environ["ARVADOS_API_HOST"],
32
"ARVADOS_API_TOKEN": authtoken,
0 commit comments