Skip to content
Snippets Groups Projects
Commit c97862d7 authored by Art's avatar Art :lizard:
Browse files

Hotfix FORCE_SP_ENTITY_ID error in DEBUG.

parent 58599815
Branches
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ def host_without_protocol(app_configs, **kwargs): ...@@ -55,7 +55,7 @@ def host_without_protocol(app_configs, **kwargs):
errors = list() errors = list()
if app_settings.SP_HOST is not None: if app_settings.SP_HOST is not None:
if app_settings.SP_HOST.lower().startswith(("http:", "https:",)): 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 return errors
...@@ -69,12 +69,12 @@ def old_settings(app_configs, **kwargs): ...@@ -69,12 +69,12 @@ def old_settings(app_configs, **kwargs):
return False return False
errors = list() errors = list()
if settings_have("SSO_DISABLED") or settings_have("SSOAUTH_SSO_DISABLED"): 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"): 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: if errors:
errors.append(Warning("Please check the README. Alternatively simply remove *all* ssoauth settings from your project settings, " 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 return errors
...@@ -84,10 +84,7 @@ def sp_host_is_not_localhost(app_configs, **kwargs): ...@@ -84,10 +84,7 @@ def sp_host_is_not_localhost(app_configs, **kwargs):
if app_settings.SP_HOST: if app_settings.SP_HOST:
if app_settings.SP_HOST.lower() in ("localhost", "127.0.0.1", "::1",): if app_settings.SP_HOST.lower() in ("localhost", "127.0.0.1", "::1",):
if app_settings.SSO_REQUIRED: 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.")) 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))
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"))
return errors return errors
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment