diff --git a/ssoauth/checks.py b/ssoauth/checks.py index 02844199a7ad79870ca52a55ee9e6f89dd31ea35..acf1d300400ca0204cdbf1e9105a3b211aee7f33 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