Set the custom logout URL if OIDC_LOGOUT_URL is defined

pull/148/head
diegolamaral 2024-09-18 13:08:50 +00:00
parent 65d145e9b8
commit 2bd14bf113
1 changed files with 6 additions and 2 deletions

View File

@ -103,8 +103,12 @@ set_up_oidc() {
}
}" > /dev/null
# Set the custom logout URL for the OIDC plugin
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Plugin.CustomAuth_custom_logout" "${OIDC_LOGOUT_URL}&post_logout_redirect_uri=${BASE_URL}/users/login"
# Set the custom logout URL for the OIDC plugin only if OIDC_LOGOUT_URL is defined
if [[ -n "${OIDC_LOGOUT_URL}" ]]; then
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Plugin.CustomAuth_custom_logout" "${OIDC_LOGOUT_URL}&post_logout_redirect_uri=${BASE_URL}/users/login"
else
echo "OIDC_LOGOUT_URL is not set"
fi
# Disable password confirmation as stated at https://github.com/MISP/MISP/issues/8116
sudo -u www-data /var/www/MISP/app/Console/cake Admin setSetting -q "Security.require_password_confirmation" false