Hello community, here is the log from the commit of package nginx for openSUSE:Factory checked in at 2018-02-22 15:01:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nginx (Old) and /work/SRC/openSUSE:Factory/.nginx.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nginx" Thu Feb 22 15:01:21 2018 rev:20 rq:578706 version:1.13.9 Changes: -------- --- /work/SRC/openSUSE:Factory/nginx/nginx.changes 2018-02-07 18:43:08.343334727 +0100 +++ /work/SRC/openSUSE:Factory/.nginx.new/nginx.changes 2018-02-22 15:01:29.188075054 +0100 @@ -1,0 +2,61 @@ +Wed Feb 21 13:32:25 UTC 2018 - [email protected] + +- update rmtp module to 1.2.1 + - just commenting all places where we fallthrough conditionals + +------------------------------------------------------------------- +Wed Feb 21 13:30:07 UTC 2018 - [email protected] + +- update headers more to 0.33 + - feature: add wildcard match support for + more_clear_input_headers. + +------------------------------------------------------------------- +Wed Feb 21 13:27:54 UTC 2018 - [email protected] + +- update fancyindex module to 0.4.2 + This release contains an important fix which can cause Nginx to + crash when a directory contains zero-sized (empty) files. This + bug has been present in all previous releases, and all users are + strongly encouraged to update to version 0.4.2. + + https://github.com/aperezdc/ngx-fancyindex/releases/tag/v0.4.2 + +------------------------------------------------------------------- +Wed Feb 21 13:23:44 UTC 2018 - [email protected] + +- changes from 1.13.9 + - Feature: HTTP/2 server push support; the "http2_push" and + "http2_push_preload" directives. + - Bugfix: "header already sent" alerts might appear in logs when + using cache; the bug had appeared in 1.9.13. + - Bugfix: a segmentation fault might occur in a worker process if + the "ssl_verify_client" directive was used and no SSL + certificate was specified in a virtual server. + - Bugfix: in the ngx_http_v2_module. + - Bugfix: in the ngx_http_dav_module. +- updates from 1.13.8 + - Feature: now nginx automatically preserves the CAP_NET_RAW + capability in worker processes when using the "transparent" + parameter of the "proxy_bind", "fastcgi_bind", + "memcached_bind", "scgi_bind", and "uwsgi_bind" directives. + - Feature: improved CPU cache line size detection. Thanks to + Debayan Ghosh. + - Feature: new directives in vim syntax highlighting scripts. + Thanks to Gena Makhomed. + - Bugfix: binary upgrade refused to work if nginx was re-parented + to a process with PID different from 1 after its parent process + has finished. + - Bugfix: the ngx_http_autoindex_module incorrectly handled + requests with bodies. + - Bugfix: in the "proxy_limit_rate" directive when used with the + "keepalive" directive. + - Bugfix: some parts of a response might be buffered when using + "proxy_buffering off" if the client connection used SSL. + Thanks to Patryk Lesiewicz. + - Bugfix: in the "proxy_cache_background_update" directive. + - Bugfix: it was not possible to start a parameter with a + variable in the "${name}" form with the name in curly brackets + without enclosing the parameter into single or double quotes. + +------------------------------------------------------------------- Old: ---- headers-more-nginx-module-0.32.tar.gz nginx-1.13.7.tar.gz nginx-1.13.7.tar.gz.asc nginx-rtmp-module-1.2.0.tar.gz ngx-fancyindex-0.4.1.tar.gz New: ---- headers-more-nginx-module-0.33.tar.gz nginx-1.13.9.tar.gz nginx-1.13.9.tar.gz.asc nginx-rtmp-module-1.2.1.tar.gz ngx-fancyindex-0.4.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nginx.spec ++++++ --- /var/tmp/diff_new_pack.wVPlq1/_old 2018-02-22 15:01:31.827980083 +0100 +++ /var/tmp/diff_new_pack.wVPlq1/_new 2018-02-22 15:01:31.831979939 +0100 @@ -18,6 +18,7 @@ %bcond_with cpp_test %bcond_with google_perftools + %if 0%{?is_opensuse} %bcond_without extra_modules %else @@ -69,18 +70,18 @@ %define ngx_doc_dir %{_datadir}/doc/packages/%{name} # Name: nginx -Version: 1.13.7 +Version: 1.13.9 Release: 0 -%define ngx_fancyindex_version 0.4.1 +%define ngx_fancyindex_version 0.4.2 %define ngx_fancyindex_module_path ngx-fancyindex-%{ngx_fancyindex_version} -%define headers_more_nginx_version 0.32 +%define headers_more_nginx_version 0.33 %define headers_more_nginx_module_path headers-more-nginx-module-%{headers_more_nginx_version} %define nginx_upstream_check_version 0.3.0 %define nginx_upstream_check_module_path nginx_upstream_check_module-%{nginx_upstream_check_version} -%define nginx_rtmp_version 1.2.0 +%define nginx_rtmp_version 1.2.1 %define nginx_rtmp_module_path nginx-rtmp-module-%{nginx_rtmp_version} Summary: A HTTP server and IMAP/POP3 proxy server ++++++ headers-more-nginx-module-0.32.tar.gz -> headers-more-nginx-module-0.33.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/.travis.yml new/headers-more-nginx-module-0.33/.travis.yml --- old/headers-more-nginx-module-0.32/.travis.yml 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/.travis.yml 2017-11-04 00:05:42.000000000 +0100 @@ -9,28 +9,34 @@ - gcc - clang +addons: + apt: + packages: + - axel + - cpanminus + - libluajit-5.1-dev + env: global: - LUAJIT_LIB=/usr/lib64/libluajit-5.1.so - LUAJIT_INC=/usr/include/luajit-2.0 matrix: - NGINX_VERSION=1.9.15 - - NGINX_VERSION=1.10.0 + - NGINX_VERSION=1.11.2 before_install: - - sudo apt-get install -qq -y cpanminus libluajit-5.1-dev - sudo cpanm -v --notest Test::Nginx > build.log 2>&1 || (cat build.log && exit 1) install: - - wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && tar -xzf nginx-${NGINX_VERSION}.tar.gz - - git clone https://github.com/openresty/echo-nginx-module.git - - git clone https://github.com/openresty/lua-nginx-module.git - - git clone https://github.com/openresty/nginx-eval-module.git + - git clone https://github.com/openresty/echo-nginx-module.git ../echo-nginx-module + - git clone https://github.com/openresty/lua-nginx-module.git ../lua-nginx-module + - git clone https://github.com/openresty/nginx-eval-module.git ../eval-nginx-module + - git clone https://github.com/openresty/openresty.git ../openresty + - git clone https://github.com/openresty/no-pool-nginx.git ../no-pool-nginx + - git clone https://github.com/openresty/nginx-devel-utils.git script: - - cd nginx-${NGINX_VERSION}/ - - ./configure --with-debug --with-pcre --with-pcre-jit --with-http_dav_module --add-module=../nginx-eval-module --add-module=../lua-nginx-module --add-module=../echo-nginx-module --add-module=.. > build.log 2>&1 || (cat build.log && exit 1) - - make -j2 > build.log 2>&1 || (cat build.log && exit 1) - - export PATH=$PATH:`pwd`/objs - - cd .. + - export PATH=$PWD/work/nginx/sbin:$PWD/nginx-devel-utils:$PATH + - export NGX_BUILD_CC=$CC + - sh util/build.sh $NGINX_VERSION > build.log 2>&1 || (cat build.log && exit 1) - prove -r t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/README.markdown new/headers-more-nginx-module-0.33/README.markdown --- old/headers-more-nginx-module-0.32/README.markdown 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/README.markdown 2017-11-04 00:05:42.000000000 +0100 @@ -36,7 +36,7 @@ Version ======= -This document describes headers-more-nginx-module [v0.32](https://github.com/openresty/headers-more-nginx-module/tags) released on 4 November 2016. +This document describes headers-more-nginx-module [v0.33](https://github.com/openresty/headers-more-nginx-module/tags) released on 3 November 2017. Synopsis ======== @@ -248,7 +248,8 @@ See [more_set_headers](#more_set_headers) for more details. -Wildcard `*` can also be used to specify a header name pattern. For example, the following directive effectively clears *any* output headers starting by "`X-Hidden-`": +The wildcard character, `*`, can also be used at the end of the header name to specify a pattern. For example, the following directive +effectively clears *any* output headers starting by "`X-Hidden-`": ```nginx @@ -298,25 +299,40 @@ ```nginx - more_clear_input_headers -s 404 -t 'text/plain' Foo Baz; + more_clear_input_headers -t 'text/plain' Foo Baz; ``` is exactly equivalent to ```nginx - more_set_input_headers -s 404 -t 'text/plain' "Foo: " "Baz: "; + more_set_input_headers -t 'text/plain' "Foo: " "Baz: "; ``` or ```nginx - more_set_input_headers -s 404 -t 'text/plain' Foo Baz + more_set_input_headers -t 'text/plain' Foo Baz +``` + +To remove request headers "Foo" and "Baz" for all incoming requests regardless of the content type, we can write + +```nginx + + more_clear_input_headers "Foo" "Baz"; ``` See [more_set_input_headers](#more_set_input_headers) for more details. +The wildcard character, `*`, can also be used at the end of the header name to specify a pattern. For example, the following directive +effectively clears *any* input headers starting by "`X-Hidden-`": + +```nginx + + more_clear_input_headers 'X-Hidden-*'; +``` + [Back to TOC](#table-of-contents) Limitations @@ -331,13 +347,13 @@ ============ Grab the nginx source code from [nginx.org](http://nginx.org/), for example, -the version 1.11.2 (see [nginx compatibility](#compatibility)), and then build the source with this module: +the version 1.13.6 (see [nginx compatibility](#compatibility)), and then build the source with this module: ```bash - wget 'http://nginx.org/download/nginx-1.11.2.tar.gz' - tar -xzvf nginx-1.11.2.tar.gz - cd nginx-1.11.2/ + wget 'http://nginx.org/download/nginx-1.13.6.tar.gz' + tar -xzvf nginx-1.13.6.tar.gz + cd nginx-1.13.6/ # Here we assume you would install you nginx under /opt/nginx/. ./configure --prefix=/opt/nginx \ @@ -366,6 +382,8 @@ The following versions of Nginx should work with this module: +* **1.13.x** (last tested: 1.13.6) +* **1.12.x** * **1.11.x** (last tested: 1.11.2) * **1.10.x** * **1.9.x** (last tested: 1.9.15) @@ -479,7 +497,7 @@ Authors ======= -* Yichun "agentzh" Zhang (章亦春) *<[email protected]>*, CloudFlare Inc. +* Yichun "agentzh" Zhang (章亦春) *<[email protected]>*, OpenResty Inc. * Bernd Dorn ( <http://www.lovelysystems.com/> ) This wiki page is also maintained by the author himself, and everybody is encouraged to improve this page as well. @@ -491,7 +509,7 @@ The code base is borrowed directly from the standard [headers](http://nginx.org/en/docs/http/ngx_http_headers_module.html) module in Nginx 0.8.24. This part of code is copyrighted by Igor Sysoev. -Copyright (c) 2009-2014, Yichun "agentzh" Zhang (章亦春) <[email protected]>, CloudFlare Inc. +Copyright (c) 2009-2017, Yichun "agentzh" Zhang (章亦春) <[email protected]>, OpenResty Inc. Copyright (c) 2010-2013, Bernd Dorn. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/src/ngx_http_headers_more_headers_in.c new/headers-more-nginx-module-0.33/src/ngx_http_headers_more_headers_in.c --- old/headers-more-nginx-module-0.32/src/ngx_http_headers_more_headers_in.c 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/src/ngx_http_headers_more_headers_in.c 2017-11-04 00:05:42.000000000 +0100 @@ -243,42 +243,59 @@ i = 0; } - if (h[i].key.len == hv->key.len + if (!hv->wildcard + && h[i].key.len == hv->key.len && ngx_strncasecmp(h[i].key.data, hv->key.data, h[i].key.len) == 0) { - if (value->len == 0 || (matched && matched != &h[i])) { - h[i].hash = 0; + goto matched; + } + + if (hv->wildcard + && value->len == 0 + && h[i].key.len >= hv->key.len - 1 + && ngx_strncasecmp(h[i].key.data, hv->key.data, + hv->key.len - 1) == 0) + { + goto matched; + } + + /* not matched */ + continue; + +matched: - rc = ngx_http_headers_more_rm_header_helper( - &r->headers_in.headers, part, i); + if (value->len == 0 || (matched && matched != &h[i])) { + h[i].hash = 0; - ngx_http_headers_more_assert( - !(r->headers_in.headers.part.next == NULL - && r->headers_in.headers.last - != &r->headers_in.headers.part)); - - if (rc == NGX_OK) { - if (output_header) { - *output_header = NULL; - } + rc = ngx_http_headers_more_rm_header_helper( + &r->headers_in.headers, part, i); - goto retry; + ngx_http_headers_more_assert( + !(r->headers_in.headers.part.next == NULL + && r->headers_in.headers.last + != &r->headers_in.headers.part)); + + if (rc == NGX_OK) { + if (output_header) { + *output_header = NULL; } - return NGX_ERROR; + goto retry; } - h[i].value = *value; + return NGX_ERROR; + } - if (output_header) { - *output_header = &h[i]; - dd("setting existing builtin input header"); - } + h[i].value = *value; - if (matched == NULL) { - matched = &h[i]; - } + if (output_header) { + *output_header = &h[i]; + dd("setting existing builtin input header"); + } + + if (matched == NULL) { + matched = &h[i]; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/t/builtin.t new/headers-more-nginx-module-0.33/t/builtin.t --- old/headers-more-nginx-module-0.32/t/builtin.t 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/t/builtin.t 2017-11-04 00:05:42.000000000 +0100 @@ -336,4 +336,3 @@ Vary: hello --- response_body hello - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/t/input-conn.t new/headers-more-nginx-module-0.33/t/input-conn.t --- old/headers-more-nginx-module-0.32/t/input-conn.t 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/t/input-conn.t 2017-11-04 00:05:42.000000000 +0100 @@ -135,4 +135,3 @@ connection: bad --- no_error_log [error] - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/t/input-ua.t new/headers-more-nginx-module-0.33/t/input-ua.t --- old/headers-more-nginx-module-0.32/t/input-ua.t 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/t/input-ua.t 2017-11-04 00:05:42.000000000 +0100 @@ -626,4 +626,3 @@ User-Agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.10 (like Gecko) (Kubuntu) --- no_error_log [error] - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/t/input.t new/headers-more-nginx-module-0.33/t/input.t --- old/headers-more-nginx-module-0.32/t/input.t 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/t/input.t 2017-11-04 00:05:42.000000000 +0100 @@ -5,7 +5,7 @@ repeat_each(2); -plan tests => repeat_each() * 124; +plan tests => repeat_each() * 128; no_long_string(); #no_diff; @@ -1289,3 +1289,43 @@ Foo: 127.0.0.1 --- no_error_log [error] + + + +=== TEST 50: clear input headers with wildcard +--- config + location /hello { + more_clear_input_headers 'X-Hidden-*'; + content_by_lua ' + ngx.say("X-Hidden-One: ", ngx.var.http_x_hidden_one) + ngx.say("X-Hidden-Two: ", ngx.var.http_x_hidden_two) + '; + } +--- request + GET /hello +--- more_headers +X-Hidden-One: i am hidden +X-Hidden-Two: me 2 +--- response_body +X-Hidden-One: nil +X-Hidden-Two: nil + + + +=== TEST 51: make sure wildcard doesn't affect more_set_input_headers +--- config + location /hello { + more_set_input_headers 'X-Hidden-*: lol'; + content_by_lua ' + ngx.say("X-Hidden-One: ", ngx.var.http_x_hidden_one) + ngx.say("X-Hidden-Two: ", ngx.var.http_x_hidden_two) + '; + } +--- request + GET /hello +--- more_headers +X-Hidden-One: i am hidden +X-Hidden-Two: me 2 +--- response_body +X-Hidden-One: i am hidden +X-Hidden-Two: me 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/t/phase.t new/headers-more-nginx-module-0.33/t/phase.t --- old/headers-more-nginx-module-0.32/t/phase.t 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/t/phase.t 2017-11-04 00:05:42.000000000 +0100 @@ -23,4 +23,3 @@ X-Foo: Blah --- response_body_like: 403 Forbidden --- error_code: 403 - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/t/sanity.t new/headers-more-nginx-module-0.33/t/sanity.t --- old/headers-more-nginx-module-0.32/t/sanity.t 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/t/sanity.t 2017-11-04 00:05:42.000000000 +0100 @@ -565,4 +565,3 @@ --- response_body ok --- http09 - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/t/subrequest.t new/headers-more-nginx-module-0.33/t/subrequest.t --- old/headers-more-nginx-module-0.32/t/subrequest.t 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/t/subrequest.t 2017-11-04 00:05:42.000000000 +0100 @@ -66,4 +66,3 @@ --- response_headers ! Host --- skip_nginx: 3: < 0.7.46 - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/t/unused.t new/headers-more-nginx-module-0.33/t/unused.t --- old/headers-more-nginx-module-0.32/t/unused.t 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/t/unused.t 2017-11-04 00:05:42.000000000 +0100 @@ -172,4 +172,3 @@ headers more header handler [error] --- log_level: debug - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/t/vars.t new/headers-more-nginx-module-0.33/t/vars.t --- old/headers-more-nginx-module-0.32/t/vars.t 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/t/vars.t 2017-11-04 00:05:42.000000000 +0100 @@ -56,4 +56,3 @@ dog --- response_headers Host: - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/headers-more-nginx-module-0.32/valgrind.suppress new/headers-more-nginx-module-0.33/valgrind.suppress --- old/headers-more-nginx-module-0.32/valgrind.suppress 2016-11-04 21:54:28.000000000 +0100 +++ new/headers-more-nginx-module-0.33/valgrind.suppress 2017-11-04 00:05:42.000000000 +0100 @@ -1,75 +1,16 @@ { -<insert_a_suppression_name_here> -Memcheck:Cond -fun:lj_str_new -} -{ - <insert_a_suppression_name_here> - Memcheck:Cond - fun:lj_str_new - fun:lua_pushlstring -} -{ - <insert_a_suppression_name_here> - Memcheck:Addr4 - fun:lj_str_new - fun:lua_pushlstring -} -{ -<insert_a_suppression_name_here> -Memcheck:Leak -fun:malloc -fun:ngx_alloc -obj:* -} -{ -<insert_a_suppression_name_here> -Memcheck:Leak -fun:malloc -fun:ngx_alloc -} -{ -<insert_a_suppression_name_here> -Memcheck:Leak -fun:malloc -fun:ngx_alloc -fun:ngx_palloc_large -fun:ngx_palloc -} -{ <insert_a_suppression_name_here> Memcheck:Leak fun:malloc fun:ngx_alloc - fun:ngx_calloc - fun:ngx_event_process_init -} -{ -<insert_a_suppression_name_here> -Memcheck:Addr4 -fun:lj_str_new -fun:lua_pushlstring -fun:ngx_http_lua_get_output_header -} -{ - <insert_a_suppression_name_here> - Memcheck:Addr4 - fun:lj_str_new - fun:lua_getfield - fun:ngx_http_lua_cache_load_code -} -{ - <insert_a_suppression_name_here> - Memcheck:Addr4 - fun:lj_str_new - fun:lua_setfield - fun:ngx_http_lua_cache_store_code + obj:* } { <insert_a_suppression_name_here> Memcheck:Leak fun:malloc fun:ngx_alloc + fun:ngx_calloc fun:ngx_event_process_init } { @@ -77,7 +18,7 @@ Memcheck:Leak fun:malloc fun:ngx_alloc - fun:(below main) + fun:ngx_event_process_init } { <insert_a_suppression_name_here> @@ -87,21 +28,6 @@ } { <insert_a_suppression_name_here> - Memcheck:Leak - fun:malloc - fun:ngx_alloc - fun:ngx_create_pool -} -{ - <insert_a_suppression_name_here> - Memcheck:Leak - fun:malloc - fun:ngx_alloc - fun:ngx_malloc - fun:ngx_palloc_large -} -{ - <insert_a_suppression_name_here> Memcheck:Cond fun:memcpy fun:ngx_vslprintf @@ -109,22 +35,6 @@ fun:ngx_http_charset_header_filter } { - <insert_a_suppression_name_here> - Memcheck:Leak - fun:malloc - fun:ngx_alloc - fun:ngx_malloc - fun:ngx_pnalloc -} -{ - <insert_a_suppression_name_here> - Memcheck:Leak - fun:malloc - fun:ngx_alloc - fun:ngx_malloc - fun:ngx_palloc -} -{ nginx-core-process-init Memcheck:Leak fun:malloc @@ -187,15 +97,6 @@ } { <insert_a_suppression_name_here> - Memcheck:Leak - fun:memalign - fun:posix_memalign - fun:ngx_memalign - fun:ngx_palloc_block - fun:ngx_palloc -} -{ - <insert_a_suppression_name_here> Memcheck:Addr8 fun:getenv fun:gcov_exit @@ -213,3 +114,22 @@ fun:do_preload fun:dl_main } +{ + <insert_a_suppression_name_here> + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:ngx_alloc + fun:ngx_set_environment + fun:ngx_single_process_cycle +} +{ + <insert_a_suppression_name_here> + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:ngx_alloc + fun:ngx_set_environment + fun:ngx_worker_process_init + fun:ngx_worker_process_cycle +} ++++++ nginx-1.13.7.tar.gz -> nginx-1.13.9.tar.gz ++++++ ++++ 6051 lines of diff (skipped) ++++++ nginx-rtmp-module-1.2.0.tar.gz -> nginx-rtmp-module-1.2.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-rtmp-module-1.2.0/hls/ngx_rtmp_hls_module.c new/nginx-rtmp-module-1.2.1/hls/ngx_rtmp_hls_module.c --- old/nginx-rtmp-module-1.2.0/hls/ngx_rtmp_hls_module.c 2017-07-10 17:26:17.000000000 +0200 +++ new/nginx-rtmp-module-1.2.1/hls/ngx_rtmp_hls_module.c 2017-11-29 11:47:32.000000000 +0100 @@ -1951,6 +1951,7 @@ ngx_log_error(NGX_LOG_ERR, s->connection->log, 0, "hls: error appending AUD NAL"); } + /* fall through */ case 9: aud_sent = 1; break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-rtmp-module-1.2.0/ngx_rtmp_access_module.c new/nginx-rtmp-module-1.2.1/ngx_rtmp_access_module.c --- old/nginx-rtmp-module-1.2.0/ngx_rtmp_access_module.c 2017-07-10 17:26:17.000000000 +0200 +++ new/nginx-rtmp-module-1.2.1/ngx_rtmp_access_module.c 2017-11-29 11:47:32.000000000 +0100 @@ -410,8 +410,8 @@ break; } - /* "all" passes through */ #endif + /* fall through */ default: /* AF_INET */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-rtmp-module-1.2.0/ngx_rtmp_amf.c new/nginx-rtmp-module-1.2.1/ngx_rtmp_amf.c --- old/nginx-rtmp-module-1.2.0/ngx_rtmp_amf.c 2017-07-10 17:26:17.000000000 +0200 +++ new/nginx-rtmp-module-1.2.1/ngx_rtmp_amf.c 2017-11-29 11:47:32.000000000 +0100 @@ -331,6 +331,7 @@ if (elts->type & NGX_RTMP_AMF_OPTIONAL) { return NGX_OK; } + /* fall through */ case NGX_ERROR: return NGX_ERROR; } @@ -398,6 +399,7 @@ if (ngx_rtmp_amf_get(ctx, &max_index, 4) != NGX_OK) { return NGX_ERROR; } + /* fall through */ case NGX_RTMP_AMF_OBJECT: if (ngx_rtmp_amf_read_object(ctx, data, @@ -592,6 +594,7 @@ if (ngx_rtmp_amf_put(ctx, &max_index, 4) != NGX_OK) { return NGX_ERROR; } + /* fall through */ case NGX_RTMP_AMF_OBJECT: type8 = NGX_RTMP_AMF_END; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-rtmp-module-1.2.0/ngx_rtmp_eval.c new/nginx-rtmp-module-1.2.1/ngx_rtmp_eval.c --- old/nginx-rtmp-module-1.2.0/ngx_rtmp_eval.c 2017-07-10 17:26:17.000000000 +0200 +++ new/nginx-rtmp-module-1.2.1/ngx_rtmp_eval.c 2017-11-29 11:47:32.000000000 +0100 @@ -154,6 +154,7 @@ name.len = p - name.data; ngx_rtmp_eval_append_var(ctx, &b, e, &name, log); + /* fall through */ case NORMAL: switch (c) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-rtmp-module-1.2.0/ngx_rtmp_init.c new/nginx-rtmp-module-1.2.1/ngx_rtmp_init.c --- old/nginx-rtmp-module-1.2.0/ngx_rtmp_init.c 2017-07-10 17:26:17.000000000 +0200 +++ new/nginx-rtmp-module-1.2.1/ngx_rtmp_init.c 2017-11-29 11:47:32.000000000 +0100 @@ -79,6 +79,7 @@ case AF_UNIX: unix_socket = 1; + /* fall through */ default: /* AF_INET */ sin = (struct sockaddr_in *) sa; @@ -110,6 +111,7 @@ case AF_UNIX: unix_socket = 1; + /* fall through */ default: /* AF_INET */ addr = port->addrs; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nginx-rtmp-module-1.2.0/ngx_rtmp_notify_module.c new/nginx-rtmp-module-1.2.1/ngx_rtmp_notify_module.c --- old/nginx-rtmp-module-1.2.0/ngx_rtmp_notify_module.c 2017-07-10 17:26:17.000000000 +0200 +++ new/nginx-rtmp-module-1.2.1/ngx_rtmp_notify_module.c 2017-11-29 11:47:32.000000000 +0100 @@ -892,6 +892,7 @@ n = 0; state = parse_name; + /* fall through */ case parse_name: switch (c) { @@ -919,6 +920,7 @@ break; } state = parse_value; + /* fall through */ case parse_value: if (c == '\n') { ++++++ ngx-fancyindex-0.4.1.tar.gz -> ngx-fancyindex-0.4.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ngx-fancyindex-0.4.1/.travis.yml new/ngx-fancyindex-0.4.2/.travis.yml --- old/ngx-fancyindex-0.4.1/.travis.yml 2016-08-18 19:49:47.000000000 +0200 +++ new/ngx-fancyindex-0.4.2/.travis.yml 2017-08-18 23:31:37.000000000 +0200 @@ -5,13 +5,16 @@ - gcc env: - # Mainline - - NGINX=1.11.3 - - NGINX=1.11.3 DYNAMIC=1 - # Stable - - NGINX=1.10.1 - - NGINX=1.10.1 DYNAMIC=1 - # Other configurations + # Mainline. + - NGINX=1.13.4 + - NGINX=1.13.4 DYNAMIC=1 + # Stable. + - NGINX=1.12.1 + - NGINX=1.12.1 DYNAMIC=1 + # Other configurations. + - NGINX=1.11.6 + - NGINX=1.10.2 + # Version 1.9.15 was the first with loadable module support. - NGINX=1.9.15 - NGINX=1.9.15 DYNAMIC=1 - NGINX=1.8.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ngx-fancyindex-0.4.1/CHANGELOG.md new/ngx-fancyindex-0.4.2/CHANGELOG.md --- old/ngx-fancyindex-0.4.1/CHANGELOG.md 2016-08-18 19:49:47.000000000 +0200 +++ new/ngx-fancyindex-0.4.2/CHANGELOG.md 2017-08-18 23:31:37.000000000 +0200 @@ -3,6 +3,24 @@ ## [Unreleased] +## [0.4.2] - 2017-08-19 +### Changed +- Generated HTML from the default template is now proper HTML5, and it should + pass validation (#52). +- File sizes now have decimal positions when using `fancyindex_exact_size off`. + (Patch by Anders Trier <<[email protected]>>.) +- Multiple updates to `README.rst` (Patches by Danila Vershinin + <<[email protected]>>, Iulian Onofrei, Lilian Besson, and Nick Geoghegan + <<[email protected]>>.) + +### Fixed +- Sorting by file size now also works correctly for directories which contain + files of sizes bigger than `INT_MAX`. (#74, fix suggestion by Chris Young.) +- Custom headers which fail to declare an UTF-8 encoding no longer cause table + header arrows to be rendered incorrectly by browsers (#50). +- Fix segmentation fault when opening directories with empty files (#61, patch + by Catgirl <<[email protected]>>.) + ## [0.4.1] - 2016-08-18 ### Added - New `fancyindex_directories_first` configuration directive (enabled by @@ -100,7 +118,8 @@ - `NEWS.rst` file, to act as change log. -[Unreleased]: https://github.com/aperezdc/ngx-fancyindex/compare/v0.4.1...HEAD +[Unreleased]: https://github.com/aperezdc/ngx-fancyindex/compare/v0.4.2...HEAD +[0.4.2]: https://github.com/aperezdc/ngx-fancyindex/compare/v0.4.1...v0.4.2 [0.4.1]: https://github.com/aperezdc/ngx-fancyindex/compare/v0.4.0...v0.4.1 [0.4.0]: https://github.com/aperezdc/ngx-fancyindex/compare/v0.3.6...v0.4.0 [0.3.6]: https://github.com/aperezdc/ngx-fancyindex/compare/v0.3.5...v0.3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ngx-fancyindex-0.4.1/README.rst new/ngx-fancyindex-0.4.2/README.rst --- old/ngx-fancyindex-0.4.1/README.rst 2016-08-18 19:49:47.000000000 +0200 +++ new/ngx-fancyindex-0.4.2/README.rst 2017-08-18 23:31:37.000000000 +0200 @@ -26,7 +26,27 @@ Requirements ============ -You will need the sources for Nginx_. Any version starting from the 0.7 +CentOS 7 +~~~~~~~~ + +For users of the `official stable <https://www.nginx.com/resources/wiki/start/topics/tutorials/install/>`__ Nginx repository, `extra packages repository with dynamic modules <https://www.getpagespeed.com/redhat>`__ is available and fancyindex is included. + +Install directly:: + + yum install https://extras.getpagespeed.com/redhat/7/x86_64/RPMS/nginx-module-fancyindex-1.12.0.0.4.1-1.el7.gps.x86_64.rpm + +Alternatively, add extras repository first (for future updates) and install the module:: + + yum install nginx-module-fancyindex + +Then load the module in `/etc/nginx/nginx.conf` using + + load_module "modules/ngx_http_fancyindex_module.so"; + +Other platforms +~~~~~~~~~~~~~~~ + +In most other cases you will need the sources for Nginx_. Any version starting from the 0.7 series onwards will work. Note that the modules *might* compile with versions in the 0.6 series by applying ``nginx-0.6-support.patch``, but this is unsupported (YMMV). @@ -58,7 +78,8 @@ Since version 0.4.0, the module can also be built as a `dynamic module <https://www.nginx.com/resources/wiki/extending/converting/>`_, - using ``--add-dynamic-module=…`` instead. + using ``--add-dynamic-module=…`` instead and ``load_module "modules/ngx_http_fancyindex_module.so";` + in the configuration file 4. Build and install the software:: @@ -92,10 +113,9 @@ * `Theme <https://github.com/TheInsomniac/Nginx-Fancyindex-Theme>`__ by `@TheInsomniac <https://github.com/TheInsomniac>`__. Uses custom header and footer. -* `Theme <https://github.com/nwrd/Nginx-Fancyindex-Theme>`__ by - nwrd <https://github.com/nwrd>`__. Uses custom header and footer, the - header includes search field to filter by filename using JavaScript - (`demo <http://nwrd.sly.io/>`__). +* `Theme <https://github.com/Naereen/Nginx-Fancyindex-Theme>`__ by + `Naereen <https://github.com/Naereen/>`__. Uses custom header and footer, the + header includes search field to filter by filename using JavaScript. Directives diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ngx-fancyindex-0.4.1/ngx_http_fancyindex_module.c new/ngx-fancyindex-0.4.2/ngx_http_fancyindex_module.c --- old/ngx-fancyindex-0.4.1/ngx_http_fancyindex_module.c 2016-08-18 19:49:47.000000000 +0200 +++ new/ngx-fancyindex-0.4.2/ngx_http_fancyindex_module.c 2017-08-18 23:31:37.000000000 +0200 @@ -190,6 +190,10 @@ */ #define ngx_sizeof_ssz(_s) (sizeof(_s) - 1) +/** + * Compute the length of a statically allocated array + */ +#define DIM(x) (sizeof(x)/sizeof(*(x))) /** * Copy a static zero-terminated string. Useful to output template @@ -552,16 +556,20 @@ off_t length; size_t len, root, copy, allocated; - u_char *filename, *last, scale; + int64_t multiplier; + u_char *filename, *last; ngx_tm_t tm; ngx_array_t entries; ngx_time_t *tp; - ngx_uint_t i; - ngx_int_t size; + ngx_uint_t i, j; ngx_str_t path; ngx_dir_t dir; ngx_buf_t *b; + static const char *sizes[] = { "EiB", "PiB", "TiB", "GiB", "MiB", "KiB", "B" }; + static const int64_t exbibyte = 1024LL * 1024LL * 1024LL * + 1024LL * 1024LL * 1024LL; + /* * NGX_DIR_MASK_LEN is lesser than NGX_HTTP_FANCYINDEX_PREALLOCATE */ @@ -982,41 +990,17 @@ *b->last++ = '-'; } else { length = entry[i].size; + multiplier = exbibyte; - if (length > 1024 * 1024 * 1024 - 1) { - size = (ngx_int_t) (length / (1024 * 1024 * 1024)); - if ((length % (1024 * 1024 * 1024)) - > (1024 * 1024 * 1024 / 2 - 1)) - { - size++; - } - scale = 'G'; - - } else if (length > 1024 * 1024 - 1) { - size = (ngx_int_t) (length / (1024 * 1024)); - if ((length % (1024 * 1024)) > (1024 * 1024 / 2 - 1)) { - size++; - } - scale = 'M'; - - } else if (length > 9999) { - size = (ngx_int_t) (length / 1024); - if (length % 1024 > 511) { - size++; - } - scale = 'K'; - - } else { - size = (ngx_int_t) length; - scale = '\0'; - } - - if (scale) { - b->last = ngx_sprintf(b->last, "%6i%c", size, scale); + for (j = 0; j < DIM(sizes) - 1 && length < multiplier; j++) + multiplier /= 1024; - } else { - b->last = ngx_sprintf(b->last, " %6i", size); - } + /* If we are showing the filesize in bytes, do not show a decimal */ + if (j == DIM(sizes) - 1) + b->last = ngx_sprintf(b->last, "%O %s", length, sizes[j]); + else + b->last = ngx_sprintf(b->last, "%.1f %s", + (float) length / multiplier, sizes[j]); } } @@ -1245,7 +1229,7 @@ ngx_http_fancyindex_entry_t *first = (ngx_http_fancyindex_entry_t *) one; ngx_http_fancyindex_entry_t *second = (ngx_http_fancyindex_entry_t *) two; - return (int) (second->size - first->size); + return (first->size > second->size) - (first->size < second->size); } @@ -1275,7 +1259,7 @@ ngx_http_fancyindex_entry_t *first = (ngx_http_fancyindex_entry_t *) one; ngx_http_fancyindex_entry_t *second = (ngx_http_fancyindex_entry_t *) two; - return (int) (first->size - second->size); + return (first->size > second->size) - (first->size < second->size); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ngx-fancyindex-0.4.1/t/03-exact_size_off.test new/ngx-fancyindex-0.4.2/t/03-exact_size_off.test --- old/ngx-fancyindex-0.4.1/t/03-exact_size_off.test 1970-01-01 01:00:00.000000000 +0100 +++ new/ngx-fancyindex-0.4.2/t/03-exact_size_off.test 2017-08-18 23:31:37.000000000 +0200 @@ -0,0 +1,8 @@ +#! /bin/bash +cat <<--- +We test if the output from using "fancyindex_exact_size off" looks sane +-- +nginx_start 'fancyindex_exact_size off;' +content=$(fetch) +grep -e '[1-9]\.[0-9] KiB' <<< "${content}" +grep -E '[0-9]+ B' <<< "${content}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ngx-fancyindex-0.4.1/t/bug61-empty-file-segfault.test new/ngx-fancyindex-0.4.2/t/bug61-empty-file-segfault.test --- old/ngx-fancyindex-0.4.1/t/bug61-empty-file-segfault.test 1970-01-01 01:00:00.000000000 +0100 +++ new/ngx-fancyindex-0.4.2/t/bug61-empty-file-segfault.test 2017-08-18 23:31:37.000000000 +0200 @@ -0,0 +1,16 @@ +#! /bin/bash +cat <<--- +Bug #61: Listing a directory with an empty file crashes Nginx +https://github.com/aperezdc/ngx-fancyindex/issues/61 +-- + +# Prepare an empty directory with an empty file +mkdir -p "${TESTDIR}/bug61" +touch "${TESTDIR}/bug61/bug61.txt" + +nginx_start 'fancyindex_exact_size off;' +content=$(fetch /bug61/) +test -n "${content}" || fail "Empty response" +echo "Response:" +echo "${content}" +nginx_is_running || fail "Nginx died" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ngx-fancyindex-0.4.1/t/run new/ngx-fancyindex-0.4.2/t/run --- old/ngx-fancyindex-0.4.1/t/run 2016-08-18 19:49:47.000000000 +0200 +++ new/ngx-fancyindex-0.4.2/t/run 2017-08-18 23:31:37.000000000 +0200 @@ -26,7 +26,7 @@ declare -a t_pass=( ) declare -a t_fail=( ) -for t in "$T"/*.test ; do +for t in `ls "$T"/*.test | sort -R` ; do name="t/${t##*/}" name=${name%.test} printf "${name} ... " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ngx-fancyindex-0.4.1/template.h new/ngx-fancyindex-0.4.2/template.h --- old/ngx-fancyindex-0.4.1/template.h 2016-08-18 19:49:47.000000000 +0200 +++ new/ngx-fancyindex-0.4.2/template.h 2017-08-18 23:31:37.000000000 +0200 @@ -1,12 +1,10 @@ /* Automagically generated, do not edit! */ static const u_char t01_head1[] = "" -"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" -"\n" -"<html xmlns=\"http://www.w3.org/1999/xhtml\">" -"\n" +"<!DOCTYPE html>" +"<html>" "<head>" -"<meta name=\"viewport\" content=\"width=device-width\"/>" -"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>" +"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">" +"<meta name=\"viewport\" content=\"width=device-width\">" "<style type=\"text/css\">" "body,html {" "background:#fff;" @@ -56,19 +54,12 @@ "\n" ; static const u_char t06_list1[] = "" -"<table id=\"list\" cellpadding=\"0.1em\" cellspacing=\"0\">" -"\n" -"<colgroup>" -"<col width=\"55%\"/>" -"<col width=\"20%\"/>" -"<col width=\"25%\"/>" -"</colgroup>" -"\n" +"<table id=\"list\">" "<thead>" "<tr>" -"<th><a href=\"?C=N&O=A\">File Name</a> <a href=\"?C=N&O=D\"> ↓ </a></th>" -"<th><a href=\"?C=S&O=A\">File Size</a> <a href=\"?C=S&O=D\"> ↓ </a></th>" -"<th><a href=\"?C=M&O=A\">Date</a> <a href=\"?C=M&O=D\"> ↓ </a></th>" +"<th style=\"width:55%\"><a href=\"?C=N&O=A\">File Name</a> <a href=\"?C=N&O=D\"> ↓ </a></th>" +"<th style=\"width:20%\"><a href=\"?C=S&O=A\">File Size</a> <a href=\"?C=S&O=D\"> ↓ </a></th>" +"<th style=\"width:25%\"><a href=\"?C=M&O=A\">Date</a> <a href=\"?C=M&O=D\"> ↓ </a></th>" "</tr>" "</thead>" "\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ngx-fancyindex-0.4.1/template.html new/ngx-fancyindex-0.4.2/template.html --- old/ngx-fancyindex-0.4.1/template.html 2016-08-18 19:49:47.000000000 +0200 +++ new/ngx-fancyindex-0.4.2/template.html 2017-08-18 23:31:37.000000000 +0200 @@ -1,11 +1,9 @@ <!-- var t01_head1 --> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - +<!DOCTYPE html> +<html> <head> - <meta http-equiv="content-type" content="text/html; charset=utf-8"/> - <meta name="viewport" content="width=device-width"/> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <meta name="viewport" content="width=device-width"> <style type="text/css"> body,html { background:#fff; @@ -54,19 +52,12 @@ </h1> <!-- var t06_list1 --> - <table id="list" cellpadding="0.1em" cellspacing="0"> - - <colgroup> - <col width="55%"/> - <col width="20%"/> - <col width="25%"/> - </colgroup> - + <table id="list"> <thead> <tr> - <th><a href="?C=N&O=A">File Name</a> <a href="?C=N&O=D"> ↓ </a></th> - <th><a href="?C=S&O=A">File Size</a> <a href="?C=S&O=D"> ↓ </a></th> - <th><a href="?C=M&O=A">Date</a> <a href="?C=M&O=D"> ↓ </a></th> + <th style="width:55%"><a href="?C=N&O=A">File Name</a> <a href="?C=N&O=D"> ↓ </a></th> + <th style="width:20%"><a href="?C=S&O=A">File Size</a> <a href="?C=S&O=D"> ↓ </a></th> + <th style="width:25%"><a href="?C=M&O=A">Date</a> <a href="?C=M&O=D"> ↓ </a></th> </tr> </thead>
