From 253386b0a538c163bbd5ec8cd831a8fe7d7e4ff7 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 26 Mar 2023 18:27:43 +0200 Subject: [PATCH] Bugfix parse ldap server config --- cps/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cps/admin.py b/cps/admin.py index 1bd012a4..20c58aac 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -1173,7 +1173,8 @@ def _configuration_ldap_helper(to_save): reboot_required |= _config_string(to_save, "config_ldap_key_path") _config_string(to_save, "config_ldap_group_name") - to_save["config_ldap_provider_url"] = urlparse(to_save.get("config_ldap_provider_url","")).hostname or "" + address = urlparse(to_save.get("config_ldap_provider_url", "")) + to_save["config_ldap_provider_url"] = (address.hostname or address.path).strip("/") reboot_required |= _config_string(to_save, "config_ldap_provider_url") if to_save.get("config_ldap_serv_password_e", "") != "":