Skip to content

Commit f7786aa

Browse files
committed
Fix another place where a password containing "@" leads to breakage
1 parent 3cdd797 commit f7786aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ngx_http_auth_spnego_module.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,8 @@ ngx_int_t ngx_http_auth_spnego_basic(ngx_http_request_t *r,
10681068

10691069
krb5_free_cred_contents(kcontext, &creds);
10701070
/* Try to add the system realm to $remote_user if needed. */
1071-
if (alcf->fqun && !ngx_strchr(r->headers_in.user.data, '@')) {
1071+
if (alcf->fqun && !ngx_strlchr(r->headers_in.user.data,
1072+
r->headers_in.user.data + r->headers_in.user.len, '@')) {
10721073
#ifdef krb5_princ_realm
10731074
/*
10741075
* MIT does not have krb5_principal_get_realm() but its

0 commit comments

Comments
 (0)