From b68ea9194de34255999bd22d2efa319862df057f Mon Sep 17 00:00:00 2001 From: John Nagro Date: Fri, 20 Jan 2023 11:47:15 -0500 Subject: [PATCH] fix: tweak namespace for SSO username generation (#31631) --- common/djangoapps/third_party_auth/settings.py | 2 +- common/djangoapps/third_party_auth/tests/test_pipeline.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/djangoapps/third_party_auth/settings.py b/common/djangoapps/third_party_auth/settings.py index e34d79fa84..20ee8b9935 100644 --- a/common/djangoapps/third_party_auth/settings.py +++ b/common/djangoapps/third_party_auth/settings.py @@ -100,7 +100,7 @@ def apply_settings(django_settings): django_settings.SOCIAL_AUTH_INACTIVE_USER_URL = '/auth/inactive' # Context processors required under Django. - django_settings.SOCIAL_AUTH_UUID_LENGTH = 16 + django_settings.SOCIAL_AUTH_UUID_LENGTH = 6 django_settings.DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors'] += ( 'social_django.context_processors.backends', 'social_django.context_processors.login_redirect', diff --git a/common/djangoapps/third_party_auth/tests/test_pipeline.py b/common/djangoapps/third_party_auth/tests/test_pipeline.py index e03e1df5f4..a8310bf0e7 100644 --- a/common/djangoapps/third_party_auth/tests/test_pipeline.py +++ b/common/djangoapps/third_party_auth/tests/test_pipeline.py @@ -78,7 +78,7 @@ class PipelineOverridesTest(SamlIntegrationTestUtilities, IntegrationTestMixin, ('S.K.', 'S_K', False), ('S.K.', 'S_K_-9fe2', True), ('usernamewithcharacterlengthofmorethan30chars', 'usernamewithcharacterlengthofm', False), - ('usernamewithcharacterlengthofmorethan30chars', 'usernamewithch-9fe2', True), + ('usernamewithcharacterlengthofmorethan30chars', 'usernamewithcharacterlen-9fe2', True), ) @ddt.unpack @mock.patch('common.djangoapps.third_party_auth.pipeline.user_exists')