Skip to content

Commit ae738dd

Browse files
committed
Fix for key copy
1 parent acc2236 commit ae738dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ngx_http_auth_jwt_module.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ static ngx_int_t ngx_http_auth_jwt_handler(ngx_http_request_t *r)
164164
// in this case, 'Binary' is a misnomer, as it is the private key string itself
165165
ngx_log_debug(NGX_LOG_DEBUG, r->connection->log, 0, "got to 1");
166166
keyBinary = ngx_palloc(r->pool, jwtcf->auth_jwt_key.len);
167-
ngx_str_set(keyBinary, jwtcf->auth_jwt_key.data);
167+
ngx_memcpy(keyBinary, jwtcf->auth_jwt_key.data, jwtcf->auth_jwt_key.len);
168+
168169
}
169170

170171
// validate the jwt

0 commit comments

Comments
 (0)