mirror of
https://github.com/quantum5/nginx-krbauth.git
synced 2025-08-02 22:08:16 -04:00
Fix krb5_name escape issue
This commit is contained in:
parent
b9d6630b1a
commit
cfa4ff1c52
|
@ -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_ctx.bind_s(LDAP_BIND_DN, LDAP_BIND_AUTHTOK, ldap.AUTH_SIMPLE)
|
||||||
ldap_filter = '(&(memberOf=%s)(krbPrincipalName=%s))' % (
|
ldap_filter = '(&(memberOf=%s)(krbPrincipalName=%s))' % (
|
||||||
escape_filter_chars(context.ldap_group),
|
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'])
|
result = ldap_ctx.search_s(LDAP_SEARCH_BASE, ldap.SCOPE_SUBTREE, ldap_filter, ['cn'])
|
||||||
if not result:
|
if not result:
|
||||||
|
|
Loading…
Reference in a new issue