summaryrefslogtreecommitdiffhomepage
path: root/src/core (follow)
AgeCommit message (Collapse)AuthorFilesLines
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-13Added disable_symlinks directive.Andrey Belov3-24/+255
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-13Time parsing cleanup.Maxim Dounin3-13/+2
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-09Version bump.Maxim Dounin1-2/+2
2012-01-30Fixed memory leak on HUP signal when PCRE JIT was used.Valentin Bartenev1-1/+54
The PCRE JIT compiler uses mmap to allocate memory for its executable codes, so we have to explicitly call the pcre_free_study() function to free this memory.
2012-01-24Fixed grammar in PCRE JIT error log message.Valentin Bartenev1-1/+1
2012-01-18Copyright updated.Maxim Konovalov58-0/+58
2012-01-18Version bump.Maxim Konovalov1-2/+2
2012-01-16Fixed division by zero exception in ngx_hash_init().Valentin Bartenev1-1/+1
The ngx_hash_init() function did not expect call with zero elements count, which caused FPE error on configs with an empty "types" block in http context and "types_hash_max_size" > 10000. Example configuration to reproduce: events { } http { types_hash_max_size 10001; types {} server {} }
2012-01-10Changed ngx_log_debugN() macros to verify the number of argumentsRuslan Ermilov1-9/+32
when built with debugging.
2011-12-27Version bump.Maxim Dounin1-2/+2
2011-12-26Added support for regex study and PCRE JIT (ticket #41) optimizations onValentin Bartenev2-7/+216
configuration phase.
2011-12-19Version bump.Maxim Dounin1-1/+1
2011-12-06Removed unused function ngx_regex_capture_count().Valentin Bartenev1-17/+0
The function has been unused since r3326.
2011-12-06Version bump.Maxim Dounin1-2/+2
2011-12-05Added the "so_keepalive=" parameter to the "listen" directive.Valentin Bartenev2-0/+57
The "so_keepalive" directive in mail module was deprecated. Thanks to Vsevolod Stakhov for initial work.
2011-11-29Version bump.Maxim Dounin1-2/+2
2011-11-28Added (void) as we intentionally ignore returned values.Maxim Dounin1-1/+1
Requested by Igor Sysoev.
2011-11-25Added escaping of double quotes in ngx_escape_html().Maxim Dounin1-0/+9
Patch by Zaur Abasmirzoev.
2011-11-23Fixed build without atomic operations.Maxim Dounin1-2/+2
2011-11-23Added shmtx interface to forcibly unlock mutexes.Maxim Dounin4-47/+83
It is currently used from master process on abnormal worker termination to unlock accept mutex (unlocking of accept mutex was broken in 1.0.2). It is expected to be used in the future to unlock other mutexes as well. Shared mutex code was rewritten to make this possible in a safe way, i.e. with a check if lock was actually held by the exited process. We again use pid to lock mutex, and use separate atomic variable for a count of processes waiting in sem_wait().
2011-11-16Silenced a warning for some compilers.Ruslan Ermilov1-0/+1
2011-11-16Now nginx uses TTL of a DNS response when calculating cache validity.Ruslan Ermilov1-6/+38
Previously it used a hardcoded value of 300 seconds. Also added the "valid=" parameter to the "resolver" directive that can be used to override the cache validity time. Patch by Kirill A. Korinskiy with minor changes.
2011-11-15Fixed handling of SIGWINCH/NOACCEPT signal.Maxim Dounin1-0/+4
After first upgrade it was ignored since r4020 (1.1.1, 1.0.9) as ngx_daemonized wasn't set.
2011-11-15Version bump.Maxim Dounin1-2/+2
2011-11-14Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()Igor Sysoev2-18/+36
for output of ./configure options, etc., since ngx_log_stderr() output length is limited by 2048 characters defined as NGX_MAX_ERROR_STR.
2011-11-14Reverted incorrect change in internal md5 (part of r3928).Maxim Dounin1-1/+2
2011-11-09Fixed compression pointer processing in DNS response greater than 255 bytes.Igor Sysoev1-7/+7
Thanks to Ben Hawkes.
2011-11-01Version bump.Igor Sysoev1-2/+2
2011-10-25Fixed port range checking.Ruslan Ermilov1-3/+3
2011-10-24Support of several servers in the "resolver" directive.Igor Sysoev2-22/+51
Patch by Kirill A. Korinskiy.
2011-10-24Using of junk value in slab allocator similar to modern FreeBSD values.Igor Sysoev1-2/+2
2011-10-24malloc() debugging on MacOSX.Igor Sysoev2-4/+2
2011-10-24FreeBSD's MALLOC_OPTIONS must be set before any malloc() call.Igor Sysoev1-4/+4
The bug has been introduced in r3799.
2011-10-17Version bump.Igor Sysoev1-2/+2
2011-10-13Fixed utf8 decode (ticket #25).Maxim Dounin1-3/+3
Patch by Alexey Kuts.
2011-10-11Autoindex: escape '?' in file names.Maxim Dounin2-7/+28
For files with '?' in their names autoindex generated links with '?' not escaped. This resulted in effectively truncated links as '?' indicates query string start. This is an updated version of the patch originally posted at [1]. It introduces generic NGX_ESCAPE_URI_COMPONENT which escapes everything but unreserved characters as per RFC 3986. This approach also renders unneeded special colon processing (as colon is percent-encoded now), it's dropped accordingly. [1] http://nginx.org/pipermail/nginx-devel/2010-February/000112.html Reported by Konstantin Leonov.
2011-10-07Version bump.Igor Sysoev1-2/+2
2011-10-07Improved ngx_parse_time() code readability.Ruslan Ermilov2-24/+24
2011-10-05Version bump.Igor Sysoev1-2/+2
2011-09-19Replaced "can not" with "cannot" and "could not" in a bunch of places.Ruslan Ermilov3-3/+3
Fixed nearby grammar errors.
2011-09-15API change: ngx_chain_update_chains() now requires pool.Maxim Dounin3-10/+13
The ngx_chain_update_chains() needs pool to free chain links used for buffers with non-matching tags. Providing one helps to reduce memory consumption for long-lived requests.
2011-09-14Version bump.Igor Sysoev1-2/+2
2011-09-14Fix of the previous commit: is_directio flag processing introduced in r4077Igor Sysoev1-0/+2
is still worthwhile.
2011-09-14Bugfix: open_file_cache did not update file info on retest.Igor Sysoev1-7/+1
If file inode was not changed, cached file information was not updated on retest. As a result stale information might be cached forever if file attributes was changed and/or file was extended. This fix also makes obsolete r4077 change of is_directio flag handling, since this flag is updated together with other file information.
2011-09-05Bugfix: open_file_cache lost is_directio flag.Maxim Dounin1-0/+2
On file retest open_file_cache lost is_directio if file wasn't changed. This caused unaligned operations under Linux to fail with EINVAL. It wasn't noticeable with AIO though, as errors wasn't properly logged.
2011-09-05Version bump.Igor Sysoev1-2/+2
2011-08-23Version bump.Igor Sysoev1-2/+2