From d2eac78c576ec6b8d2e65c4f75e32d150c545af7 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Mon, 27 Jan 2020 16:52:45 +0300 Subject: Updated copyright notice. --- NOTICE | 13 +++++++++---- pkg/deb/debian/copyright | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/NOTICE b/NOTICE index 35f52459..8d08b08b 100644 --- a/NOTICE +++ b/NOTICE @@ -1,10 +1,15 @@ NGINX Unit. - Copyright 2017-2019 NGINX, Inc. - Copyright 2017-2019 Igor Sysoev - Copyright 2017-2019 Valentin V. Bartenev - Copyright 2017-2019 Max Romanov + Copyright 2017-2020 NGINX, Inc. + Copyright 2017-2020 Igor Sysoev + Copyright 2017-2020 Valentin V. Bartenev + Copyright 2017-2020 Max Romanov + Copyright 2017-2020 Andrei Zeliankou + Copyright 2017-2020 Andrei Belov + Copyright 2018-2020 Konstantin Pavlov + Copyright 2019-2020 Tiago Natel de Moura + Copyright 2019-2020 Axel Duch Copyright 2018-2019 Alexander Borisov Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/deb/debian/copyright b/pkg/deb/debian/copyright index fe52d6aa..2acb87b9 100644 --- a/pkg/deb/debian/copyright +++ b/pkg/deb/debian/copyright @@ -1,10 +1,15 @@ NGINX Unit. - Copyright 2017-2019 NGINX, Inc. - Copyright 2017-2019 Igor Sysoev - Copyright 2017-2019 Valentin V. Bartenev - Copyright 2017-2019 Max Romanov + Copyright 2017-2020 NGINX, Inc. + Copyright 2017-2020 Igor Sysoev + Copyright 2017-2020 Valentin V. Bartenev + Copyright 2017-2020 Max Romanov + Copyright 2017-2020 Andrei Zeliankou + Copyright 2017-2020 Andrei Belov + Copyright 2018-2020 Konstantin Pavlov + Copyright 2019-2020 Tiago Natel de Moura + Copyright 2019-2020 Axel Duch Copyright 2018-2019 Alexander Borisov Licensed under the Apache License, Version 2.0 (the "License"); -- cgit From 4bad2cf1e983c90f9a240b9a03adaeb334fcb072 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Mon, 27 Jan 2020 16:52:53 +0300 Subject: Version bump. --- version | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version b/version index 037e31ce..b694bfda 100644 --- a/version +++ b/version @@ -1,5 +1,5 @@ # Copyright (C) NGINX, Inc. -NXT_VERSION=1.14.0 -NXT_VERNUM=11400 +NXT_VERSION=1.15.0 +NXT_VERNUM=11500 -- cgit From 2f8b243fa466b68eb657119d612075bffeea364e Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 28 Jan 2020 16:59:12 +0300 Subject: Ruby: changing callback functions prototype for v2.7. This closes #371 issue on GitHub. --- src/ruby/nxt_ruby.c | 6 ++++-- src/ruby/nxt_ruby_stream_io.c | 18 +++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/ruby/nxt_ruby.c b/src/ruby/nxt_ruby.c index e4b30319..417e2d8d 100644 --- a/src/ruby/nxt_ruby.c +++ b/src/ruby/nxt_ruby.c @@ -52,7 +52,8 @@ static int nxt_ruby_hash_info(VALUE r_key, VALUE r_value, VALUE arg); static int nxt_ruby_hash_add(VALUE r_key, VALUE r_value, VALUE arg); static int nxt_ruby_rack_result_body(VALUE result); static int nxt_ruby_rack_result_body_file_write(VALUE filepath); -static VALUE nxt_ruby_rack_result_body_each(VALUE body); +static VALUE nxt_ruby_rack_result_body_each(VALUE body, VALUE arg, + int argc, const VALUE *argv, VALUE blockarg); static void nxt_ruby_exception_log(nxt_task_t *task, uint32_t level, const char *desc); @@ -813,7 +814,8 @@ nxt_ruby_rack_result_body_file_write(VALUE filepath) static VALUE -nxt_ruby_rack_result_body_each(VALUE body) +nxt_ruby_rack_result_body_each(VALUE body, VALUE arg, int argc, + const VALUE *argv, VALUE blockarg) { int rc; diff --git a/src/ruby/nxt_ruby_stream_io.c b/src/ruby/nxt_ruby_stream_io.c index fcfcf5dd..7e8b3ce1 100644 --- a/src/ruby/nxt_ruby_stream_io.c +++ b/src/ruby/nxt_ruby_stream_io.c @@ -10,15 +10,15 @@ static VALUE nxt_ruby_stream_io_new(VALUE class, VALUE wrap); static VALUE nxt_ruby_stream_io_initialize(int argc, VALUE *argv, VALUE self); -static VALUE nxt_ruby_stream_io_gets(VALUE obj, VALUE args); -static VALUE nxt_ruby_stream_io_each(VALUE obj, VALUE args); +static VALUE nxt_ruby_stream_io_gets(VALUE obj); +static VALUE nxt_ruby_stream_io_each(VALUE obj); static VALUE nxt_ruby_stream_io_read(VALUE obj, VALUE args); -static VALUE nxt_ruby_stream_io_rewind(VALUE obj, VALUE args); +static VALUE nxt_ruby_stream_io_rewind(VALUE obj); static VALUE nxt_ruby_stream_io_puts(VALUE obj, VALUE args); static VALUE nxt_ruby_stream_io_write(VALUE obj, VALUE args); nxt_inline long nxt_ruby_stream_io_s_write(nxt_ruby_run_ctx_t *run_ctx, VALUE val); -static VALUE nxt_ruby_stream_io_flush(VALUE obj, VALUE args); +static VALUE nxt_ruby_stream_io_flush(VALUE obj); VALUE @@ -85,7 +85,7 @@ nxt_ruby_stream_io_initialize(int argc, VALUE *argv, VALUE self) static VALUE -nxt_ruby_stream_io_gets(VALUE obj, VALUE args) +nxt_ruby_stream_io_gets(VALUE obj) { VALUE buf; char *p; @@ -132,7 +132,7 @@ nxt_ruby_stream_io_gets(VALUE obj, VALUE args) static VALUE -nxt_ruby_stream_io_each(VALUE obj, VALUE args) +nxt_ruby_stream_io_each(VALUE obj) { VALUE chunk; @@ -141,7 +141,7 @@ nxt_ruby_stream_io_each(VALUE obj, VALUE args) } for ( ;; ) { - chunk = nxt_ruby_stream_io_gets(obj, Qnil); + chunk = nxt_ruby_stream_io_gets(obj); if (chunk == Qnil) { return Qnil; @@ -203,7 +203,7 @@ nxt_ruby_stream_io_read(VALUE obj, VALUE args) static VALUE -nxt_ruby_stream_io_rewind(VALUE obj, VALUE args) +nxt_ruby_stream_io_rewind(VALUE obj) { return Qnil; } @@ -266,7 +266,7 @@ nxt_ruby_stream_io_s_write(nxt_ruby_run_ctx_t *run_ctx, VALUE val) static VALUE -nxt_ruby_stream_io_flush(VALUE obj, VALUE args) +nxt_ruby_stream_io_flush(VALUE obj) { return Qnil; } -- cgit From a58ca623cdd3b2eeb2dec563c524afef47c3fc2e Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 28 Jan 2020 17:00:28 +0300 Subject: Packages: added curl dependency to fetch Java archives. --- pkg/deb/Makefile.jsc-common | 2 +- pkg/rpm/Makefile.jsc-common | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/deb/Makefile.jsc-common b/pkg/deb/Makefile.jsc-common index 029114a6..42b4ad74 100644 --- a/pkg/deb/Makefile.jsc-common +++ b/pkg/deb/Makefile.jsc-common @@ -16,7 +16,7 @@ MODULE_CONFARGS_jsc_common= java --home=/usr/lib/jvm/java-$(JAVA_MINVERSION)-ope MODULE_MAKEARGS_jsc_common= java MODULE_INSTARGS_jsc_common= java-shared-install -BUILD_DEPENDS_jsc_common= openjdk-$(JAVA_MINVERSION)-jdk-headless openjdk-$(JAVA_MINVERSION)-jre-headless +BUILD_DEPENDS_jsc_common= openjdk-$(JAVA_MINVERSION)-jdk-headless openjdk-$(JAVA_MINVERSION)-jre-headless curl BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc_common) MODULE_NOARCH_jsc_common= true diff --git a/pkg/rpm/Makefile.jsc-common b/pkg/rpm/Makefile.jsc-common index d8c308de..959c6b9d 100644 --- a/pkg/rpm/Makefile.jsc-common +++ b/pkg/rpm/Makefile.jsc-common @@ -14,7 +14,7 @@ MODULE_INSTARGS_jsc_common= java-shared-install MODULE_SOURCES_jsc_common= COPYRIGHT.unit-jsc-common -BUILD_DEPENDS_jsc_common= java-1.8.0-openjdk-devel +BUILD_DEPENDS_jsc_common= java-1.8.0-openjdk-devel curl BUILD_DEPENDS+= $(BUILD_DEPENDS_jsc_common) define MODULE_DEFINITIONS_jsc_common -- cgit From 04bf6457c60ddba195f6ddfdb9b119ab34feb1d2 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 28 Jan 2020 17:01:21 +0300 Subject: Java: fixing maven repository URL. It is required to use https scheme and different host to download packages from maven repository. --- auto/modules/java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto/modules/java b/auto/modules/java index b0fd62f1..7d87aed3 100644 --- a/auto/modules/java +++ b/auto/modules/java @@ -5,7 +5,7 @@ shift NXT_JAVA_HOME=${JAVA_HOME-} -NXT_JAR_REPO=http://central.maven.org/maven2/ +NXT_JAR_REPO=https://repo1.maven.org/maven2/ NXT_JAR_LOCAL_REPO=$HOME/.m2/repository/ for nxt_option; do -- cgit From 1949be644cff80c7d9d45215a8042e657b8e1087 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 28 Jan 2020 17:02:51 +0300 Subject: Java: introducing SHA512 sum validation for external JARs. --- auto/modules/java | 2 ++ auto/modules/java_chk_sha512 | 49 ++++++++++++++++++++++++++++++++++++++++++++ auto/modules/java_get_jar | 12 ++++++++++- auto/modules/java_jar.sha512 | 14 +++++++++++++ 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 auto/modules/java_chk_sha512 create mode 100644 auto/modules/java_jar.sha512 diff --git a/auto/modules/java b/auto/modules/java index 7d87aed3..0ca6c732 100644 --- a/auto/modules/java +++ b/auto/modules/java @@ -22,6 +22,7 @@ for nxt_option; do --lib-path=*) NXT_JAVA_LIB_PATH="$value" ;; --repo=*) NXT_JAR_REPO="$value" ;; --local-repo=*) NXT_JAR_LOCAL_REPO="$value" ;; + --sha512=*) NXT_SHA512_TOOL="$value" ;; --jars=*) NXT_JARS="$value" ;; --help) @@ -34,6 +35,7 @@ for nxt_option; do default: "$NXT_JAR_REPO" --local-repo=DIR set local repository directory default: "$NXT_JAR_LOCAL_REPO" + --sha512=SHA512 set command for SHA512 check --jars=DIR set jars install/search directory END diff --git a/auto/modules/java_chk_sha512 b/auto/modules/java_chk_sha512 new file mode 100644 index 00000000..10891cee --- /dev/null +++ b/auto/modules/java_chk_sha512 @@ -0,0 +1,49 @@ + +# Copyright (C) NGINX, Inc. + +# NXT_JAR_FILE= +# NXT_JAR_CHK_FILE= + +NXT_SHA512_TOOL=${NXT_SHA512_TOOL=} + +if [ -z "$NXT_SHA512_TOOL" ]; then + $echo -n "looking for sha512 check tool ..." + $echo "looking for sha512 check tool ..." >> $NXT_AUTOCONF_ERR + + if sha512sum --version >/dev/null 2>&1; then + NXT_SHA512_TOOL="sha512sum --check" + else + if shasum --version >/dev/null 2>&1; then + NXT_SHA512_TOOL="shasum -a 512 --check" + else + if openssl version >/dev/null 2>&1; then + NXT_SHA512_TOOL="openssl dgst -sha512" + fi + fi + fi + + if [ -z "$NXT_SHA512_TOOL" ]; then + $echo " not found" + $echo + $echo $0: error: no sha512 tool found. + $echo + $echo "error: no sha512 tool found" >> $NXT_AUTOCONF_ERR + exit 1 + fi + + $echo " $NXT_SHA512_TOOL" + $echo "found $NXT_SHA512_TOOL" >> $NXT_AUTOCONF_ERR +fi + +if [ -f "$NXT_JAR_CHK_FILE" ]; then + NXT_JAR_SHA512=`grep -F $NXT_JAR_FILE auto/modules/java_jar.sha512 | head -c 128` + NXT_JAR_CHK=${NXT_JAR_CHK_FILE}.sha512.$$ + $echo "$NXT_JAR_SHA512 $NXT_JAR_CHK_FILE" > $NXT_JAR_CHK + + if ! $NXT_SHA512_TOOL $NXT_JAR_CHK >/dev/null 2>&1; then + $echo "SHA512 not matched for $NXT_JAR_FILE, removing $NXT_JAR_CHK_FILE" + rm -f $NXT_JAR_CHK_FILE + fi + + rm -f $NXT_JAR_CHK +fi diff --git a/auto/modules/java_get_jar b/auto/modules/java_get_jar index 52cd146f..81b300f9 100644 --- a/auto/modules/java_get_jar +++ b/auto/modules/java_get_jar @@ -13,13 +13,23 @@ NXT_JAR_LOCAL="${NXT_JAR_LOCAL_DIR}/${NXT_JAR_FILE}" NXT_JAR_LOCAL_TMP="${NXT_JAR_LOCAL_DIR}/.${NXT_JAR_FILE}.$$" NXT_JAR_URL=${NXT_JAR_REPO}${NXT_JAR_NAMESPACE}${NXT_JAR_NAME}/${NXT_JAR_VERSION}/${NXT_JAR_FILE} +NXT_JAR_CHK_FILE="$NXT_BUILD_DIR/$NXT_JAR_FILE" +. auto/modules/java_chk_sha512 + if [ ! -f "$NXT_BUILD_DIR/$NXT_JAR_FILE" ]; then - if [ ! -f "$NXT_JAR_LOCAL" ]; then + NXT_JAR_CHK_FILE=$NXT_JAR_LOCAL + . auto/modules/java_chk_sha512 + + if [ ! -f "${NXT_JAR_LOCAL}" ]; then $echo "getting remote $NXT_JAR_FILE ... " $echo "getting remote $NXT_JAR_FILE ..." >> $NXT_AUTOCONF_ERR mkdir -p "${NXT_JAR_LOCAL_DIR}" curl --progress-bar "$NXT_JAR_URL" -o "$NXT_JAR_LOCAL_TMP" + + NXT_JAR_CHK_FILE=$NXT_JAR_LOCAL_TMP + . auto/modules/java_chk_sha512 + mv "$NXT_JAR_LOCAL_TMP" "$NXT_JAR_LOCAL" else $echo "getting local $NXT_JAR_FILE" diff --git a/auto/modules/java_jar.sha512 b/auto/modules/java_jar.sha512 new file mode 100644 index 00000000..0f6daa8e --- /dev/null +++ b/auto/modules/java_jar.sha512 @@ -0,0 +1,14 @@ +21cf5171c84fb12d0903d4f7d4f62e8b3dc60142ca1c717c46f7e09f6d40ea9a05a5bca34d468e00a00b427991de966fb060dcc282d532ee6a21567f802abfab classgraph-4.4.11.jar +7287b1ea3e18423d027a99ce40ae72e46e1700a65b474d2ec09af6a17b10653b7c2e69e9bb87efe14f4c593dc66b6370ea566fce90edb4b4190a903046817e6f ecj-3.13.102.jar +4626b970aa4d04422db93a4847eb9749768042255e0ba4d4944e1a8ca854de9e5eb093fbf5f0c05b122b65885324a9afdb1819acfb936514848c0726537cd403 jetty-http-9.4.12.v20180830.jar +19c0ea335efd54f6758b64725b4938cd124e60856b8966e1c60d33a5ebe3c62eea5babe5974c3a1b2c5ea49013ba5fc99aaa1a27e5a9c85e46f693fc679e5309 jetty-server-9.4.12.v20180830.jar +37ab6c29e925138d09a99bba9ead16b693318d8e098f1cf19fb56438c5d96479410628a84fa5a6c410850226acf1542aeab2a4894cebc9af8afa021c767d71f0 jetty-util-9.4.12.v20180830.jar +bf57568311fceb52f6611a2284d395cf181b634e4b44179766201f27b5a8c6981339aa35b3a0cb270d81d2a026e3ee724912040e0df5cf5ffd6442588b5b1e49 tomcat-api-9.0.13.jar +68238e5e00c7d0f0b159950a3c7ad6f666b343f7b31c5f0349a1e3184dea9c96ef50def82cc1025d6bcd4bc564d36306a169f96be7677185585ea2469b84a128 tomcat-el-api-9.0.13.jar +51c40eca728a34a96b2af0891355733e5ab5fc3ac5eec62f57e1ea905426b573bf9d55637d3b831838694054fc4d9dd06e48eb98eca57584d2750651bd286e0b tomcat-jasper-9.0.13.jar +ec64d3796a7f7224b451659f7f2b4a48da8a63da46557934d82c07420fa237a23c077f94908caa557ef51776d9e0a98b75cf43e6639c07f26aedb1ed4be99a62 tomcat-jasper-el-9.0.13.jar +2b5b92269c92e981268e346dc1484ebf4c7e481c2be26d90b02f650f94097bc8b9f9f1bc6579896e036a69747f41bf8493b3fa8d7626beaba95b28ae77f0f8ab tomcat-jsp-api-9.0.13.jar +f97891d80a6f96e9c10e5aa1d6a917961307f1a523266f4b0b857bb9a9bbe13ad09352a52e287d2dff84d18948ca25908ff13689eaea5bd806053c87822a892d tomcat-juli-9.0.13.jar +6579b30d95fa104663e2dced86115593868f18448f38235d88ccb003eeeeb61b49532300a30e7437e5c709891601f6b9909c33f1f7bcdf93ac118b67a742fdf1 tomcat-servlet-api-9.0.13.jar +af5d2f0209b7977e3d2ff6bb87dfa72aaa6684e9cd1aab7e48b4f0d389549c052c4d42cf3bd4c08837d79738609a9dfd93c9fdcf740d7a0ae851d9f8523ff65d tomcat-util-9.0.13.jar +18fb1a0f7e4ceb3416fc005e14f2eff6c49422806df03dfdd2a16ecc1292d55d59645707d408853573294446c2f525572dc3c94d45d32856c5d040945cbe416d tomcat-util-scan-9.0.13.jar -- cgit From 4e0a2002fe6d952cfc7e3bda925fff6c2311b90c Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 28 Jan 2020 17:03:19 +0300 Subject: Java: fixing configure errors reporting. --- auto/modules/java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/auto/modules/java b/auto/modules/java index 0ca6c732..68b10836 100644 --- a/auto/modules/java +++ b/auto/modules/java @@ -84,11 +84,12 @@ if [ -n "${NXT_JAVA_HOME}" ]; then NXT_JAVA="${NXT_JAVA_HOME}/bin/java" else - $echo -n "checking for java executable" + $echo -n "checking for java executable ..." $echo "checking for java executable ..." >> $NXT_AUTOCONF_ERR NXT_JAVA=`which java || :` if [ -z "$NXT_JAVA" -o ! -x "$NXT_JAVA" ]; then + $echo " not found" $echo $echo $0: error: java executable not found. $echo @@ -100,11 +101,12 @@ else "$NXT_JAVA" -version - $echo -n "checking java.home" + $echo -n "checking java.home ..." $echo "checking java.home ..." >> $NXT_AUTOCONF_ERR NXT_JAVA_HOME=`$NXT_JAVA -XshowSettings 2>&1 | grep -F -e java.home | sed -e 's/^.*= //'` if [ -z "$NXT_JAVA_HOME" ]; then + $echo " not found" $echo $echo $0: error: java.home not found. $echo @@ -149,10 +151,11 @@ case "$NXT_SYSTEM" in esac if [ -z "$NXT_JAVA_LIB_PATH" ]; then - $echo -n "checking library path" + $echo -n "checking library path ..." $echo "checking library path ..." >> $NXT_AUTOCONF_ERR if [ ! -x "$NXT_JAVA" ]; then + $echo " not found" $echo $echo $0: error: java executable not found. $echo @@ -162,6 +165,7 @@ if [ -z "$NXT_JAVA_LIB_PATH" ]; then NXT_JAVA_LIB_PATH=`$NXT_JAVA -XshowSettings 2>&1 | grep -F -e sun.boot.library.path | sed -e 's/^.*= //'` if [ -z "$NXT_JAVA_LIB_PATH" ]; then + $echo " not found" $echo $echo $0: error: library path not found. $echo -- cgit From 1451090d85db4152ba432b45d2e164b4f76bc80c Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 28 Jan 2020 17:06:57 +0300 Subject: Node.js: suppress compilation warning. --- src/nodejs/unit-http/unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nodejs/unit-http/unit.cpp b/src/nodejs/unit-http/unit.cpp index 1fa73689..64e076c1 100644 --- a/src/nodejs/unit-http/unit.cpp +++ b/src/nodejs/unit-http/unit.cpp @@ -844,7 +844,7 @@ Unit::response_write(napi_env env, napi_callback_info info) res_len = nxt_unit_response_write_nb(req, ptr, have_buf_len, 0); - ret = res_len < 0 ? -res_len : NXT_UNIT_OK; + ret = res_len < 0 ? -res_len : (int) NXT_UNIT_OK; } if (ret != NXT_UNIT_OK) { -- cgit From 4eb2d3086b4abbcbf6c81170bcf7b9ccefd05428 Mon Sep 17 00:00:00 2001 From: Axel Duch Date: Tue, 28 Jan 2020 15:05:12 +0000 Subject: Fixed missing IPv6 checking in route-addr and an unused variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This closes #363 issue on Github. Thanks to to 洪志道 (Hong Zhi Dao). --- src/nxt_http_route_addr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/nxt_http_route_addr.c b/src/nxt_http_route_addr.c index 3c7e9c84..6d4955ed 100644 --- a/src/nxt_http_route_addr.c +++ b/src/nxt_http_route_addr.c @@ -18,7 +18,7 @@ nxt_int_t nxt_http_route_addr_pattern_parse(nxt_mp_t *mp, nxt_http_route_addr_pattern_t *pattern, nxt_conf_value_t *cv) { - u_char *delim, *end; + u_char *delim; nxt_int_t ret, cidr_prefix; nxt_str_t addr, port; nxt_http_route_addr_base_t *base; @@ -59,6 +59,7 @@ nxt_http_route_addr_pattern_parse(nxt_mp_t *mp, if (nxt_str_looks_like_ipv6(&addr)) { #if (NXT_INET6) + u_char *end; uint8_t i; nxt_int_t len; nxt_http_route_in6_addr_range_t *inet6; @@ -179,7 +180,10 @@ nxt_http_route_addr_pattern_parse(nxt_mp_t *mp, return NXT_ADDR_PATTERN_FORMAT_ERROR; } - nxt_inet6_addr(&inet6->start, addr.start, addr.length); + ret = nxt_inet6_addr(&inet6->start, addr.start, addr.length); + if (nxt_slow_path(ret != NXT_OK)) { + return NXT_ADDR_PATTERN_FORMAT_ERROR; + } goto parse_port; #endif -- cgit From 4024b18bcc070240a5d1d79ff255b8209dd6908d Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 28 Jan 2020 19:20:46 +0300 Subject: Go: adding main configure CFLAGS and LDFLAGS to module build flags. This makes ASAN buildbot workers to work out-of-the-box. --- auto/modules/go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/auto/modules/go b/auto/modules/go index 2d53dd65..8bb9216e 100644 --- a/auto/modules/go +++ b/auto/modules/go @@ -85,6 +85,14 @@ if grep ^$NXT_GO: $NXT_MAKEFILE 2>&1 > /dev/null; then exit 1; fi +NXT_GO_LDFLAGS= + +for o in ${CFLAGS} ${NXT_CC_OPT}; do + case "$o" in + -fsanitize* | -L* | -l*) NXT_GO_LDFLAGS="${NXT_GO_LDFLAGS} $o" ;; + esac +done + cat << END >> $NXT_MAKEFILE .PHONY: ${NXT_GO} @@ -116,8 +124,9 @@ ${NXT_GO}-install-env: \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG}/env.go \ install -d \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG} $echo "package unit" > \$@ $echo "/*" >> \$@ + $echo "#cgo CFLAGS: ${CFLAGS} ${NXT_CC_OPT}" >> \$@ $echo "#cgo CPPFLAGS: -I${PWD}/src -I${PWD}/${NXT_BUILD_DIR}" >> \$@ - $echo "#cgo LDFLAGS: -L${PWD}/${NXT_BUILD_DIR}" >> \$@ + $echo "#cgo LDFLAGS: -L${PWD}/${NXT_BUILD_DIR} ${NXT_GO_LDFLAGS} ${NXT_LD_OPT}" >> \$@ $echo "*/" >> \$@ $echo 'import "C"' >> \$@ -- cgit From f860c20a96d9d844aad53f81dfcfc72f30ff977e Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 28 Jan 2020 19:18:26 +0300 Subject: PHP: added check for the ".php" extension. A check for the ".php" extension is added to prevent execution of files with arbitrary extensions in cases where "index" and "script" options aren't used. --- src/nxt_php_sapi.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c index 0f6ce686..26bf915f 100644 --- a/src/nxt_php_sapi.c +++ b/src/nxt_php_sapi.c @@ -599,20 +599,27 @@ nxt_php_request_handler(nxt_unit_request_info_t *req) path.start = nxt_unit_sptr_get(&r->path); if (nxt_php_script_filename.start == NULL) { + nxt_str_null(&script_name); + ctx->path_info.start = (u_char *) strstr((char *) path.start, ".php/"); if (ctx->path_info.start != NULL) { ctx->path_info.start += 4; path.length = ctx->path_info.start - path.start; ctx->path_info.length = r->path_length - path.length; - } - if (path.start[path.length - 1] == '/') { + } else if (path.start[path.length - 1] == '/') { script_name = nxt_php_index; } else { - script_name.length = 0; - script_name.start = NULL; + if (nxt_slow_path(path.length < 4 + || nxt_memcmp(path.start + (path.length - 4), + ".php", 4))) + { + nxt_unit_request_done(req, NXT_UNIT_ERROR); + + return; + } } ctx->script_filename.length = nxt_php_root.length + path.length -- cgit From 117a4f11b9c0af40810e492841b181e418dad165 Mon Sep 17 00:00:00 2001 From: Tiago Natel de Moura Date: Thu, 23 Jan 2020 11:57:15 +0000 Subject: Tests: check for php extension. --- test/php/phpinfo/index.wrong | 3 +++ test/test_php_application.py | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 test/php/phpinfo/index.wrong diff --git a/test/php/phpinfo/index.wrong b/test/php/phpinfo/index.wrong new file mode 100644 index 00000000..6c9e0678 --- /dev/null +++ b/test/php/phpinfo/index.wrong @@ -0,0 +1,3 @@ + diff --git a/test/test_php_application.py b/test/test_php_application.py index d614885c..837181e6 100644 --- a/test/test_php_application.py +++ b/test/test_php_application.py @@ -500,7 +500,17 @@ class TestPHPApplication(TestApplicationPHP): ), 'configure index default' ) - self.assertEqual(self.get()['status'], 200, 'status') + resp = self.get() + + self.assertEqual(resp['status'], 200, 'status') + self.assertNotEqual(resp['body'], '', 'body not empty') + + def test_php_application_extension_check(self): + self.load('phpinfo') + + self.assertNotEqual( + self.get(url='/index.wrong')['status'], 200, 'status' + ) if __name__ == '__main__': TestPHPApplication.main() -- cgit From 224549a578084854ab7656e01de82119a196f47b Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 3 Feb 2020 11:13:55 +0300 Subject: Freeing memory allocated for engine structure in case of error. Found by Coverity (CID 353389). --- src/nxt_event_engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nxt_event_engine.c b/src/nxt_event_engine.c index 6f051067..4384d3b1 100644 --- a/src/nxt_event_engine.c +++ b/src/nxt_event_engine.c @@ -156,9 +156,9 @@ signals_fail: #if 0 fibers_fail: +#endif nxt_free(engine); -#endif return NULL; } -- cgit From 51120e06e32502c75010644d8b63086221ea78f9 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 3 Feb 2020 11:14:06 +0300 Subject: Added missing stream argument to error message. Found by Coverity (CID 353386). --- src/nxt_unit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nxt_unit.c b/src/nxt_unit.c index 95874db3..27dc4751 100644 --- a/src/nxt_unit.c +++ b/src/nxt_unit.c @@ -871,7 +871,8 @@ nxt_unit_process_new_port(nxt_unit_ctx_t *ctx, nxt_unit_recv_msg_t *recv_msg) if (nxt_slow_path(ioctl(recv_msg->fd, FIONBIO, &nb) == -1)) { nxt_unit_alert(ctx, "#%"PRIu32": new_port: ioctl(%d, FIONBIO, 0) " - "failed: %s (%d)", recv_msg->fd, strerror(errno), errno); + "failed: %s (%d)", + recv_msg->stream, recv_msg->fd, strerror(errno), errno); return NXT_UNIT_ERROR; } -- cgit From 8c0f2cebf5eba555d104c42b556e54635f5d0890 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 3 Feb 2020 11:14:14 +0300 Subject: Storing pointer to next buffer in chain before free the buffer. This is required to avoid dereference of freed memory. Found by Coverity (CID 353372). --- src/nxt_buf_pool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nxt_buf_pool.c b/src/nxt_buf_pool.c index 8259c60a..f2be88a7 100644 --- a/src/nxt_buf_pool.c +++ b/src/nxt_buf_pool.c @@ -172,11 +172,12 @@ nxt_buf_pool_free(nxt_buf_pool_t *bp, nxt_buf_t *b) void nxt_buf_pool_destroy(nxt_buf_pool_t *bp) { - nxt_buf_t *b; + nxt_buf_t *b, *n; bp->destroy = 1; - for (b = bp->free; b != NULL; b = b->next) { + for (b = bp->free; b != NULL; b = n) { + n = b->next; nxt_buf_free(bp->mem_pool, b); } -- cgit From 7ea9ebc55a22fec53bb095975e639d4fbfebb575 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 3 Feb 2020 11:20:59 +0300 Subject: Fixed req_app_link reference counting on cancellation. Re-scheduled req_app_link structures should have use_count exactly equal to the number of references from the application and port list. However, there's one extra usage decrement that occurs after the req_app_link is created because the use_count is initialised as 1. This patch removes all excess instances of the usage decrement that caused preliminary req_app_link release and router process crash. To reproduce the issue need to cause request rescheduling between 2 app processes. This issue was introduced in 61e9f23a566d. --- src/nxt_router.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/nxt_router.c b/src/nxt_router.c index 6a1f3792..3ff048c5 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -3750,8 +3750,6 @@ nxt_router_response_error_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg, nxt_router_app_prepare_request(task, req_app_link); } - nxt_request_app_link_use(task, req_app_link, -1); - msg->port_msg.last = 0; return; @@ -4220,28 +4218,23 @@ re_ra_cancelled: if (nxt_router_port_post_select(task, &state) == NXT_OK) { /* * There should be call nxt_request_app_link_inc_use(re_ra), - * but we need to decrement use then. So, let's skip both. + * because of one more link in the queue. + * Corresponding decrement is in nxt_router_app_process_request(). */ + nxt_request_app_link_inc_use(re_ra); + nxt_work_queue_add(&task->thread->engine->fast_work_queue, nxt_router_app_process_request, &task->thread->engine->task, app, re_ra); - - } else { - /* - * This call should be unconditional, but we want to spare - * couple of CPU ticks to postpone the head death of the universe. - */ - - nxt_request_app_link_use(task, re_ra, -1); } } if (req_app_link != NULL) { /* - * Here we do the same trick as described above, - * but without conditions. - * Skip required nxt_request_app_link_inc_use(req_app_link). + * There should be call nxt_request_app_link_inc_use(req_app_link), + * because of one more link in the queue. But one link was + * recently removed from app->requests link. */ nxt_work_queue_add(&task->thread->engine->fast_work_queue, @@ -5205,8 +5198,6 @@ nxt_router_app_timeout(nxt_task_t *task, void *obj, void *data) if (nxt_router_port_post_select(task, &state) == NXT_OK) { nxt_router_app_prepare_request(task, pending_ra); } - - nxt_request_app_link_use(task, pending_ra, -1); } nxt_debug(task, "send quit to app '%V' pid %PI", &app->name, port->pid); -- cgit From 8eba2e5c3d8537521d3e010025e6078bc1fd28d6 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 3 Feb 2020 11:21:21 +0300 Subject: Initializing local buffer ctx_impl field for correct release. Uninitialized ctx_impl field may cause crash in application process. To reproduce the issue, need to trigger shared memory buffer send error on application side. In our case, send error caused by router process crash. This issue was introduced in 2c7f79bf0a1f. --- src/nxt_unit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nxt_unit.c b/src/nxt_unit.c index 27dc4751..ab622e56 100644 --- a/src/nxt_unit.c +++ b/src/nxt_unit.c @@ -3207,6 +3207,7 @@ nxt_unit_get_outgoing_buf(nxt_unit_ctx_t *ctx, nxt_unit_process_t *process, mmap_buf->port_id = *port_id; mmap_buf->process = process; mmap_buf->free_ptr = NULL; + mmap_buf->ctx_impl = nxt_container_of(ctx, nxt_unit_ctx_impl_t, ctx); nxt_unit_debug(ctx, "outgoing mmap allocation: (%d,%d,%d)", (int) hdr->id, (int) c, -- cgit From 7c38650cd12b9d5b14aec5d416fa3b57918cee50 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 4 Feb 2020 11:39:16 +0300 Subject: Removing duplicate macro definitions. This issue was introduced in 2c7f79bf0a1f. --- src/nxt_unit.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/nxt_unit.c b/src/nxt_unit.c index ab622e56..7c3d945c 100644 --- a/src/nxt_unit.c +++ b/src/nxt_unit.c @@ -19,10 +19,6 @@ #include #endif -#define NXT_UNIT_MAX_PLAIN_SIZE 1024 -#define NXT_UNIT_LOCAL_BUF_SIZE \ - (NXT_UNIT_MAX_PLAIN_SIZE + sizeof(nxt_port_msg_t)) - #define NXT_UNIT_MAX_PLAIN_SIZE 1024 #define NXT_UNIT_LOCAL_BUF_SIZE \ (NXT_UNIT_MAX_PLAIN_SIZE + sizeof(nxt_port_msg_t)) -- cgit From 81b39d0b35d78daabf479ccd492ae8323039b7cb Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 4 Feb 2020 11:39:34 +0300 Subject: Tests: fixing Python 3.8.1 errors on Mac. - "Can't pickle local object ..." - "if __name__ == '__main__':" pattern required for multiprocessing --- test/run.py | 19 ++++++++++--------- test/test_proxy.py | 7 ++++--- test/unit/main.py | 13 ++++--------- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/test/run.py b/test/run.py index 0504a6f7..b79d0484 100755 --- a/test/run.py +++ b/test/run.py @@ -4,16 +4,17 @@ import unittest import sys import os -loader = unittest.TestLoader() -suite = unittest.TestSuite() +if __name__ == '__main__': + loader = unittest.TestLoader() + suite = unittest.TestSuite() -this_dir = os.path.dirname(__file__) -tests = loader.discover(start_dir=this_dir) -suite.addTests(tests) + this_dir = os.path.dirname(__file__) + tests = loader.discover(start_dir=this_dir) + suite.addTests(tests) -runner = unittest.TextTestRunner(verbosity=3) -result = runner.run(suite) + runner = unittest.TextTestRunner(verbosity=3) + result = runner.run(suite) -ret = not (len(result.failures) == len(result.errors) == 0) + ret = not (len(result.failures) == len(result.errors) == 0) -sys.exit(ret) + sys.exit(ret) diff --git a/test/test_proxy.py b/test/test_proxy.py index 4697b88f..5d158285 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -10,11 +10,12 @@ class TestProxy(TestApplicationPython): SERVER_PORT = 7999 - def run_server(self): + @staticmethod + def run_server(server_port): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - server_address = ('', self.SERVER_PORT) + server_address = ('', server_port) sock.bind(server_address) sock.listen(5) @@ -57,7 +58,7 @@ Content-Length: 10 def setUp(self): super().setUp() - self.run_process(self.run_server) + self.run_process(self.run_server, self.SERVER_PORT) self.waitforsocket(self.SERVER_PORT) self.assertIn( diff --git a/test/unit/main.py b/test/unit/main.py index ea6afd7f..37d01d3b 100644 --- a/test/unit/main.py +++ b/test/unit/main.py @@ -209,9 +209,7 @@ class TestUnit(unittest.TestCase): print() - def _run_unit(): - subprocess.call( - [ + self._p = Process(target=subprocess.call, args=[ [ self.unitd, '--no-daemon', '--modules', self.pardir + '/build', @@ -219,10 +217,7 @@ class TestUnit(unittest.TestCase): '--pid', self.testdir + '/unit.pid', '--log', self.testdir + '/unit.log', '--control', 'unix:' + self.testdir + '/control.unit.sock', - ] - ) - - self._p = Process(target=_run_unit) + ] ]) self._p.start() if not self.waitforfiles( @@ -299,11 +294,11 @@ class TestUnit(unittest.TestCase): if found: print('skipped.') - def run_process(self, target): + def run_process(self, target, *args): if not hasattr(self, '_processes'): self._processes = [] - process = Process(target=target) + process = Process(target=target, args=args) process.start() self._processes.append(process) -- cgit From 29d8b34244e24095f23f5e483f8452035fbb77aa Mon Sep 17 00:00:00 2001 From: Tiago Natel de Moura Date: Wed, 5 Feb 2020 13:12:31 +0000 Subject: Kept the value of c->socket.read_handler while data is available. This closes #370 in GitHub. --- src/nxt_openssl.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/nxt_openssl.c b/src/nxt_openssl.c index 53ed0381..832d1f0d 100644 --- a/src/nxt_openssl.c +++ b/src/nxt_openssl.c @@ -633,10 +633,6 @@ nxt_openssl_conn_io_recvbuf(nxt_conn_t *c, nxt_buf_t *b) c->socket.fd, b->mem.free, size, ret, err); if (ret > 0) { - if ((size_t) ret < size) { - c->socket.read_ready = 0; - } - return ret; } -- cgit From d3e218a8c379baf1af4759097d3c9c2fedb01432 Mon Sep 17 00:00:00 2001 From: Tiago Natel de Moura Date: Wed, 5 Feb 2020 13:13:04 +0000 Subject: Tests: add helper for form-data and multipart. --- test/test_java_application.py | 39 ++++++++++------------- test/unit/http.py | 73 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 22 deletions(-) diff --git a/test/test_java_application.py b/test/test_java_application.py index d2b97f88..9d873d6b 100644 --- a/test/test_java_application.py +++ b/test/test_java_application.py @@ -1,3 +1,4 @@ +import io import os import time import unittest @@ -1223,31 +1224,25 @@ class TestJavaApplication(TestApplicationJava): os.mkdir(fulldst) self.public_dir(fulldst) - body = ( - """Preamble. Should be ignored.\r -\r ---12345\r -Content-Disposition: form-data; name="file"; filename="sample.txt"\r -Content-Type: text/plain\r -\r -Data from sample file\r ---12345\r -Content-Disposition: form-data; name="destination"\r -\r -%s\r ---12345\r -Content-Disposition: form-data; name="upload"\r -\r -Upload\r ---12345--\r -\r -Epilogue. Should be ignored.""" - % fulldst - ) + fields = { + 'file': { + 'filename': 'sample.txt', + 'type': 'text/plain', + 'data': io.StringIO('Data from sample file'), + }, + 'destination': fulldst, + 'upload': 'Upload', + } + + encoded, content_type = self.multipart_encode(fields) + + preamble = 'Preamble. Should be ignored.' + epilogue = 'Epilogue. Should be ignored.' + body = "%s\r\n%s\r\n%s" % (preamble, encoded.decode(), epilogue) resp = self.post( headers={ - 'Content-Type': 'multipart/form-data; boundary=12345', + 'Content-Type': content_type, 'Host': 'localhost', 'Connection': 'close', }, diff --git a/test/unit/http.py b/test/unit/http.py index 839e91a2..c71e8f7e 100644 --- a/test/unit/http.py +++ b/test/unit/http.py @@ -1,3 +1,6 @@ +import binascii +import io +import os import re import time import json @@ -68,6 +71,10 @@ class TestHTTP(TestUnit): if body != b'': if isinstance(body, str): body = body.encode() + elif isinstance(body, dict): + body, content_type = self.form_encode(body) + + headers['Content-Type'] = content_type if 'Content-Length' not in headers: headers['Content-Length'] = len(body) @@ -266,3 +273,69 @@ class TestHTTP(TestUnit): sock.close() self.assertTrue(ret, 'socket connected') + + def form_encode(self, fields): + is_multipart = False + + for _, value in fields.items(): + if isinstance(value, dict): + is_multipart = True + break + + if is_multipart: + body, content_type = self.multipart_encode(fields) + + else: + body, content_type = self.form_url_encode(fields) + + return body, content_type + + def form_url_encode(self, fields): + data = "&".join("%s=%s" % (name, value) + for name, value in fields.items()).encode() + return data, 'application/x-www-form-urlencoded' + + def multipart_encode(self, fields): + boundary = binascii.hexlify(os.urandom(16)).decode('ascii') + + body = '' + + for field, value in fields.items(): + filename = '' + datatype = '' + + if isinstance(value, dict): + datatype = 'text/plain' + filename = value['filename'] + + if value.get('type'): + datatype = value['type'] + + if not isinstance(value['data'], io.IOBase): + self.fail('multipart encoding of file requires a stream.') + + data = value['data'].read() + + elif isinstance(value, str): + data = value + + else: + self.fail('multipart requires a string or stream data') + + body += ( + "--%s\r\nContent-Disposition: form-data; name=\"%s\"" + ) % (boundary, field) + + if filename != '': + body += "; filename=\"%s\"" % filename + + body += "\r\n" + + if datatype != '': + body += "Content-Type: %s\r\n" % datatype + + body += "\r\n%s\r\n" % data + + body += "--%s--\r\n" % boundary + + return body.encode(), "multipart/form-data; boundary=%s" % boundary -- cgit From 12e15ba43b97fe54485c6251e7d17bcb563cf0fd Mon Sep 17 00:00:00 2001 From: Tiago Natel de Moura Date: Wed, 5 Feb 2020 13:29:41 +0000 Subject: Tests: added test for uploading files with SSL. * * * [mq]: multipart --- test/python/upload/wsgi.py | 27 +++++++++++++++++++++++++++ test/test_tls.py | 22 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 test/python/upload/wsgi.py diff --git a/test/python/upload/wsgi.py b/test/python/upload/wsgi.py new file mode 100644 index 00000000..37ee89eb --- /dev/null +++ b/test/python/upload/wsgi.py @@ -0,0 +1,27 @@ +from tempfile import TemporaryFile +import os, cgi + +def read(environ): + length = int(environ.get('CONTENT_LENGTH', 0)) + + body = TemporaryFile(mode='w+b') + body.write(bytes(environ['wsgi.input'].read(length))) + body.seek(0) + + environ['wsgi.input'] = body + return body + +def application(environ, start_response): + file = read(environ) + + form = cgi.FieldStorage(fp=file, environ=environ, keep_blank_values=True) + + filename = form['file'].filename + data = filename.encode() + form['file'].file.read() + + start_response('200 OK', [ + ('Content-Type', 'text/plain'), + ('Content-Length', str(len(data))), + ]) + + return data diff --git a/test/test_tls.py b/test/test_tls.py index 3514bbcb..1ead111c 100644 --- a/test/test_tls.py +++ b/test/test_tls.py @@ -1,3 +1,5 @@ +import io +import os import re import ssl import subprocess @@ -591,5 +593,25 @@ basicConstraints = critical,CA:TRUE""" 'url scheme https', ) + def test_tls_big_upload(self): + self.load('upload') + + self.certificate() + + self.add_tls(application='upload') + + filename = 'test.txt' + data = '0123456789' * 9000 + + res = self.post_ssl(body={ + 'file': { + 'filename': filename, + 'type': 'text/plain', + 'data': io.StringIO(data), + } + }) + self.assertEqual(res['status'], 200, 'status ok') + self.assertEqual(res['body'], filename + data) + if __name__ == '__main__': TestTLS.main() -- cgit From 672602d1eeadf890a41822d5523e6f92cdbc9611 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Thu, 6 Feb 2020 17:33:44 +0300 Subject: Added version 1.15.0 CHANGES. --- CHANGES | 15 +++++++++++++++ docs/changes.xml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/CHANGES b/CHANGES index 409de839..e8e1350f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,19 @@ +Changes with Unit 1.15.0 06 Feb 2020 + + *) Change: extensions of dynamically requested PHP scripts were + restricted to ".php". + + *) Feature: compatibility with Ruby 2.7. + + *) Bugfix: segmentation fault might have occurred in the router process + with multiple application processes under load; the bug had appeared + in 1.14.0. + + *) Bugfix: receiving request body over TLS connection might have + stalled. + + Changes with Unit 1.14.0 26 Dec 2019 *) Change: the Go package import name changed to "unit.nginx.org/go". diff --git a/docs/changes.xml b/docs/changes.xml index 41674739..3aa579fb 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -5,6 +5,59 @@ + + + + +NGINX Unit updated to 1.15.0. + + + + + + + + + + +extensions of dynamically requested PHP scripts were restricted to ".php". + + + + + +compatibility with Ruby 2.7. + + + + + +segmentation fault might have occurred in the router process with multiple +application processes under load; the bug had appeared in 1.14.0. + + + + + +receiving request body over TLS connection might have stalled. + + + + + + " -ENV UNIT_VERSION 1.14.0-1~buster +ENV UNIT_VERSION 1.15.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.go1.11-dev b/pkg/docker/Dockerfile.go1.11-dev index 92fa56f6..589680c8 100644 --- a/pkg/docker/Dockerfile.go1.11-dev +++ b/pkg/docker/Dockerfile.go1.11-dev @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.14.0-1~buster +ENV UNIT_VERSION 1.15.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.minimal b/pkg/docker/Dockerfile.minimal index 26a55d9c..3c3853eb 100644 --- a/pkg/docker/Dockerfile.minimal +++ b/pkg/docker/Dockerfile.minimal @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.14.0-1~buster +ENV UNIT_VERSION 1.15.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.perl5.28 b/pkg/docker/Dockerfile.perl5.28 index 3be4a6dc..92a88516 100644 --- a/pkg/docker/Dockerfile.perl5.28 +++ b/pkg/docker/Dockerfile.perl5.28 @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.14.0-1~buster +ENV UNIT_VERSION 1.15.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.php7.3 b/pkg/docker/Dockerfile.php7.3 index 36a2dfbf..0180909b 100644 --- a/pkg/docker/Dockerfile.php7.3 +++ b/pkg/docker/Dockerfile.php7.3 @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.14.0-1~buster +ENV UNIT_VERSION 1.15.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.python2.7 b/pkg/docker/Dockerfile.python2.7 index 0dd2f9a5..2942b0b5 100644 --- a/pkg/docker/Dockerfile.python2.7 +++ b/pkg/docker/Dockerfile.python2.7 @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.14.0-1~buster +ENV UNIT_VERSION 1.15.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.python3.7 b/pkg/docker/Dockerfile.python3.7 index fd6f1639..e8ca5c4a 100644 --- a/pkg/docker/Dockerfile.python3.7 +++ b/pkg/docker/Dockerfile.python3.7 @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.14.0-1~buster +ENV UNIT_VERSION 1.15.0-1~buster RUN set -x \ && apt-get update \ diff --git a/pkg/docker/Dockerfile.ruby2.5 b/pkg/docker/Dockerfile.ruby2.5 index 034ae542..b706e542 100644 --- a/pkg/docker/Dockerfile.ruby2.5 +++ b/pkg/docker/Dockerfile.ruby2.5 @@ -2,7 +2,7 @@ FROM debian:buster-slim LABEL maintainer="NGINX Docker Maintainers " -ENV UNIT_VERSION 1.14.0-1~buster +ENV UNIT_VERSION 1.15.0-1~buster RUN set -x \ && apt-get update \ -- cgit From 6e19090736612b39d4c5d0836d7df0722b8955e7 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Thu, 6 Feb 2020 18:20:37 +0300 Subject: Added tag 1.15.0 for changeset 801ac82f80fb --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 2610c3f3..7891526f 100644 --- a/.hgtags +++ b/.hgtags @@ -21,3 +21,4 @@ cdbba3c3e3762eacc308a5407877c3665a05058d 1.10.0 b391df5f0102aa6afe660cfc863729c1b1111c9e 1.12.0 3313bf222e6e0a91213946dfcbd70bb5079f4cef 1.13.0 6e28966ed1f26e119bf333229ea5e6686c60a469 1.14.0 +801ac82f80fb2b2333f2c03ac9c3df6b7cec130a 1.15.0 -- cgit