mirror of
https://github.com/nginx/nginx.git
synced 2024-11-27 23:49:00 +08:00
Userid: ngx_http_get_indexed_variable() error handling.
When evaluating a mapped $reset_uid variable in the userid filter, if get_handler set to ngx_http_map_variable() returned an error, this previously resulted in a NULL pointer dereference.
This commit is contained in:
parent
b0de3d7013
commit
aa04b091ae
@ -472,6 +472,10 @@ ngx_http_userid_create_uid(ngx_http_request_t *r, ngx_http_userid_ctx_t *ctx,
|
||||
|
||||
vv = ngx_http_get_indexed_variable(r, ngx_http_userid_reset_index);
|
||||
|
||||
if (vv == NULL || vv->not_found) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (vv->len == 0 || (vv->len == 1 && vv->data[0] == '0')) {
|
||||
|
||||
if (conf->mark == '\0'
|
||||
|
Loading…
Reference in New Issue
Block a user