From c97862d76fd262ca171f4ab19b9079f4b0230a69 Mon Sep 17 00:00:00 2001 From: Art Lukyanchyk <artiom.lukyanchyk@hs-hannover.de> Date: Wed, 22 Nov 2017 16:26:11 +0100 Subject: [PATCH] Hotfix FORCE_SP_ENTITY_ID error in DEBUG. --- ssoauth/checks.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ssoauth/checks.py b/ssoauth/checks.py index 0284419..acf1d30 100644 --- a/ssoauth/checks.py +++ b/ssoauth/checks.py @@ -55,7 +55,7 @@ def host_without_protocol(app_configs, **kwargs): errors = list() if app_settings.SP_HOST is not None: if app_settings.SP_HOST.lower().startswith(("http:", "https:",)): - errors.append(Error("Bad setting SP_HOST. Need host name without protocol and port.")) + errors.append(Error("Bad setting SP_HOST. Need host name without protocol and port.", obj=conf.settings)) return errors @@ -69,12 +69,12 @@ def old_settings(app_configs, **kwargs): return False errors = list() if settings_have("SSO_DISABLED") or settings_have("SSOAUTH_SSO_DISABLED"): - errors.append(Warning("SSO_DISABLED is deprecated.")) + errors.append(Warning("SSO_DISABLED is deprecated.", obj=conf.settings)) if settings_have("IDP_IGNORE") or settings_have("SSOAUTH_IDP_IGNORE"): - errors.append(Warning("IDP_IGNORE is deprecated.")) + errors.append(Warning("IDP_IGNORE is deprecated.", obj=conf.settings)) if errors: errors.append(Warning("Please check the README. Alternatively simply remove *all* ssoauth settings from your project settings, " - "you don't need them anymore as long as you don't need a working SSO.")) + "you don't need them anymore as long as you don't need a working SSO.", obj=conf.settings)) return errors @@ -84,10 +84,7 @@ def sp_host_is_not_localhost(app_configs, **kwargs): if app_settings.SP_HOST: if app_settings.SP_HOST.lower() in ("localhost", "127.0.0.1", "::1",): if app_settings.SSO_REQUIRED: - errors.append(Error("SP_HOST should not be set to localhost: it breaks SLO, causes entityID collisions and all sorts of nasty stuff.")) - else: - if not app_settings.SP_FORCE_ENTITY_ID: - errors.append(Error("If your SP_HOST is localhost, take care to set a unique SP_FORCE_ENTITY_ID")) + errors.append(Error("SP_HOST should not be set to localhost: it causes entityID collisions, breaks SLO and does all sorts of nasty stuff.", obj=conf.settings)) return errors -- GitLab