Skip to content

Commit 455a040

Browse files
committed
trying another escape flag
1 parent 4e35980 commit 455a040

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ngx_http_auth_jwt_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ static ngx_int_t ngx_http_auth_jwt_handler(ngx_http_request_t *r)
219219
}
220220

221221
// escape the URI
222-
escaped_len = 2 * ngx_escape_uri(NULL, uri.data, uri.len, NGX_ESCAPE_URI_COMPONENT) + uri.len;
222+
escaped_len = 2 * ngx_escape_uri(NULL, uri.data, uri.len, NGX_ESCAPE_ARGS) + uri.len;
223223
uri_escaped.data = ngx_palloc(r->pool, escaped_len);
224224
uri_escaped.len = escaped_len;
225-
ngx_escape_uri(uri_escaped.data, uri.data, uri.len, NGX_ESCAPE_URI_COMPONENT);
225+
ngx_escape_uri(uri_escaped.data, uri.data, uri.len, NGX_ESCAPE_ARGS);
226226

227227
r->headers_out.___location->value.len = loginlen + sizeof("?return_url=") - 1 + strlen(scheme) + sizeof("://") - 1 + server.len + uri_escaped.len;
228228
return_url = ngx_palloc(r->pool, r->headers_out.___location->value.len);

0 commit comments

Comments
 (0)