diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2018-09-03 19:17:06 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2018-09-03 19:17:06 +0300 |
commit | b71792b11086d9df748f36d02f93d360d135cd7c (patch) | |
tree | f14c32197b620729dea89a860a9792d059682697 /src | |
parent | 07c3e79b64c793facb22ec498dd0fc1437645e55 (diff) | |
download | nginx-b71792b11086d9df748f36d02f93d360d135cd7c.tar.gz nginx-b71792b11086d9df748f36d02f93d360d135cd7c.zip |
Uwsgi: added a check on maximum uwsgi request size.
Requested by Chris Caputo.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_uwsgi_module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c index 8411cfd8d..d0adbdbf2 100644 --- a/src/http/modules/ngx_http_uwsgi_module.c +++ b/src/http/modules/ngx_http_uwsgi_module.c @@ -960,6 +960,12 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r) } #endif + if (len > 65535) { + ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, + "uwsgi request is too big: %uz", len); + return NGX_ERROR; + } + b = ngx_create_temp_buf(r->pool, len + 4); if (b == NULL) { return NGX_ERROR; |