aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_script.c
Commit message (Collapse)AuthorAge
* All known output headers can be linked lists now.Maxim Dounin2022-05-30
| | | | | | | | The h->next pointer properly provided as NULL in all cases where known output headers are added. Note that there are 3rd party modules which might not do this, and it might be risky to rely on this for arbitrary headers.
* Upstream: variables support in certificates.Maxim Dounin2021-05-06
|
* Changed complex value slots to use NGX_CONF_UNSET_PTR.Maxim Dounin2021-05-06
| | | | | | | | | | | With this change, it is now possible to use ngx_conf_merge_ptr_value() to merge complex values. This change follows much earlier changes in ngx_conf_merge_ptr_value() and ngx_conf_set_str_array_slot() in 1452:cd586e963db0 (0.6.10) and 1701:40d004d95d88 (0.6.22), and the change in ngx_conf_set_keyval_slot() (7728:485dba3e2a01, 1.19.4). To preserve compatibility with existing 3rd party modules, both NULL and NGX_CONF_UNSET_PTR are accepted for now.
* Rewrite: fixed segfault with rewritten URI and "alias".Ruslan Ermilov2019-12-16
| | | | | | | | | | | | | | | | | | | The "alias" directive cannot be used in the same location where URI was rewritten. This has been detected in the "rewrite ... break" case, but not when the standalone "break" directive was used. This change also fixes proxy_pass with URI component in a similar case: location /aaa/ { rewrite ^ /xxx/yyy; break; proxy_pass http://localhost:8080/bbb/; } Previously, the "/bbb/yyy" would be sent to a backend instead of "/xxx/yyy". And if location's prefix was longer than the rewritten URI, a segmentation fault might occur.
* Added ngx_http_set_complex_value_size_slot().Ruslan Ermilov2019-04-24
| | | | | | | | | | If a complex value is expected to be of type size_t, and the compiled value is constant, the constant size_t value is remembered at compile time. The value is accessed through ngx_http_complex_value_size() which either returns the remembered constant or evaluates the expression and parses it as size_t.
* Added the ngx_http_test_required_predicates() function.Vladimir Homutov2019-01-17
| | | | | In contrast to ngx_http_test_predicates(), it requires all values to be non-empty and not equal to "0".
* Silenced -Wcast-function-type warnings (closes #1546).Sergey Kandaurov2018-05-07
| | | | | | | Cast to intermediate "void *" to lose compiler knowledge about the original type and pass the warning. This is not a real fix but rather a workaround. Found by gcc8.
* Fixed ngx_open_cached_file() error handling.Sergey Kandaurov2017-03-28
| | | | | | If of.err is 0, it means that there was a memory allocation error and no further logging and/or processing is needed. The of.failed string can be only accessed if of.err is not 0.
* Unified error messages about duplicate directives.Ruslan Ermilov2017-03-22
|
* Win32: support 64-bit compilation with MSVC.Maxim Dounin2016-12-24
| | | | | | | | | | | | | | | | | | | | | | | There are lots of C4244 warnings (conversion from 'type1' to 'type2', possible loss of data), so they were disabled. The same applies to C4267 warnings (conversion from 'size_t' to 'type', possible loss of data), most notably - conversion from ngx_str_t.len to ngx_variable_value_t.len (which is unsigned:28). Additionally, there is at least one case when it is not possible to fix the warning properly without introducing win32-specific code: recv() on win32 uses "int len", while POSIX defines "size_t len". The ssize_t type now properly defined for 64-bit compilation with MSVC. Caught by warning C4305 (truncation from '__int64' to 'ssize_t'), on "cutoff = NGX_MAX_SIZE_T_VALUE / 10" in ngx_atosz()). Several C4334 warnings (result of 32-bit shift implicitly converted to 64 bits) were fixed by adding explicit conversions. Several C4214 warnings (nonstandard extension used: bit field types other than int) in ngx_http_script.h fixed by changing bit field types from uintptr_t to unsigned.
* Fixed regex captures handling without PCRE.Vladimir Homutov2016-07-06
| | | | | | | | | | If PCRE is disabled, captures were treated as normal variables in ngx_http_script_compile(), while code calculating flushes array length in ngx_http_compile_complex_value() did not account captures as variables. This could lead to write outside of the array boundary when setting last element to -1. Found with AddressSanitizer.
* Fixed logging.Sergey Kandaurov2016-03-31
|
* Style.Ruslan Ermilov2016-03-30
|
* Style.Maxim Dounin2013-10-18
|
* Style improved after 12dd27b74117.Maxim Dounin2013-08-20
|
* Backed out f1a91825730a and 7094bd12c1ff.Maxim Dounin2013-08-20
| | | | | | | While ngx_get_full_name() might have a bit more descriptive arguments, the ngx_conf_full_name() is generally easier to use when parsing configuration and limits exposure of cycle->prefix / cycle->conf_prefix details.
* Replaced ngx_conf_full_name() with ngx_get_full_name().Valentin Bartenev2013-08-06
| | | | The ngx_get_full_name() function takes more readable arguments list.
* Fixed memory leaks in the root and auth_basic_user_file directives.Valentin Bartenev2013-08-06
| | | | | | | | If a relative path is set by variables, then the ngx_conf_full_name() function was called while processing requests, which causes allocations from the cycle pool. A new function that takes pool as an argument was introduced.
* Allow the complex value to be defined as an empty string.Ruslan Ermilov2012-12-06
| | | | | This makes conversion from strings to complex values possible without the loss of functionality.
* Rewrite: fixed escaping and possible segfault (ticket #162).Maxim Dounin2012-05-11
| | | | | | | | | | | | | | | | | | The following code resulted in incorrect escaping of uri and possible segfault: location / { rewrite ^(.*) $1?c=$1; return 200 "$uri"; } If there were arguments in a rewrite's replacement string, and length was actually calculated (due to duplicate captures as in the example above, or variables present), the is_args flag was set and incorrectly copied after length calculation. This resulted in escaping applied to the uri part of the replacement, resulting in incorrect escaping. Additionally, buffer was allocated without escaping expected, thus this also resulted in buffer overrun and possible segfault.
* Disable symlinks: initialization of the "disable_symlinks" field inValentin Bartenev2012-02-27
| | | | | | | ngx_open_file_info_t moved to a separate function. This is preparation for the "from=" parameter implementation of the "disable_symlinks" directive.
* Support for disable_symlinks in various modules.Andrey Belov2012-02-13
|
* Copyright updated.Maxim Konovalov2012-01-18
|
* Clear old Location header (if any) while adding a new one.Maxim Dounin2011-10-12
| | | | | This prevents incorrect behaviour when another redirect is issued within error_page 302 handler.
* test zero value in an "if" directive consistently with predicates fixed in r3894Igor Sysoev2011-05-03
| | | | thanks to Maxim Dounin
* values starting with '0' were incorrectly assumed to be falseIgor Sysoev2011-04-15
| | | | patch by Maxim Dounin
* use memmove() in appropriate placesIgor Sysoev2011-04-12
|
* fix typoIgor Sysoev2010-09-13
|
* new ngx_http_secure_link_module with secure_link, secure_link_md5, andIgor Sysoev2010-09-02
| | | | secure_link_expires
* ngx_http_test_predicates(), ngx_http_set_predicate_slot()Igor Sysoev2010-07-14
|
* return code textIgor Sysoev2010-06-18
|
* ngx_str_set() and ngx_str_null()Igor Sysoev2010-05-14
|
* fix captures in "rewrite", the bug had been introduced in r3326Igor Sysoev2009-11-16
|
* regex named capturesIgor Sysoev2009-11-16
|
* read_aheadIgor Sysoev2009-09-30
|
* low ENAMETOOLONG logging levelIgor Sysoev2009-09-25
|
* ngx_http_set_exten() is always successful since 0.3.46Igor Sysoev2009-07-14
|
* fix return value on failureIgor Sysoev2009-06-02
|
* -p and --prefix=Igor Sysoev2009-04-27
|
* *) of.test_only to not open file if only stat() is enoughIgor Sysoev2009-04-27
| | | | *) of.failed to return exact name of failed syscall
* rename ngx_http_scrip_flush_complex_value()Igor Sysoev2009-03-27
| | | | to ngx_http_script_flush_complex_value()
* fix plain text values using relative path in ngx_http_complex_value(),Igor Sysoev2009-03-27
| | | | this fixes the auth_basic_user_file bug introduced in r2589
* ngx_http_script_flush_complex_value()Igor Sysoev2009-03-22
| | | | | ngx_http_complex_value() ngx_http_compile_complex_value()
* split ngx_http_script_compile()Igor Sysoev2009-03-18
|
* now regex captures are per-request entitiesIgor Sysoev2009-03-06
|
* fix /?new=arg?old=arg redirect caseIgor Sysoev2009-02-10
|
* fix r2394Igor Sysoev2008-12-11
|
* fix debug loggingIgor Sysoev2008-12-10
|
* escape a query string characters taken from URI while rewriteIgor Sysoev2008-09-01
|
* fix conflicting names "true" and "false"Igor Sysoev2008-07-31
|