diff --git a/plinth/__main__.py b/plinth/__main__.py index c97ba4d37..8fb8c3d3a 100644 --- a/plinth/__main__.py +++ b/plinth/__main__.py @@ -244,6 +244,7 @@ def configure_django(): CACHES={'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}}, CAPTCHA_FONT_PATH=['/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf'], + CAPTCHA_LENGTH=6, DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': cfg.store_file}}, diff --git a/plinth/modules/sso/views.py b/plinth/modules/sso/views.py index 57ecba6fb..c9615c289 100644 --- a/plinth/modules/sso/views.py +++ b/plinth/modules/sso/views.py @@ -62,7 +62,8 @@ class SSOLoginView(LoginView): if request.user.is_authenticated: return set_ticket_cookie(request.user, response) else: # Redirect user to captcha page - return HttpResponseRedirect('captcha') + redirect = '' if request.path.rstrip('/').endswith('captcha') else 'captcha' + return HttpResponseRedirect(redirect) return response