From 75b338b549dd576b695031427e9e9b57550f0b4d Mon Sep 17 00:00:00 2001 From: Maria Khrustaleva Date: Wed, 28 Dec 2022 22:23:26 +0200 Subject: [PATCH] Fix vulnerability (#5521) --- CHANGELOG.md | 2 +- cvat/apps/engine/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf82b1b..cb2098b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Helm: Empty password for Redis () ### Security -- TDB +- Fixed vulnerability with social authentication () ## \[2.3.0] - 2022-12-22 ### Added diff --git a/cvat/apps/engine/views.py b/cvat/apps/engine/views.py index 0c607e7f..aa3ecd14 100644 --- a/cvat/apps/engine/views.py +++ b/cvat/apps/engine/views.py @@ -251,12 +251,12 @@ class ServerViewSet(viewsets.ViewSet): def advanced_authentication(request): use_social_auth = settings.USE_ALLAUTH_SOCIAL_ACCOUNTS integrated_auth_providers = settings.SOCIALACCOUNT_PROVIDERS.keys() if use_social_auth else [] - google_auth_is_enabled = ( + google_auth_is_enabled = bool( 'google' in integrated_auth_providers and settings.SOCIAL_AUTH_GOOGLE_CLIENT_ID and settings.SOCIAL_AUTH_GOOGLE_CLIENT_SECRET ) - github_auth_is_enabled = ( + github_auth_is_enabled = bool( 'github' in integrated_auth_providers and settings.SOCIAL_AUTH_GITHUB_CLIENT_ID and settings.SOCIAL_AUTH_GITHUB_CLIENT_SECRET