From 2bd14bf1138d378a22c5f872c35a53e140654064 Mon Sep 17 00:00:00 2001 From: diegolamaral Date: Wed, 18 Sep 2024 13:08:50 +0000 Subject: [PATCH] Set the custom logout URL if OIDC_LOGOUT_URL is defined --- core/files/configure_misp.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/files/configure_misp.sh b/core/files/configure_misp.sh index 94294d6..3c1ca02 100755 --- a/core/files/configure_misp.sh +++ b/core/files/configure_misp.sh @@ -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