Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion providers/fab/src/airflow/providers/fab/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def index(self):
if g.user is not None and g.user.is_authenticated:
token = get_auth_manager().generate_jwt(g.user)
response = make_response(redirect(f"{conf.get('api', 'base_url')}", code=302))
response.set_cookie(COOKIE_NAME_JWT_TOKEN, token, secure=True)

secure = bool(conf.get("api", "ssl_cert"))
response.set_cookie(COOKIE_NAME_JWT_TOKEN, token, secure=secure)

Check warning

Code scanning / CodeQL

Failure to use secure cookies

Cookie is added without the HttpOnly attribute properly set.
Comment thread
pierrejeambrun marked this conversation as resolved.

return response
else:
Expand Down