summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2012-03-15nginx-1.1.17-RELEASErelease-1.1.17Maxim Dounin1-0/+38
2012-03-15Headers with null character are now rejected.Maxim Dounin1-0/+14
Headers with NUL character aren't allowed by HTTP standard and may cause various security problems. They are now unconditionally rejected.
2012-03-15Fixed incorrect ngx_cpystrn() usage in ngx_http_*_process_header().Maxim Dounin4-10/+16
This resulted in a disclosure of previously freed memory if upstream server returned specially crafted response, potentially exposing sensitive information. Reported by Matthew Daley.
2012-03-15Fixed ssi and perl interaction.Maxim Dounin1-2/+12
Embedded perl module assumes there is a space for terminating NUL character, make sure to provide it in all situations by allocating one extra byte for value buffer. Default ssi_value_length is reduced accordingly to preserve 256 byte allocations. While here, fixed another one byte value buffer overrun possible in ssi_quoted_symbol_state. Reported by Matthew Daley.
2012-03-15Uwsgi: merged r->http_version fixes from scgi module.Maxim Dounin1-12/+3
Fixed incorrect use of r->http_version (r4372). Removed duplicate function declaration (r4373). Removed error if there is no Status header (r4374).
2012-03-15Updated OpenSSL and PCRE used for win32 builds.Maxim Dounin1-2/+2
2012-03-12Mentioned the NGINX environment variable.Ruslan Ermilov1-1/+7
2012-03-11Added scgi_temp and uwsgi_temp to svn:ignore.Ruslan Ermilov0-0/+0
2012-03-06- Applied some of the OpenBSD changes.Ruslan Ermilov1-48/+42
- Expanded contractions. - Fixed some markup. - Updated URL of official documentation.
2012-03-05Whitespace fixes.Maxim Dounin9-9/+14
2012-03-05Grammar and wording fixes in CHANGES.Maxim Dounin1-4/+4
2012-03-05Version bump.Maxim Dounin2-3/+3
2012-02-29release-1.1.16 tagMaxim Dounin1-0/+1
2012-02-29nginx-1.1.16-RELEASErelease-1.1.16Maxim Dounin1-0/+113
2012-02-28Raised simultaneous subrequest limit from 50 to 200.Maxim Dounin1-1/+1
It wasn't enforced for a long time, and there are reports that people use up to 100 simultaneous subrequests now. As this is a safety limit to prevent loops, it's raised accordingly.
2012-02-28Added msleep() on reload to allow new processes to start.Maxim Dounin1-0/+4
This is expected to ensure smoother operation on reload (and with less chance of listen queue overflows). Prodded by Igor Sysoev.
2012-02-28Fixed spelling in single-line comments.Ruslan Ermilov21-38/+38
2012-02-28Workaround for fs_size on ZFS (ticket #46).Maxim Dounin1-2/+3
ZFS reports incorrect st_blocks until file settles on disk, and this may take a while (i.e. just after creation of a file the st_blocks value is incorrect). As a workaround we now use st_blocks only if st_blocks * 512 > st_size, this should fix ZFS problems while still preserving accuracy for other filesystems. The problem had appeared in r3900 (1.0.1).
2012-02-27Fix of rbtree lookup on hash collisions.Maxim Dounin6-116/+81
Previous code incorrectly assumed that nodes with identical keys are linked together. This might not be true after tree rebalance. Patch by Lanshun Zhou.
2012-02-27Fixed null pointer dereference in resolver (ticket #91).Maxim Dounin1-5/+6
The cycle->new_log.file may not be set before config parsing finished if there are no error_log directive defined at global level. Fix is to copy it after config parsing. Patch by Roman Arutyunyan.
2012-02-27Disable symlinks: added the "from=" parameter to the "disable_symlinks"Valentin Bartenev2-16/+144
directive.
2012-02-27Disable symlinks: initialization of the "disable_symlinks" field inValentin Bartenev10-33/+65
ngx_open_file_info_t moved to a separate function. This is preparation for the "from=" parameter implementation of the "disable_symlinks" directive.
2012-02-27Disable symlinks: added the "from" parameter support to the open file cache.Valentin Bartenev2-1/+26
2012-02-27Configure: moved icc detection before gcc.Maxim Dounin1-5/+5
New versions of icc confuse auto/cc/name due to introduced handling of a "icc -v": $ icc -v icc version 12.1.3 (gcc version 4.6.0 compatibility) $ icc -V Intel(R) C Compiler XE for applications running on IA-32, Version 12.1.3.293 Build 20120212 Copyright (C) 1985-2012 Intel Corporation. All rights reserved. FOR NON-COMMERCIAL USE ONLY See report here: http://mailman.nginx.org/pipermail/nginx/2012-February/032177.html
2012-02-27Added support for the 307 Temporary Redirect.Ruslan Ermilov6-14/+34
2012-02-22Renamed constants and fixed off-by-one error in "msie_padding on" handling.Ruslan Ermilov1-18/+15
2012-02-22Event pipe: fixed buffer loss in p->length case.Maxim Dounin1-1/+2
With previous code raw buffer might be lost if p->input_filter() was called on a buffer without any data and used ngx_event_pipe_add_free_buf() to return it to the free list. This eventually might cause "all buffers busy" problem, resulting in segmentation fault due to null pointer dereference in ngx_event_pipe_write_chain_to_temp_file(). In ngx_event_pipe_add_free_buf() the buffer was added to the list start due to pos == last, and then "p->free_raw_bufs = cl->next" in ngx_event_pipe_read_upstream() dropped both chain links to the buffer from the p->free_raw_bufs list. Fix is to move "p->free_raw_bufs = cl->next" before calling the p->input_filter().
2012-02-21Disable symlinks: use O_SEARCH|O_DIRECTORY to open path components.Valentin Bartenev2-30/+31
2012-02-21Disable symlinks: don't allow creating or truncating a file via a symlink inValentin Bartenev1-1/+3
the last path component if "if_not_owner" parameter is used. To prevent race condition we have to open a file before checking its owner and there's no way to change access flags for already opened file descriptor, so we disable symlinks for the last path component at all if flags allow creating or truncating the file.
2012-02-21Disable symlinks: cleanups once again.Valentin Bartenev1-8/+10
In collaboration with Ruslan Ermilov.
2012-02-20Disable symlinks: added explicit cast of AT_FDCWD (ticket #111).Maxim Dounin2-4/+6
Solaris has AT_FDCWD defined to unsigned value, and comparison of a file descriptor with it causes warnings in modern versions of gcc. Explicitly cast AT_FDCWD to ngx_fd_t to resolve these warnings.
2012-02-20Disable symlinks: error handling cleanup again.Maxim Dounin1-4/+4
2012-02-20Version bump.Maxim Dounin2-3/+3
2012-02-15release-1.1.15 tagMaxim Dounin1-0/+1
2012-02-15nginx-1.1.15-RELEASErelease-1.1.15Maxim Dounin1-0/+103
2012-02-15Disable symlinks: fixed edge cases of path handling.Maxim Dounin1-14/+60
This includes non-absolute pathnames, multiple slashes and trailing slashes. In collaboration with Valentin Bartenev.
2012-02-15Disable symlinks: cleanup error handling.Maxim Dounin1-41/+70
Notably this fixes NGX_INVALID_FILE/NGX_FILE_ERROR mess, and adds logging of close() errors. In collaboration with Valentin Bartenev.
2012-02-13Support for disable_symlinks in various modules.Andrey Belov8-2/+64
2012-02-13Added disable_symlinks directive.Andrey Belov5-24/+294
To completely disable symlinks (disable_symlinks on) we use openat(O_NOFOLLOW) for each path component to avoid races. To allow symlinks with the same owner (disable_symlinks if_not_owner), use openat() (followed by fstat()) and fstatat(AT_SYMLINK_NOFOLLOW), and then compare uids between fstat() and fstatat(). As there is a race between openat() and fstatat() we don't know if openat() in fact opened symlink or not. Therefore, we have to compare uids even if fstatat() reports the opened component isn't a symlink (as we don't know whether it was symlink during openat() or not). Default value is off, i.e. symlinks are allowed.
2012-02-13Changed ngx_open_and_stat_file() to use ngx_str_t.Andrey Belov1-19/+20
No functional changes.
2012-02-13Added openat()/fstatat().Andrey Belov3-0/+38
2012-02-13Time parsing cleanup.Maxim Dounin11-48/+22
Nuke NGX_PARSE_LARGE_TIME, it's not used since 0.6.30. The only error ngx_parse_time() can currently return is NGX_ERROR, check it explicitly and make sure to cast it to appropriate type (either time_t or ngx_msec_t) to avoid signedness warnings on platforms with unsigned time_t (notably QNX).
2012-02-13Fixed build with embedded perl and --with-openssl.Maxim Dounin2-1/+6
2012-02-13Core: protection from cycles with named locations and post_action.Maxim Dounin2-0/+14
Now redirects to named locations are counted against normal uri changes limit, and post_action respects this limit as well. As a result at least the following (bad) configurations no longer trigger infinite cycles: 1. Post action which recursively triggers post action: location / { post_action /index.html; } 2. Post action pointing to nonexistent named location: location / { post_action @nonexistent; } 3. Recursive error page for 500 (Internal Server Error) pointing to a nonexistent named location: location / { recursive_error_pages on; error_page 500 @nonexistent; return 500; }
2012-02-13Core: protection from subrequest loops.Maxim Dounin2-1/+1
Without the protection, subrequest loop results in r->count overflow and SIGSEGV. Protection was broken in 0.7.25. Note that this also limits number of parallel subrequests. This wasn't exactly the case before 0.7.25 as local subrequests were completed directly. See here for details: http://nginx.org/pipermail/nginx-ru/2010-February/032184.html
2012-02-13Variables: honor no_cacheable for not_found variables.Maxim Dounin1-1/+1
Variables with the "not_found" flag set follow the same rules as ones with the "valid" flag set. Make sure ngx_http_get_flushed_variable() will flush non-cacheable variables with the "not_found" flag set. This fixes at least one known problem with $args not available in a subrequest (with args) when there were no args in the main request and $args variable was queried in the main request (reported by Laurence Rowe aka elro on irc). Also this eliminates unneeded call to ngx_http_get_indexed_variable() in cacheable case (as it will return cached value anyway).
2012-02-13Fix for proxy_store leaving temporary files for subrequests.Maxim Dounin1-18/+15
Temporary files might not be removed if the "proxy_store" or "fastcgi_store" directives were used for subrequests (e.g. ssi includes) and client closed connection prematurely. Non-active subrequests are finalized out of the control of the upstream module when client closes a connection. As a result, the code to remove unfinished temporary files in ngx_http_upstream_process_request() wasn't executed. Fix is to move relevant code into ngx_http_upstream_finalize_request() which is called in all cases, either directly or via the cleanup handler.
2012-02-13Gzip filter: handling of empty flush buffers.Maxim Dounin1-4/+18
Empty flush buffers are legitimate and may happen e.g. due to $r->flush() calls in embedded perl. If there are no data buffered in zlib, deflate() will return Z_BUF_ERROR (i.e. no progress possible) without adding anything to output. Don't treat Z_BUF_ERROR as fatal and correctly send empty flush buffer if we have no data in output at all. See this thread for details: http://mailman.nginx.org/pipermail/nginx/2010-November/023693.html
2012-02-13Removed r->cache/r->cached dependencies in range filter.Maxim Dounin1-20/+6
This is a layering violation, use correct offset calculations instead.
2012-02-13Proxy: added the "proxy_cookie_path" directive.Valentin Bartenev1-4/+127