mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Fixed NGINX compilation issues
This commit is contained in:
parent
8560642b90
commit
d7280c61f0
2
CHANGES
2
CHANGES
@ -25,7 +25,7 @@
|
||||
|
||||
* Fixed bug when use ctl:ruleRemoveTargetByTag.
|
||||
|
||||
* Fixed many IIS port bugs.
|
||||
* Fixed IIS and NGINX modules bugs.
|
||||
|
||||
* Fixed bug when @strmatch patterns use invalid escape sequence (Thanks Hideaki Hayashi).
|
||||
|
||||
|
@ -488,6 +488,9 @@ ngx_http_do_read_upload_client_request_body(ngx_http_request_t *r)
|
||||
if (rb->buf->last == rb->buf->end) {
|
||||
|
||||
rc = ngx_http_process_request_body(r, rb->to_write);
|
||||
if(rc != NGX_OK) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
rb->to_write = rb->bufs->next ? rb->bufs->next : rb->bufs;
|
||||
rb->buf->last = rb->buf->start;
|
||||
@ -555,7 +558,10 @@ ngx_http_do_read_upload_client_request_body(ngx_http_request_t *r)
|
||||
ngx_del_timer(c->read);
|
||||
}
|
||||
|
||||
ngx_http_process_request_body(r, rb->to_write);
|
||||
rc = ngx_http_process_request_body(r, rb->to_write);
|
||||
if(rc != NGX_OK) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
return ngx_http_upload_body_handler(r);
|
||||
}
|
||||
@ -779,7 +785,7 @@ modsecurity_read_body_cb(request_rec *r, char *buf, unsigned int length,
|
||||
if (!ctx->body_pos) {
|
||||
ctx->body_pos = b->start;
|
||||
}
|
||||
if ((b->end - ctx->body_pos) > length) {
|
||||
if ((unsigned int)(b->end - ctx->body_pos) > length) {
|
||||
ngx_memcpy(buf, (char *) ctx->body_pos, length);
|
||||
ctx->processed += length;
|
||||
ctx->body_pos += length;
|
||||
|
Loading…
x
Reference in New Issue
Block a user