From e1ae80583f29838848f2ee1f43b41ecc98394968 Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Thu, 4 Mar 2021 08:00:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20Change=20escape=20character=20fo?= =?UTF-8?q?r=20LDAP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mathieu.brunot --- backend/src/app/config.clj | 2 +- backend/src/app/rpc/mutations/ldap.clj | 2 +- docs/05-Configuration-Guide.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/app/config.clj b/backend/src/app/config.clj index a4f8a0817..aff4989a0 100644 --- a/backend/src/app/config.clj +++ b/backend/src/app/config.clj @@ -70,7 +70,7 @@ :telemetry-enabled false :telemetry-uri "https://telemetry.penpot.app/" - :ldap-user-query "(|(uid=$username)(mail=$username))" + :ldap-user-query "(|(uid=:username)(mail=:username))" :ldap-attrs-username "uid" :ldap-attrs-email "mail" :ldap-attrs-fullname "cn" diff --git a/backend/src/app/rpc/mutations/ldap.clj b/backend/src/app/rpc/mutations/ldap.clj index 704e49a2d..2c01ba34c 100644 --- a/backend/src/app/rpc/mutations/ldap.clj +++ b/backend/src/app/rpc/mutations/ldap.clj @@ -84,7 +84,7 @@ (defn- get-ldap-user [cpool {:keys [email] :as params}] (let [query (-> (cfg/get :ldap-user-query) - (replace-several "$username" email)) + (replace-several ":username" email)) attrs [(cfg/get :ldap-attrs-username) (cfg/get :ldap-attrs-email) diff --git a/docs/05-Configuration-Guide.md b/docs/05-Configuration-Guide.md index 946c06f72..72970c69d 100644 --- a/docs/05-Configuration-Guide.md +++ b/docs/05-Configuration-Guide.md @@ -176,7 +176,7 @@ PENPOT_LDAP_BIND_PASSWORD= PENPOT_LDAP_AUTH_SSL=false PENPOT_LDAP_AUTH_STARTTLS=false PENPOT_LDAP_AUTH_BASE_DN= -PENPOT_LDAP_AUTH_USER_QUERY=(|(uid=$username)(mail=$username)) +PENPOT_LDAP_AUTH_USER_QUERY=(|(uid=:username)(mail=:username)) PENPOT_LDAP_AUTH_USERNAME_ATTRIBUTE=uid PENPOT_LDAP_AUTH_EMAIL_ATTRIBUTE=mail PENPOT_LDAP_AUTH_FULLNAME_ATTRIBUTE=displayName