Permalink
Switch branches/tags
Commits on Jan 26, 2016
  1. release-1.8.1 tag

    mdounin committed Jan 26, 2016
  2. nginx-1.8.1-RELEASE

    mdounin committed Jan 26, 2016
  3. Resolver: limited CNAME recursion.

    Ruslan Ermilov committed Jan 26, 2016
    Previously, the recursion was only limited for cached responses.
  4. Resolver: fixed use-after-free memory accesses with CNAME.

    Roman Arutyunyan committed Jan 26, 2016
    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.
  5. Resolver: changed the ngx_resolver_create_*_query() arguments.

    Roman Arutyunyan committed Jan 26, 2016
    No functional changes.
    
    This is needed by the following change.
  6. Resolver: fixed CNAME processing for several requests.

    Ruslan Ermilov committed Jan 26, 2016
    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.
  7. Resolver: fixed crashes in timeout handler.

    Ruslan Ermilov committed Jan 26, 2016
    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.
Commits on Jan 25, 2016
  1. Version bump.

    mdounin committed Jan 25, 2016
Commits on Nov 5, 2015
  1. SSL: only select SPDY using NPN if "spdy" is enabled.

    VBart committed Nov 5, 2015
    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.
Commits on Oct 30, 2015
  1. Fixed ngx_parse_time() out of bounds access (ticket #821).

    mdounin committed Oct 30, 2015
    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.
Commits on Oct 19, 2015
  1. SSL: preserve default server context in connection (ticket #235).

    mdounin committed Oct 19, 2015
    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.
Commits on Sep 3, 2015
  1. Upstream: fixed cache send error handling.

    Roman Arutyunyan committed Sep 3, 2015
    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).
Commits on Aug 16, 2015
  1. Fixed wrong URI after try_files in nested location (ticket #97).

    mdounin committed Aug 16, 2015
    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.
  2. Fixed segfault with try_files introduced by c985d90a8d1f.

    mdounin committed Aug 16, 2015
    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.
Commits on May 6, 2015
  1. Events: made a failure to create a notification channel non-fatal.

    Ruslan Ermilov committed May 6, 2015
    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.
Commits on Apr 24, 2015
  1. Merge proxy_protocol setting of listen directives.

    Roman Arutyunyan committed Apr 24, 2015
    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.
Commits on Apr 21, 2015
  1. release-1.8.0 tag

    mdounin committed Apr 21, 2015
  2. nginx-1.8.0-RELEASE

    mdounin committed Apr 21, 2015
Commits on Apr 16, 2015
  1. Core: ensure that ngx_config.h is always included first.

    Sergey Kandaurov committed Apr 16, 2015
    This fixes compilation of various 3rd party modules when nginx is
    configured with threads.
  2. Stable branch.

    mdounin committed Apr 16, 2015
  3. Fixed build, broken by 8b7f062a3fe6.

    Ruslan Ermilov committed Apr 16, 2015
    Casting a "const char *" to "char *" doesn't work on older gcc versions.
  4. Version bump.

    vl-homutov committed Apr 16, 2015
Commits on Apr 7, 2015
  1. release-1.7.12 tag

    mdounin committed Apr 7, 2015
  2. nginx-1.7.12-RELEASE

    mdounin committed Apr 7, 2015
Commits on Apr 6, 2015
  1. Core: limited levels of subdirectory hierarchy used for temp files.

    Sergey Kandaurov committed Apr 6, 2015
    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).
  2. Core: removed excessive initialization in ngx_conf_set_path_slot().

    Sergey Kandaurov committed Apr 6, 2015
    Level hierarchy is pre-zeroed in ngx_pcalloc() of the surrounding ngx_path_t.
  3. Core: fixed error handling on ngx_conf_full_name() failure.

    Sergey Kandaurov committed Apr 6, 2015
  4. Request body: always flush buffers if request buffering is off.

    VBart committed Apr 6, 2015
    This fixes unbuffered proxying to SSL backends, since it prevents
    ngx_ssl_send_chain() from accumulation of request body in the SSL
    buffer.
Commits on Apr 3, 2015
  1. Configure: style.

    mdounin committed Apr 3, 2015
Commits on Mar 26, 2015
  1. Core: guard against spinlock usage without atomic ops.

    Ruslan Ermilov committed Mar 26, 2015
    The new thread pools code uses spinlocks.