summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* release-1.8.1 tagbranches/stable-1.8Maxim Dounin2016-01-261-0/+1
|
* nginx-1.8.1-RELEASErelease-1.8.1Maxim Dounin2016-01-261-0/+159
|
* Resolver: limited CNAME recursion.Ruslan Ermilov2016-01-261-6/+22
| | | | Previously, the recursion was only limited for cached responses.
* Resolver: fixed use-after-free memory accesses with CNAME.Roman Arutyunyan2016-01-262-39/+35
| | | | | | | | | | | | | | | | | | | | | | | | | When several requests were waiting for a response, then after getting a CNAME response only the last request's context had the name updated. Contexts of other requests had the wrong name. This name was used by ngx_resolve_name_done() to find the node to remove the request context from. When the name was wrong, the request could not be properly cancelled, its context was freed but stayed linked to the node's waiting list. This happened e.g. when the first request was aborted or timed out before the resolving completed. When it completed, this triggered a use-after-free memory access by calling ctx->handler of already freed request context. The bug manifests itself by "could not cancel <name> resolving" alerts in error_log. When a request was responded with a CNAME, the request context kept the pointer to the original node's rn->u.cname. If the original node expired before the resolving timed out or completed with an error, this would trigger a use-after-free memory access via ctx->name in ctx->handler(). The fix is to keep ctx->name unmodified. The name from context is no longer used by ngx_resolve_name_done(). Instead, we now keep the pointer to resolver node to which this request is linked. Keeping the original name intact also improves logging.
* Resolver: changed the ngx_resolver_create_*_query() arguments.Roman Arutyunyan2016-01-261-30/+27
| | | | | | No functional changes. This is needed by the following change.
* Resolver: fixed CNAME processing for several requests.Ruslan Ermilov2016-01-261-6/+15
| | | | | | When several requests were waiting for a response, then after getting a CNAME response only the last request was properly processed, while others were left waiting.
* Resolver: fixed crashes in timeout handler.Ruslan Ermilov2016-01-262-25/+42
| | | | | | | | | | | | | | | | | If one or more requests were waiting for a response, then after getting a CNAME response, the timeout event on the first request remained active, pointing to the wrong node with an empty rn->waiting list, and that could cause either null pointer dereference or use-after-free memory access if this timeout expired. If several requests were waiting for a response, and the first request terminated (e.g., due to client closing a connection), other requests were left without a timeout and could potentially wait indefinitely. This is fixed by introducing per-request independent timeouts. This change also reverts 954867a2f0a6 and 5004210e8c78.
* Resolver: fixed possible segmentation fault on DNS format error.Roman Arutyunyan2016-01-261-1/+1
|
* Updated OpenSSL and PCRE used for win32 builds.Maxim Dounin2016-01-251-2/+2
|
* SSL: only select SPDY using NPN if "spdy" is enabled.Valentin Bartenev2015-11-051-8/+16
| | | | | | OpenSSL doesn't check if the negotiated protocol has been announced. As a result, the client might force using SPDY even if it wasn't enabled in configuration.
* Fixed ngx_parse_time() out of bounds access (ticket #821).Maxim Dounin2015-10-301-1/+1
| | | | | | | | | The code failed to ensure that "s" is within the buffer passed for parsing when checking for "ms", and this resulted in unexpected errors when parsing non-null-terminated strings with trailing "m". The bug manifested itself when the expires directive was used with variables. Found by Roman Arutyunyan.
* SSL: preserve default server context in connection (ticket #235).Maxim Dounin2015-10-192-12/+8
| | | | | | | | | This context is needed for shared sessions cache to work in configurations with multiple virtual servers sharing the same port. Unfortunately, OpenSSL does not provide an API to access the session context, thus storing it separately. In collaboration with Vladimir Homutov.
* Upstream: fixed cache send error handling.Roman Arutyunyan2015-09-031-11/+14
| | | | | | | | | The value of NGX_ERROR, returned from filter handlers, was treated as a generic upstream error and changed to NGX_HTTP_INTERNAL_SERVER_ERROR before calling ngx_http_finalize_request(). This resulted in "header already sent" alert if header was already sent in filter handlers. The problem appeared in 54e9b83d00f0 (1.7.5).
* Fixed wrong URI after try_files in nested location (ticket #97).Maxim Dounin2015-08-161-3/+5
| | | | | | | | | | | | | | | | | | | | | | | The following configuration with alias, nested location and try_files resulted in wrong file being used. Request "/foo/test.gif" tried to use "/tmp//foo/test.gif" instead of "/tmp/test.gif": location /foo/ { alias /tmp/; location ~ gif { try_files $uri =405; } } Additionally, rev. c985d90a8d1f introduced a regression if the "/tmp//foo/test.gif" file was found (ticket #768). Resulting URI was set to "gif?/foo/test.gif", as the code used clcf->name of current location ("location ~ gif") instead of parent one ("location /foo/"). Fix is to use r->uri instead of clcf->name in all cases in the ngx_http_core_try_files_phase() function. It is expected to be already matched and identical to the clcf->name of the right location.
* Fixed segfault with try_files introduced by c985d90a8d1f.Maxim Dounin2015-08-161-1/+3
| | | | | | | | | | | | | | If alias was used in a location given by a regular expression, nginx used to do wrong thing in try_files if a location name (i.e., regular expression) was an exact prefix of URI. The following configuration triggered a segmentation fault on a request to "/mail": location ~ /mail { alias /path/to/directory; try_files $uri =404; } Reported by Per Hansson.
* Events: made a failure to create a notification channel non-fatal.Ruslan Ermilov2015-05-061-1/+1
| | | | | | | This may happen if eventfd() returns ENOSYS, notably seen on CentOS 5.4. Such a failure will now just disable the notification mechanism and let the callers cope with it, instead of failing to start worker processes. If thread pools are not configured, this can safely be ignored.
* Merge proxy_protocol setting of listen directives.Roman Arutyunyan2015-04-241-1/+4
| | | | | | It's now enough to specify proxy_protocol option in one listen directive to enable it in all servers listening on the same address/port. Previously, the setting from the first directive was always used.
* Version bump.Maxim Dounin2016-01-251-2/+2
|
* release-1.8.0 tagMaxim Dounin2015-04-211-0/+1
|
* nginx-1.8.0-RELEASErelease-1.8.0Maxim Dounin2015-04-211-0/+14
|
* Core: ensure that ngx_config.h is always included first.Sergey Kandaurov2015-04-161-0/+3
| | | | | This fixes compilation of various 3rd party modules when nginx is configured with threads.
* Stable branch.Maxim Dounin2015-04-161-2/+2
|
* Fixed build, broken by 8b7f062a3fe6.Ruslan Ermilov2015-04-161-1/+2
| | | | Casting a "const char *" to "char *" doesn't work on older gcc versions.
* Core: added OpenSSL version information to "nginx -V" output.Vladimir Homutov2015-04-161-5/+16
|
* Version bump.Vladimir Homutov2015-04-161-2/+2
|
* release-1.7.12 tagMaxim Dounin2015-04-071-0/+1
|
* nginx-1.7.12-RELEASErelease-1.7.12Maxim Dounin2015-04-071-0/+63
|
* Core: guard against spinlock usage without atomic ops.Ruslan Ermilov2015-03-261-1/+1
| | | | The new thread pools code uses spinlocks.
* Core: limited levels of subdirectory hierarchy used for temp files.Sergey Kandaurov2015-04-071-0/+4
| | | | | | | | Similar to ngx_http_file_cache_set_slot(), the last component of file->name with a fixed length of 10 bytes, as generated in ngx_create_temp_path(), is used as a source for the names of intermediate subdirectories with each one taking its own part. Ensure that the sum of specified levels with slashes fits into the length (ticket #731).
* Core: removed excessive initialization in ngx_conf_set_path_slot().Sergey Kandaurov2015-04-071-4/+0
| | | | Level hierarchy is pre-zeroed in ngx_pcalloc() of the surrounding ngx_path_t.
* Core: fixed error handling on ngx_conf_full_name() failure.Sergey Kandaurov2015-04-071-1/+1
|
* Upstream: abbreviated SSL handshake may interact badly with Nagle.Ruslan Ermilov2015-04-071-1/+25
|
* Request body: always flush buffers if request buffering is off.Valentin Bartenev2015-04-061-0/+2
| | | | | | This fixes unbuffered proxying to SSL backends, since it prevents ngx_ssl_send_chain() from accumulation of request body in the SSL buffer.
* Used the correct type for the AIO preload handler return value.Valentin Bartenev2015-04-061-2/+2
|
* Configure: style.Maxim Dounin2015-04-031-1/+1
|
* OCSP stapling: missing free calls.Filipe da Silva2015-04-011-0/+2
| | | | | | Missing call to X509_STORE_CTX_free when X509_STORE_CTX_init fails. Missing call to OCSP_CERTID_free when OCSP_request_add0_id fails. Possible leaks in vary particular scenariis of memory shortage.
* Cache: added support for reading of the header in thread pools.Valentin Bartenev2015-04-012-19/+109
|
* Fixed invalid access to complex value defined as an empty string.Sergey Kandaurov2015-03-312-5/+5
| | | | Found by Valgrind.
* Events: fixed possible crash on start or reload.Valentin Bartenev2015-03-271-2/+2
| | | | | The main thread could wake up and start processing the notify event before the handler was set.
* Events: made posted events macros safe.Valentin Bartenev2015-03-271-8/+8
|
* SPDY: always push pending data.Valentin Bartenev2015-03-231-51/+40
| | | | | | | | | | | | This helps to avoid suboptimal behavior when a client waits for a control frame or more data to increase window size, but the frames have been delayed in the socket buffer. The delays can be caused by bad interaction between Nagle's algorithm on nginx side and delayed ACK on the client side or by TCP_CORK/TCP_NOPUSH if SPDY was working without SSL and sendfile() was used. The pushing code is now very similar to ngx_http_set_keepalive().
* SPDY: fixed error handling in ngx_http_spdy_send_output_queue().Valentin Bartenev2015-03-231-8/+12
|
* Version bump.Maxim Dounin2015-03-261-2/+2
|
* Proxy: fixed proxy_request_buffering and chunked with preread body.Maxim Dounin2015-03-261-3/+4
| | | | | | | If any preread body bytes were sent in the first chain, chunk size was incorrectly added before the whole chain, including header, resulting in an invalid request sent to upstream. Fixed to properly add chunk size after the header.
* release-1.7.11 tagMaxim Dounin2015-03-241-0/+1
|
* nginx-1.7.11-RELEASErelease-1.7.11Maxim Dounin2015-03-241-0/+168
|
* Upstream: uwsgi_request_buffering, scgi_request_buffering.Maxim Dounin2015-03-232-2/+44
|
* FastCGI: fastcgi_request_buffering.Maxim Dounin2015-03-231-18/+342
|
* Proxy: proxy_request_buffering chunked support.Maxim Dounin2015-03-231-6/+216
|
* Request body: unbuffered reading.Maxim Dounin2015-03-238-25/+306
| | | | | | | | | | | The r->request_body_no_buffering flag was introduced. It instructs client request body reading code to avoid reading the whole body, and to call post_handler early instead. The caller should use the ngx_http_read_unbuffered_request_body() function to read remaining parts of the body. Upstream module is now able to use this mode, if configured with the proxy_request_buffering directive.