Skip to content

Commit 1f38838

Browse files
committed
strncmp doesn't work with u_char *
1 parent db46b07 commit 1f38838

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngx_http_auth_jwt_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static ngx_int_t ngx_http_auth_jwt_handler(ngx_http_request_t *r)
179179
goto redirect;
180180
}
181181

182-
if (0 != strncmp(authorizationHeader->value.data + BEARER_LEN, jwtCookieVal.data, jwtCookieVal.len))
182+
if (0 != strncmp((const char *)(authorizationHeader->value.data + BEARER_LEN), (const char *)jwtCookieVal.data, jwtCookieVal.len))
183183
{
184184
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "Authorization and Cookie do not match content");
185185
goto redirect;

0 commit comments

Comments
 (0)