You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2023. It is now read-only.
In the code above, dyups may only read the first two parts of buf chain, and the peril is, may cause body data incomplete, comparing with ngx_http_variable_request_body in ngx_http_variables.c:
len = buf->last - buf->pos;
cl = cl->next;
for ( /* void */ ; cl; cl = cl->next) {
buf = cl->buf;
len += buf->last - buf->pos;
}
p = ngx_pnalloc(r->pool, len);
if (p == NULL) {
return NGX_ERROR;
}
v->data = p;
cl = r->request_body->bufs;
for ( /* void */ ; cl; cl = cl->next) {
buf = cl->buf;
p = ngx_cpymem(p, buf->pos, buf->last - buf->pos);
}
Imo, if body reading ceases at some coincidence place, dyups syncing may succeed and cause unexpected problems.
So ist a bug? Or else why its safe?
The text was updated successfully, but these errors were encountered:
Hi, recently some trouble pushed me to look into function
ngx_http_dyups_read_body
and find these codes:In the code above, dyups may only read the first two parts of buf chain, and the peril is, may cause body data incomplete, comparing with
ngx_http_variable_request_body
inngx_http_variables.c
:Imo, if body reading ceases at some coincidence place, dyups syncing may succeed and cause unexpected problems.
So ist a bug? Or else why its safe?
The text was updated successfully, but these errors were encountered: