From cfa4ff1c5237a828580354f0c4984010ae997264 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 20 Jul 2025 18:42:47 -0400 Subject: [PATCH] Fix krb5_name escape issue --- nginx_krbauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx_krbauth.py b/nginx_krbauth.py index 15adc28..6d10023 100644 --- a/nginx_krbauth.py +++ b/nginx_krbauth.py @@ -142,7 +142,7 @@ def auth_spnego(context: Context, next_url: str) -> Response: ldap_ctx.bind_s(LDAP_BIND_DN, LDAP_BIND_AUTHTOK, ldap.AUTH_SIMPLE) ldap_filter = '(&(memberOf=%s)(krbPrincipalName=%s))' % ( escape_filter_chars(context.ldap_group), - escape_filter_chars(krb5_name), + escape_filter_chars(str(krb5_name)), ) result = ldap_ctx.search_s(LDAP_SEARCH_BASE, ldap.SCOPE_SUBTREE, ldap_filter, ['cn']) if not result: