diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 97caad4e2..1e371505c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -35,12 +35,12 @@ jobs: python -m pip install --no-cache-dir --require-hashes -r src/common/db/requirements.txt echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV - name: Initialize CodeQL - uses: github/codeql-action/init@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12 + uses: github/codeql-action/init@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0 with: languages: ${{ matrix.language }} config-file: ./.github/codeql.yml setup-python-dependencies: false - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12 + uses: github/codeql-action/analyze@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml index cc03c0b22..85adacf3c 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/container-build.yml @@ -84,7 +84,7 @@ jobs: # Compute metadata - name: Extract metadata id: meta - uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e # v5.4.0 + uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.5.0 with: images: bunkerity/${{ inputs.IMAGE }} # Build cached image diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 69109b98b..ad70387e2 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -135,7 +135,7 @@ jobs: - name: Extract metadata if: inputs.TEST == true id: meta - uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e # v5.4.0 + uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.5.0 with: images: ghcr.io/bunkerity/${{ inputs.LINUX }}-tests:${{ inputs.RELEASE }} - name: Build test image diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index 05fa5d7be..5a5ab655c 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -63,7 +63,7 @@ jobs: # Compute metadata - name: Extract metadata id: meta - uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e # v5.4.0 + uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.5.0 with: images: bunkerity/${{ inputs.IMAGE }} # Build and push diff --git a/.github/workflows/push-github.yml b/.github/workflows/push-github.yml index 241b3be7a..4b7d9843e 100644 --- a/.github/workflows/push-github.yml +++ b/.github/workflows/push-github.yml @@ -19,7 +19,7 @@ jobs: # Get PDF doc - name: Get documentation if: inputs.VERSION != 'testing' - uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: name: BunkerWeb_documentation_v${{ inputs.VERSION }}.pdf # Create tag diff --git a/.github/workflows/push-packagecloud.yml b/.github/workflows/push-packagecloud.yml index 5bcbb259d..216e3c726 100644 --- a/.github/workflows/push-packagecloud.yml +++ b/.github/workflows/push-packagecloud.yml @@ -48,12 +48,12 @@ jobs: - name: Install packagecloud run: gem install package_cloud # Download packages - - uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 if: inputs.LINUX != 'el' with: name: package-${{ inputs.LINUX }}-${{ inputs.PACKAGE_ARCH }} path: /tmp/${{ inputs.LINUX }} - - uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 if: inputs.LINUX == 'el' with: name: package-rhel-${{ inputs.PACKAGE_ARCH }} diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml index 1f897f919..c4be7af18 100644 --- a/.github/workflows/scorecards-analysis.yml +++ b/.github/workflows/scorecards-analysis.yml @@ -25,6 +25,6 @@ jobs: results_format: sarif publish_results: true - name: "Upload SARIF results to code scanning" - uses: github/codeql-action/upload-sarif@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12 + uses: github/codeql-action/upload-sarif@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0 with: sarif_file: results.sarif diff --git a/.github/workflows/staging-delete-infra.yml b/.github/workflows/staging-delete-infra.yml index ddca65457..021c78b1d 100644 --- a/.github/workflows/staging-delete-infra.yml +++ b/.github/workflows/staging-delete-infra.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Install terraform uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0 - - uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: name: tf-${{ inputs.TYPE }} path: /tmp diff --git a/.github/workflows/staging-tests.yml b/.github/workflows/staging-tests.yml index a51ff335b..4cc8dd436 100644 --- a/.github/workflows/staging-tests.yml +++ b/.github/workflows/staging-tests.yml @@ -43,7 +43,7 @@ jobs: if: inputs.TYPE == 'swarm' - name: Install test dependencies run: pip3 install --no-cache-dir --require-hashes --no-deps -r tests/requirements.txt - - uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: name: tf-k8s path: /tmp diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c499385b..115951f9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,16 @@ # Changelog -## v1.5.5 - 2024/01/09 +## v1.5.6 - YYYY/MM/DD -- [BUGFIX] Fix issues with the database when upgrading from version 1.5.3 and 1.5.4 to the most recent version +- [MISC] Updated Linux base images in Dockerfiles +- [DEPS] Updated stream-lua-nginx-module to v0.0.14 +- [DEPS] Updated lua-nginx-module version to v0.10.26 +- [DEPS] Updated libmaxminddb version to v1.9.1 +- [DEPS] Updated lua-resty-core to v0.1.28 + +## v1.5.5 - 2024/01/12 + +- [BUGFIX] Fix issues with the database when upgrading from one version to a newer one - [BUGFIX] Fix ModSecurity-nginx to make it work with brotli - [BUGFIX] Remove certbot renew delay causing errors on k8s - [BUGFIX] Fix missing custom modsec files when BW instances change @@ -19,7 +27,6 @@ - [MISC] Various internal improvements in LUA code - [MISC] Check nginx configuration before reload - [MISC] Updated Python Docker image to 3.12.1-alpine3.18 in Dockerfiles -- [MISC] Switch gunicorn worker_class back to gevent in web UI - [DEPS] Updated ModSecurity to v3.0.11 ## v1.5.4 - 2023/12/04 diff --git a/docs/requirements.txt b/docs/requirements.txt index 8b5dacd8b..29bf34752 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -211,16 +211,16 @@ importlib-resources==6.1.1 \ --hash=sha256:3893a00122eafde6894c59914446a512f728a0c1a45f9bb9b63721b6bacf0b4a \ --hash=sha256:e8bf90d8213b486f428c9c39714b920041cb02c184686a3dee24905aaa8105d6 # via mike -jinja2==3.1.2 \ - --hash=sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852 \ - --hash=sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61 +jinja2==3.1.3 \ + --hash=sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa \ + --hash=sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90 # via # mike # mkdocs # mkdocs-material -markdown==3.5.1 \ - --hash=sha256:5874b47d4ee3f0b14d764324d2c94c03ea66bee56f2d929da9f2508d65e722dc \ - --hash=sha256:b65d7beb248dc22f2e8a31fb706d93798093c308dc1aba295aedeb9d41a813bd +markdown==3.5.2 \ + --hash=sha256:d43323865d89fc0cb9b20c75fc8ad313af307cc087e84b657d9eec768eddeadd \ + --hash=sha256:e1ac7b3dc550ee80e602e71c1d168002f062e49f1b11e26a36264dafd4df2ef8 # via # mkdocs # mkdocs-material diff --git a/src/autoconf/Dockerfile b/src/autoconf/Dockerfile index 65330ff4b..c2151afd9 100644 --- a/src/autoconf/Dockerfile +++ b/src/autoconf/Dockerfile @@ -64,7 +64,7 @@ RUN apk add --no-cache bash && \ chmod 750 cli/main.py helpers/*.sh /usr/bin/bwcli autoconf/main.py deps/python/bin/* # Fix CVEs -# There are no CVEs to fix in this image +RUN apk add --no-cache "libcrypto3>=3.1.4-r3" "libssl3>=3.1.4-r3" VOLUME /data /etc/nginx diff --git a/src/common/gen/requirements.in b/src/common/gen/requirements.in index 94055e71c..406f51f15 100644 --- a/src/common/gen/requirements.in +++ b/src/common/gen/requirements.in @@ -1,6 +1,6 @@ docker==7.0.0 -jinja2==3.1.2 -kubernetes==28.1.0 +jinja2==3.1.3 +kubernetes==29.0.0 python-dotenv==1.0.0 redis==5.0.1 urllib3<2.0.0 diff --git a/src/common/gen/requirements.txt b/src/common/gen/requirements.txt index 132c73e44..685a0975e 100644 --- a/src/common/gen/requirements.txt +++ b/src/common/gen/requirements.txt @@ -114,21 +114,21 @@ docker==7.0.0 \ --hash=sha256:12ba681f2777a0ad28ffbcc846a69c31b4dfd9752b47eb425a274ee269c5e14b \ --hash=sha256:323736fb92cd9418fc5e7133bc953e11a9da04f4483f828b527db553f1e7e5a3 # via -r requirements.in -google-auth==2.26.1 \ - --hash=sha256:2c8b55e3e564f298122a02ab7b97458ccfcc5617840beb5d0ac757ada92c9780 \ - --hash=sha256:54385acca5c0fbdda510cd8585ba6f3fcb06eeecf8a6ecca39d3ee148b092590 +google-auth==2.26.2 \ + --hash=sha256:3f445c8ce9b61ed6459aad86d8ccdba4a9afed841b2d1451a11ef4db08957424 \ + --hash=sha256:97327dbbf58cccb58fc5a1712bba403ae76668e64814eb30f7316f7e27126b81 # via kubernetes idna==3.6 \ --hash=sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca \ --hash=sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f # via requests -jinja2==3.1.2 \ - --hash=sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852 \ - --hash=sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61 +jinja2==3.1.3 \ + --hash=sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa \ + --hash=sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90 # via -r requirements.in -kubernetes==28.1.0 \ - --hash=sha256:10f56f8160dcb73647f15fafda268e7f60cf7dbc9f8e46d52fcd46d3beb0c18d \ - --hash=sha256:1468069a573430fb1cb5ad22876868f57977930f80a6749405da31cd6086a7e9 +kubernetes==29.0.0 \ + --hash=sha256:ab8cb0e0576ccdfb71886366efb102c6a20f268d817be065ce7f9909c631e43e \ + --hash=sha256:c4812e227ae74d07d53c88293e564e54b850452715a59a927e7e1bc6b9a60459 # via -r requirements.in markupsafe==2.1.3 \ --hash=sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e \ diff --git a/src/deps/deps.json b/src/deps/deps.json index fa7712eba..2cb51716c 100644 --- a/src/deps/deps.json +++ b/src/deps/deps.json @@ -71,9 +71,9 @@ }, { "id": "libmaxminddb", - "name": "libmaxminddb v1.8.0", + "name": "libmaxminddb v1.9.1", "url": "https://github.com/maxmind/libmaxminddb.git", - "commit": "93a7e0e5627686deb82aa636376f53b1c7af3d9a" + "commit": "e26013e1d2b57eff0ed22b7364270358adb72205" }, { "id": "lua-cjson", @@ -96,15 +96,15 @@ }, { "id": "lua-nginx-module", - "name": "lua-nginx-module v0.10.25", + "name": "lua-nginx-module v0.10.26", "url": "https://github.com/openresty/lua-nginx-module.git", - "commit": "c47084b5d719ce507d2419d8660f39544a9d1fea" + "commit": "0e769b76432df91e5f10aa56a56858e8a190faf7" }, { "id": "lua-resty-core", - "name": "lua-resty-core v0.1.27", + "name": "lua-resty-core v0.1.28", "url": "https://github.com/openresty/lua-resty-core.git", - "commit": "31fae862a1ed64033591f991fadb0dd80358ba0b" + "commit": "812b2d3871eb0d8da8f0198759ad9164f0eccac6" }, { "id": "lua-resty-dns", @@ -225,9 +225,9 @@ }, { "id": "stream-lua-nginx-module", - "name": "stream-lua-nginx-module v0.0.13", + "name": "stream-lua-nginx-module v0.0.14", "url": "https://github.com/openresty/stream-lua-nginx-module.git", - "commit": "309198abf26266f1a3e53c71388ed7bb9d1e5ea2" + "commit": "cafa6f55333541d1c78767a286fa434c97574a4c" }, { "id": "zlib", diff --git a/src/deps/init_deps.sh b/src/deps/init_deps.sh index 269a24a07..bf5c26451 100755 --- a/src/deps/init_deps.sh +++ b/src/deps/init_deps.sh @@ -52,8 +52,8 @@ do post="yes" else echo "⚠️ Skipping clone of $url because target directory is already present" - # echo "ℹ️ Updating ${name} from $url at commit/version $commit" - # do_and_check_cmd git subtree pull --prefix "src/deps/src/$id" "$url" "$commit" --squash + echo "ℹ️ Updating ${name} from $url at commit/version $commit" + do_and_check_cmd git subtree pull --prefix "src/deps/src/$id" "$url" "$commit" --squash fi if [ -d "src/deps/src/$id/.git" ] ; then diff --git a/src/deps/src/libmaxminddb/.github/workflows/codeql-analysis.yml b/src/deps/src/libmaxminddb/.github/workflows/codeql-analysis.yml index 9b56bfc8b..44137cb40 100644 --- a/src/deps/src/libmaxminddb/.github/workflows/codeql-analysis.yml +++ b/src/deps/src/libmaxminddb/.github/workflows/codeql-analysis.yml @@ -2,6 +2,8 @@ name: "Code scanning - action" on: push: + branches-ignore: + - 'dependabot/**' pull_request: schedule: - cron: '0 7 * * 2' @@ -27,7 +29,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 - run: sudo apt install libipc-run3-perl libipc-system-simple-perl libfile-slurp-perl libfile-which-perl pandoc - run: | @@ -37,4 +39,4 @@ jobs: make safedist - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/src/deps/src/libmaxminddb/CMakeLists.txt b/src/deps/src/libmaxminddb/CMakeLists.txt index 1d3987c12..80d55d2e4 100644 --- a/src/deps/src/libmaxminddb/CMakeLists.txt +++ b/src/deps/src/libmaxminddb/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.9) project(maxminddb LANGUAGES C - VERSION 1.8.0 + VERSION 1.9.1 ) set(MAXMINDDB_SOVERSION 0.0.7) set(CMAKE_C_STANDARD 99) @@ -37,8 +37,8 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() -configure_file(${PROJECT_SOURCE_DIR}/include/maxminddb_config.h.cmake.in - ${PROJECT_SOURCE_DIR}/include/maxminddb_config.h) +configure_file(${PROJECT_SOURCE_DIR}/include/maxminddb_config.h.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/generated/maxminddb_config.h) add_library(maxminddb src/maxminddb.c @@ -79,12 +79,14 @@ endif() target_include_directories(maxminddb PUBLIC $ $ + $ $ + $ ) set(MAXMINDB_HEADERS include/maxminddb.h - include/maxminddb_config.h + ${CMAKE_CURRENT_BINARY_DIR}/generated/maxminddb_config.h ) set_target_properties(maxminddb PROPERTIES PUBLIC_HEADER "${MAXMINDB_HEADERS}") diff --git a/src/deps/src/libmaxminddb/Changes.md b/src/deps/src/libmaxminddb/Changes.md index ac7cf3e8b..e31c34f3b 100644 --- a/src/deps/src/libmaxminddb/Changes.md +++ b/src/deps/src/libmaxminddb/Changes.md @@ -1,3 +1,19 @@ +## 1.9.1 - 2024-01-09 + +* `SSIZE_MAX` is now defined conditionally on Windows. The 1.9.0 + release would cause a redefinition warning when compiled with MinGW. + Reported by Andreas Vögele. GitHub #338. + +## 1.9.0 - 2024-01-09 + +* On very large databases, the calculation to determine the search tree + size could overflow. This was fixed and several additional guards + against overflows were added. Reported by Sami Salonen. GitHub #335. +* Removed `sa_family_t` typedef from the public header on Windows. Pull + request by Noah Treuhaft. GitHub #334. +* The CMake build was adjusted to allow running builds in parallel. + Pull request by Vladyslav Miachkov. GitHub #332. + ## 1.8.0 - 2023-11-07 * `PACKAGE_VERSION` is now a private compile definition when building diff --git a/src/deps/src/libmaxminddb/configure.ac b/src/deps/src/libmaxminddb/configure.ac index ad397fcb0..579d3522b 100644 --- a/src/deps/src/libmaxminddb/configure.ac +++ b/src/deps/src/libmaxminddb/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.63]) -AC_INIT([libmaxminddb], [1.8.0], [support@maxmind.com]) +AC_INIT([libmaxminddb], [1.9.1], [support@maxmind.com]) AC_CONFIG_SRCDIR([include/maxminddb.h]) AC_CONFIG_HEADERS([config.h include/maxminddb_config.h]) diff --git a/src/deps/src/libmaxminddb/include/maxminddb.h b/src/deps/src/libmaxminddb/include/maxminddb.h index 27080669f..1455be91b 100644 --- a/src/deps/src/libmaxminddb/include/maxminddb.h +++ b/src/deps/src/libmaxminddb/include/maxminddb.h @@ -17,8 +17,6 @@ extern "C" { #include /* libmaxminddb package version from configure */ -typedef ADDRESS_FAMILY sa_family_t; - #if defined(_MSC_VER) /* MSVC doesn't define signed size_t, copy it from configure */ #define ssize_t SSIZE_T diff --git a/src/deps/src/libmaxminddb/src/data-pool.c b/src/deps/src/libmaxminddb/src/data-pool.c index 7d47ddffd..1a9f9d03f 100644 --- a/src/deps/src/libmaxminddb/src/data-pool.c +++ b/src/deps/src/libmaxminddb/src/data-pool.c @@ -9,8 +9,6 @@ #include #include -static bool can_multiply(size_t const, size_t const, size_t const); - // Allocate an MMDB_data_pool_s. It initially has space for size // MMDB_entry_data_list_s structs. MMDB_data_pool_s *data_pool_new(size_t const size) { @@ -43,7 +41,7 @@ MMDB_data_pool_s *data_pool_new(size_t const size) { // the given max. max will typically be SIZE_MAX. // // We want to know if we'll wrap around. -static bool can_multiply(size_t const max, size_t const m, size_t const n) { +bool can_multiply(size_t const max, size_t const m, size_t const n) { if (m == 0) { return false; } diff --git a/src/deps/src/libmaxminddb/src/data-pool.h b/src/deps/src/libmaxminddb/src/data-pool.h index 25d09923e..9e61b7687 100644 --- a/src/deps/src/libmaxminddb/src/data-pool.h +++ b/src/deps/src/libmaxminddb/src/data-pool.h @@ -44,6 +44,7 @@ typedef struct MMDB_data_pool_s { MMDB_entry_data_list_s *blocks[DATA_POOL_NUM_BLOCKS]; } MMDB_data_pool_s; +bool can_multiply(size_t const, size_t const, size_t const); MMDB_data_pool_s *data_pool_new(size_t const); void data_pool_destroy(MMDB_data_pool_s *const); MMDB_entry_data_list_s *data_pool_alloc(MMDB_data_pool_s *const); diff --git a/src/deps/src/libmaxminddb/src/maxminddb.c b/src/deps/src/libmaxminddb/src/maxminddb.c index 0596568af..47e4ae151 100644 --- a/src/deps/src/libmaxminddb/src/maxminddb.c +++ b/src/deps/src/libmaxminddb/src/maxminddb.c @@ -23,6 +23,10 @@ #endif #include #include +#ifndef SSIZE_MAX +#define SSIZE_MAX INTPTR_MAX +#endif +typedef ADDRESS_FAMILY sa_family_t; #else #include #include @@ -288,18 +292,29 @@ int MMDB_open(const char *const filename, uint32_t flags, MMDB_s *const mmdb) { goto cleanup; } - uint32_t search_tree_size = - mmdb->metadata.node_count * mmdb->full_record_byte_size; - - mmdb->data_section = - mmdb->file_content + search_tree_size + MMDB_DATA_SECTION_SEPARATOR; - if (search_tree_size + MMDB_DATA_SECTION_SEPARATOR > - (uint32_t)mmdb->file_size) { + if (!can_multiply(SSIZE_MAX, + mmdb->metadata.node_count, + mmdb->full_record_byte_size)) { status = MMDB_INVALID_METADATA_ERROR; goto cleanup; } - mmdb->data_section_size = (uint32_t)mmdb->file_size - search_tree_size - - MMDB_DATA_SECTION_SEPARATOR; + ssize_t search_tree_size = (ssize_t)mmdb->metadata.node_count * + (ssize_t)mmdb->full_record_byte_size; + + mmdb->data_section = + mmdb->file_content + search_tree_size + MMDB_DATA_SECTION_SEPARATOR; + if (mmdb->file_size < MMDB_DATA_SECTION_SEPARATOR || + search_tree_size > mmdb->file_size - MMDB_DATA_SECTION_SEPARATOR) { + status = MMDB_INVALID_METADATA_ERROR; + goto cleanup; + } + ssize_t data_section_size = + mmdb->file_size - search_tree_size - MMDB_DATA_SECTION_SEPARATOR; + if (data_section_size > UINT32_MAX || data_section_size <= 0) { + status = MMDB_INVALID_METADATA_ERROR; + goto cleanup; + } + mmdb->data_section_size = (uint32_t)data_section_size; // Although it is likely not possible to construct a database with valid // valid metadata, as parsed above, and a data_section_size less than 3, diff --git a/src/deps/src/libmaxminddb/t/libtap b/src/deps/src/libmaxminddb/t/libtap index 56e31231e..b53e4ef52 160000 --- a/src/deps/src/libmaxminddb/t/libtap +++ b/src/deps/src/libmaxminddb/t/libtap @@ -1 +1 @@ -Subproject commit 56e31231e0329b202c978c676e4a897c857c7a1f +Subproject commit b53e4ef5257f80e881762b6143834d8aae29da1a diff --git a/src/deps/src/lua-nginx-module/.travis.yml b/src/deps/src/lua-nginx-module/.travis.yml index a547a1d60..d6742ed52 100644 --- a/src/deps/src/lua-nginx-module/.travis.yml +++ b/src/deps/src/lua-nginx-module/.travis.yml @@ -1,4 +1,4 @@ -dist: bionic +dist: focal branches: only: @@ -24,6 +24,11 @@ addons: - libtest-longstring-perl - liblist-moreutils-perl - libgd-dev + - time + - cmake + - libunwind-dev + - wget + - libbrotli1 cache: directories: @@ -38,9 +43,13 @@ env: - LUAJIT_INC=$LUAJIT_PREFIX/include/luajit-2.1 - LUA_INCLUDE_DIR=$LUAJIT_INC - PCRE_VER=8.45 + - PCRE2_VER=10.37 - PCRE_PREFIX=/opt/pcre + - PCRE2_PREFIX=/opt/pcre2 - PCRE_LIB=$PCRE_PREFIX/lib + - PCRE2_LIB=$PCRE2_PREFIX/lib - PCRE_INC=$PCRE_PREFIX/include + - PCRE2_INC=$PCRE2_PREFIX/include - OPENSSL_PREFIX=/opt/ssl - OPENSSL_LIB=$OPENSSL_PREFIX/lib - OPENSSL_INC=$OPENSSL_PREFIX/include @@ -50,9 +59,14 @@ env: - LD_LIBRARY_PATH=$LUAJIT_LIB:$LD_LIBRARY_PATH - DRIZZLE_VER=2011.07.21 - TEST_NGINX_SLEEP=0.006 + - MALLOC_PERTURB_=9 jobs: - - NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d - - NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.1s OPENSSL_PATCH_VER=1.1.1f + #- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d + #- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d + - NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.1w OPENSSL_PATCH_VER=1.1.1f + - NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w OPENSSL_PATCH_VER=1.1.1f USE_PCRE2=Y + - NGINX_VERSION=1.25.1 BORINGSSL=1 TEST_NGINX_USE_HTTP3=1 USE_PCRE2=Y + #- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w TEST_NGINX_USE_HTTP2=1 services: - memcached @@ -60,16 +74,18 @@ services: - mysql before_install: - - sudo apt update - - sudo apt install --only-upgrade ca-certificates - '! grep -n -P ''(?<=.{80}).+'' --color `find src -name ''*.c''` `find . -name ''*.h''` || (echo "ERROR: Found C source lines exceeding 80 columns." > /dev/stderr; exit 1)' - '! grep -n -P ''\t+'' --color `find src -name ''*.c''` `find . -name ''*.h''` || (echo "ERROR: Cannot use tabs." > /dev/stderr; exit 1)' - /usr/bin/env perl $(command -v cpanm) --sudo --notest Test::Nginx IPC::Run > build.log 2>&1 || (cat build.log && exit 1) - - pyenv global 2.7 + install: - - if [ ! -f download-cache/drizzle7-$DRIZZLE_VER.tar.gz ]; then wget -P download-cache http://openresty.org/download/drizzle7-$DRIZZLE_VER.tar.gz; fi - - if [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -P download-cache https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VER}/pcre-${PCRE_VER}.tar.gz; fi - - if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/old/${OPENSSL_VER//[a-z]/}/openssl-$OPENSSL_VER.tar.gz; fi + - if [ ! -f download-cache/drizzle7-$DRIZZLE_VER.tar.gz ]; then wget -P download-cache https://github.com/openresty/openresty-deps-prebuild/releases/download/v20230902/drizzle7-$DRIZZLE_VER.tar.gz; fi + - if [ "$USE_PCRE2" != "Y" ] && [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -P download-cache https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VER}/pcre-${PCRE_VER}.tar.gz; fi + - if [ "$USE_PCRE2" = "Y" ] && [ ! -f download-cache/pcre2-$PCRE2_VER.tar.gz ]; then wget -P download-cache https://downloads.sourceforge.net/project/pcre/pcre2/${PCRE2_VER}/pcre2-${PCRE2_VER}.tar.gz; fi + - if [ -n "$OPENSSL_VER" ] && [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/old/${OPENSSL_VER//[a-z]/}/openssl-$OPENSSL_VER.tar.gz; fi + - if [ -n "$OPENSSL_VER" ] && [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/old/${OPENSSL_VER//[a-z]/}/openssl-$OPENSSL_VER.tar.gz; fi + - wget https://github.com/openresty/openresty-deps-prebuild/releases/download/v20230902/boringssl-20230902-x64-focal.tar.gz + - wget https://github.com/openresty/openresty-deps-prebuild/releases/download/v20230902/curl-h3-x64-focal.tar.gz - git clone https://github.com/openresty/test-nginx.git - git clone https://github.com/openresty/openresty.git ../openresty - git clone https://github.com/openresty/no-pool-nginx.git ../no-pool-nginx @@ -91,21 +107,24 @@ install: - git clone https://github.com/openresty/lua-resty-core.git ../lua-resty-core - git clone https://github.com/openresty/lua-resty-lrucache.git ../lua-resty-lrucache - git clone https://github.com/openresty/lua-resty-mysql.git ../lua-resty-mysql + - git clone https://github.com/spacewander/lua-resty-rsa.git ../lua-resty-rsa - git clone https://github.com/openresty/lua-resty-string.git ../lua-resty-string - git clone https://github.com/openresty/stream-lua-nginx-module.git ../stream-lua-nginx-module - git clone -b v2.1-agentzh https://github.com/openresty/luajit2.git luajit2 before_script: - - mysql -uroot -e 'create database ngx_test; grant all on ngx_test.* to "ngx_test"@"%" identified by "ngx_test"; flush privileges;' + - mysql -uroot -e "create database ngx_test; CREATE USER 'ngx_test'@'%' IDENTIFIED WITH mysql_native_password BY 'ngx_test'; grant all on ngx_test.* to 'ngx_test'@'%'; flush privileges;" script: - - export PATH=$PWD/work/nginx/sbin:$PWD/openresty-devel-utils:$PATH + - sudo tar -C / -xf curl-h3-x64-focal.tar.gz + - export PATH=$PWD/work/nginx/sbin:$PWD/openresty-devel-utils:/opt/curl-h3/bin:$PATH - ngx-releng > check.txt || true - lines=`wc -l check.txt | awk '{print $1}'`; if [ $lines -gt 5 ]; then cat check.txt; exit 1; fi - sudo iptables -I OUTPUT 1 -p udp --dport 10086 -j REJECT - sudo iptables -I OUTPUT -p tcp --dst 127.0.0.2 --dport 12345 -j DROP - sudo iptables -I OUTPUT -p udp --dst 127.0.0.2 --dport 12345 -j DROP - sudo ip route add prohibit 0.0.0.1/32 + - sudo sysctl -w kernel.pid_max=10000 - cd luajit2/ - make -j$JOBS CCDEBUG=-g Q= PREFIX=$LUAJIT_PREFIX CC=$CC XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT -msse4.2' > build.log 2>&1 || (cat build.log && exit 1) - sudo make install PREFIX=$LUAJIT_PREFIX > build.log 2>&1 || (cat build.log && exit 1) @@ -116,19 +135,10 @@ script: - sudo make install-libdrizzle-1.0 > build.log 2>&1 || (cat build.log && exit 1) - cd ../mockeagain/ && make CC=$CC -j$JOBS && cd .. - cd lua-cjson/ && make -j$JOBS && sudo make install && cd .. - - tar zxf download-cache/pcre-$PCRE_VER.tar.gz - - cd pcre-$PCRE_VER/ - - ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > build.log 2>&1 || (cat build.log && exit 1) - - make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - - sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1) - - cd .. - - tar zxf download-cache/openssl-$OPENSSL_VER.tar.gz - - cd openssl-$OPENSSL_VER/ - - patch -p1 < ../../openresty/patches/openssl-$OPENSSL_PATCH_VER-sess_set_get_cb_yield.patch - - ./config shared enable-ssl3 enable-ssl3-method -g --prefix=$OPENSSL_PREFIX -DPURIFY > build.log 2>&1 || (cat build.log && exit 1) - - make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - - sudo make PATH=$PATH install_sw > build.log 2>&1 || (cat build.log && exit 1) - - cd .. + - if [ "$USE_PCRE2" != "Y" ]; then tar zxf download-cache/pcre-$PCRE_VER.tar.gz; cd pcre-$PCRE_VER/; ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi + - if [ "$USE_PCRE2" = "Y" ]; then tar zxf download-cache/pcre2-$PCRE2_VER.tar.gz; cd pcre2-$PCRE2_VER/; ./configure --prefix=$PCRE2_PREFIX --enable-jit --enable-utf > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi + - if [ -n "$OPENSSL_VER" ]; then tar zxf download-cache/openssl-$OPENSSL_VER.tar.gz; cd openssl-$OPENSSL_VER/; patch -p1 < ../../openresty/patches/openssl-$OPENSSL_PATCH_VER-sess_set_get_cb_yield.patch; ./config shared enable-ssl3 enable-ssl3-method -g --prefix=$OPENSSL_PREFIX -DPURIFY > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo make PATH=$PATH install_sw > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi + - if [ -n "$BORINGSSL" ]; then sudo mkdir -p /opt/ssl && sudo tar -C /opt/ssl -xf boringssl-20230902-x64-focal.tar.gz --strip-components=1; fi - export NGX_BUILD_CC=$CC - sh util/build-without-ssl.sh $NGINX_VERSION > build.log 2>&1 || (cat build.log && exit 1) - sh util/build-with-dd.sh $NGINX_VERSION > build.log 2>&1 || (cat build.log && exit 1) @@ -139,6 +149,8 @@ script: - ldd `which nginx`|grep -E 'luajit|ssl|pcre' - export LD_PRELOAD=$PWD/mockeagain/mockeagain.so - export LD_LIBRARY_PATH=$PWD/mockeagain:$LD_LIBRARY_PATH + - export TEST_NGINX_HTTP3_CRT=$PWD/t/cert/http3/http3.crt + - export TEST_NGINX_HTTP3_KEY=$PWD/t/cert/http3/http3.key - export TEST_NGINX_RESOLVER=8.8.4.4 - dig +short myip.opendns.com @resolver1.opendns.com || exit 0 - dig +short @$TEST_NGINX_RESOLVER openresty.org || exit 0 diff --git a/src/deps/src/lua-nginx-module/README.markdown b/src/deps/src/lua-nginx-module/README.markdown index c0d0c079d..d6ec8c94b 100644 --- a/src/deps/src/lua-nginx-module/README.markdown +++ b/src/deps/src/lua-nginx-module/README.markdown @@ -4,13 +4,11 @@ Name ngx_http_lua_module - Embed the power of Lua into Nginx HTTP Servers. This module is a core component of [OpenResty](https://openresty.org). If you are using this module, -then you are essentially using OpenResty. +then you are essentially using OpenResty :) *This module is not distributed with the Nginx source.* See [the installation instructions](#installation). -This is a core component of OpenResty. If you are using this module, then you are essentially using OpenResty :) - Table of Contents ================= @@ -65,8 +63,8 @@ Version ======= This document describes ngx_lua -[v0.10.19](https://github.com/openresty/lua-nginx-module/tags), which was released -on 3 Nov, 2020. +[v0.10.25](https://github.com/openresty/lua-nginx-module/tags), which was released +on 19 June 2023. Videos ====== @@ -309,6 +307,8 @@ Nginx Compatibility The latest version of this module is compatible with the following versions of Nginx: +* 1.25.x (last tested: 1.25.1) +* 1.21.x (last tested: 1.21.4) * 1.19.x (last tested: 1.19.3) * 1.17.x (last tested: 1.17.8) * 1.15.x (last tested: 1.15.8) @@ -964,7 +964,6 @@ TODO * cosocket: implement LuaSocket's unconnected UDP API. * cosocket: add support in the context of [init_by_lua*](#init_by_lua). -* cosocket: implement the `bind()` method for stream-typed cosockets. * cosocket: review and merge aviramc's [patch](https://github.com/openresty/lua-nginx-module/pull/290) for adding the `bsdrecv` method. * cosocket: add configure options for different strategies of handling the cosocket connection exceeding in the pools. * review and apply vadim-pavlov's patch for [ngx.location.capture](#ngxlocationcapture)'s `extra_headers` option @@ -1166,6 +1165,8 @@ Directives * [lua_ssl_ciphers](#lua_ssl_ciphers) * [lua_ssl_crl](#lua_ssl_crl) * [lua_ssl_protocols](#lua_ssl_protocols) +* [lua_ssl_certificate](#lua_ssl_certificate) +* [lua_ssl_certificate_key](#lua_ssl_certificate_key) * [lua_ssl_trusted_certificate](#lua_ssl_trusted_certificate) * [lua_ssl_verify_depth](#lua_ssl_verify_depth) * [lua_ssl_conf_command](#lua_ssl_conf_command) @@ -2721,6 +2722,8 @@ lua_need_request_body **phase:** *depends on usage* +Due to the stream processing feature of HTTP/2 or HTTP/3, this configuration could potentially block the entire request. Therefore, this configuration is effective only when HTTP/2 or HTTP/3 requests send content-length header. For requests with versions lower than HTTP/2, this configuration can still be used without any problems. + Determines whether to force the request body data to be read before running rewrite/access/content_by_lua* or not. The Nginx core does not read the client request body by default and if request body data is required, then this directive should be turned `on` or the [ngx.req.read_body](#ngxreqread_body) function should be called within the Lua code. To read the request body data within the [$request_body](http://nginx.org/en/docs/http/ngx_http_core_module.html#var_request_body) variable, @@ -3321,24 +3324,63 @@ lua_ssl_protocols **syntax:** *lua_ssl_protocols \[SSLv2\] \[SSLv3\] \[TLSv1\] [TLSv1.1] [TLSv1.2] [TLSv1.3]* -**default:** *lua_ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2* +**default:** *lua_ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3* **context:** *http, server, location* Enables the specified protocols for requests to a SSL/TLS server in the [tcpsock:sslhandshake](#tcpsocksslhandshake) method. The support for the `TLSv1.3` parameter requires version `v0.10.12` *and* OpenSSL 1.1.1. +From version v0.10.25, the default value change from `SSLV3 TLSv1 TLSv1.1 TLSv1.2` to `TLSv1 TLSv1.1 TLSv1.2 TLSv1.3`. This directive was first introduced in the `v0.9.11` release. [Back to TOC](#directives) +lua_ssl_certificate +------------------- + +**syntax:** *lua_ssl_certificate <file>* + +**default:** *none* + +**context:** *http, server, location* + +Specifies the file path to the SSL/TLS certificate in PEM format used for the [tcpsock:sslhandshake](#tcpsocksslhandshake) method. + +This directive allows you to specify the SSL/TLS certificate that will be presented to server during the SSL/TLS handshake process. + +This directive was first introduced in the `v0.10.26` release. + +See also [lua_ssl_certificate_key](#lua_ssl_certificate_key) and [lua_ssl_verify_depth](#lua_ssl_verify_depth). + +[Back to TOC](#directives) + +lua_ssl_certificate_key +----------------------- + +**syntax:** *lua_ssl_certificate_key <file>* + +**default:** *none* + +**context:** *http, server, location* + +Specifies the file path to the private key associated with the SSL/TLS certificate used in the [tcpsock:sslhandshake](#tcpsocksslhandshake) method. + +This directive allows you to specify the private key file corresponding to the SSL/TLS certificate specified by lua_ssl_certificate. The private key should be in PEM format and must match the certificate. + +This directive was first introduced in the `v0.10.26` release. + +See also [lua_ssl_certificate](#lua_ssl_certificate) and [lua_ssl_verify_depth](#lua_ssl_verify_depth). + +[Back to TOC](#directives) + lua_ssl_trusted_certificate --------------------------- **syntax:** *lua_ssl_trusted_certificate <file>* -**default:** *no* +**default:** *none* **context:** *http, server, location* @@ -3363,7 +3405,7 @@ Sets the verification depth in the server certificates chain. This directive was first introduced in the `v0.9.11` release. -See also [lua_ssl_trusted_certificate](#lua_ssl_trusted_certificate). +See also [lua_ssl_certificate](#lua_ssl_certificate), [lua_ssl_certificate_key](#lua_ssl_certificate_key) and [lua_ssl_trusted_certificate](#lua_ssl_trusted_certificate). [Back to TOC](#directives) @@ -5384,6 +5426,8 @@ Reads the client request body synchronously without blocking the Nginx event loo local args = ngx.req.get_post_args() ``` +Due to the stream processing feature of HTTP/2 or HTTP/3, this api could potentially block the entire request. Therefore, this api is effective only when HTTP/2 or HTTP/3 requests send content-length header. For requests with versions lower than HTTP/2, this api can still be used without any problems. + If the request body is already read previously by turning on [lua_need_request_body](#lua_need_request_body) or by using other modules, then this function does not run and returns immediately. If the request body has already been explicitly discarded, either by the [ngx.req.discard_body](#ngxreqdiscard_body) function or other modules, this function does not run and returns immediately. @@ -5423,12 +5467,14 @@ See also [ngx.req.read_body](#ngxreqread_body). ngx.req.get_body_data --------------------- -**syntax:** *data = ngx.req.get_body_data()* +**syntax:** *data = ngx.req.get_body_data(max_bytes?)* **context:** *rewrite_by_lua*, access_by_lua*, content_by_lua*, log_by_lua** Retrieves in-memory request body data. It returns a Lua string rather than a Lua table holding all the parsed query arguments. Use the [ngx.req.get_post_args](#ngxreqget_post_args) function instead if a Lua table is required. +The optional `max_bytes` argument can be used when you don't need the entire body. + This function returns `nil` if 1. the request body has not been read, @@ -5597,6 +5643,8 @@ Returns a read-only cosocket object that wraps the downstream connection. Only [ In case of error, `nil` will be returned as well as a string describing the error. +Due to the streaming nature of HTTP2 and HTTP3, this API cannot be used when the downstream connection is HTTP2 and HTTP3. + The socket object returned by this method is usually used to read the current request's body in a streaming fashion. Do not turn on the [lua_need_request_body](#lua_need_request_body) directive, and do not mix this call with [ngx.req.read_body](#ngxreqread_body) and [ngx.req.discard_body](#ngxreqdiscard_body). If any request body data has been pre-read into the Nginx core request header buffer, the resulting cosocket object will take care of this to avoid potential data loss resulting from such pre-reading. @@ -9321,12 +9369,6 @@ Only the following ngx_lua APIs could be used in `function_name` function of the * `ngx.decode_args` * `ngx.quote_sql_str` -* `ngx.re.match` -* `ngx.re.find` -* `ngx.re.gmatch` -* `ngx.re.sub` -* `ngx.re.gsub` - * `ngx.crc32_short` * `ngx.crc32_long` * `ngx.hmac_sha1` @@ -9353,7 +9395,7 @@ The second argument `module_name` specifies the lua module name to execute in th The third argument `func_name` specifies the function field in the module table as the second argument. -The type of `arg`s must be one of type below: +The type of `args` must be one of type below: * boolean * number diff --git a/src/deps/src/lua-nginx-module/doc/HttpLuaModule.wiki b/src/deps/src/lua-nginx-module/doc/HttpLuaModule.wiki index 34751144b..305626c76 100644 --- a/src/deps/src/lua-nginx-module/doc/HttpLuaModule.wiki +++ b/src/deps/src/lua-nginx-module/doc/HttpLuaModule.wiki @@ -17,8 +17,8 @@ Production ready. = Version = This document describes ngx_lua -[https://github.com/openresty/lua-nginx-module/tags v0.10.19], which was released -on 3 Nov, 2020. +[https://github.com/openresty/lua-nginx-module/tags v0.10.25], which was released +on 19 June 2023. = Videos = @@ -2845,11 +2845,43 @@ The support for the TLSv1.3 parameter requires version v0.10. This directive was first introduced in the v0.9.11 release. +== lua_ssl_certificate == + +'''syntax:''' ''lua_ssl_certificate '' + +'''default:''' ''none'' + +'''context:''' ''http, server, location'' + +Specifies the file path to the SSL/TLS certificate in PEM format used for the [[#tcpsock:sslhandshake|tcpsock:sslhandshake]] method. + +This directive allows you to specify the SSL/TLS certificate that will be presented to server during the SSL/TLS handshake process. + +This directive was first introduced in the v0.10.26 release. + +See also [[#lua_ssl_certificate_key|lua_ssl_certificate_key]] and [[#lua_ssl_verify_depth|lua_ssl_verify_depth]]. + +== lua_ssl_certificate_key == + +'''syntax:''' ''lua_ssl_certificate_key '' + +'''default:''' ''none'' + +'''context:''' ''http, server, location'' + +Specifies the file path to the private key associated with the SSL/TLS certificate used in the [[#tcpsock:sslhandshake|tcpsock:sslhandshake]] method. + +This directive allows you to specify the private key file corresponding to the SSL/TLS certificate specified by lua_ssl_certificate. The private key should be in PEM format and must match the certificate. + +This directive was first introduced in the v0.10.26 release. + +See also [[#lua_ssl_certificate|lua_ssl_certificate]] and [[#lua_ssl_verify_depth|lua_ssl_verify_depth]]. + == lua_ssl_trusted_certificate == '''syntax:''' ''lua_ssl_trusted_certificate '' -'''default:''' ''no'' +'''default:''' ''none'' '''context:''' ''http, server, location'' @@ -2871,7 +2903,7 @@ Sets the verification depth in the server certificates chain. This directive was first introduced in the v0.9.11 release. -See also [[#lua_ssl_trusted_certificate|lua_ssl_trusted_certificate]]. +See also [[#lua_ssl_certificate|lua_ssl_certificate]], [[#lua_ssl_certificate_key|lua_ssl_certificate_key]] and [[#lua_ssl_trusted_certificate|lua_ssl_trusted_certificate]]. == lua_ssl_conf_command == @@ -4555,12 +4587,14 @@ See also [[#ngx.req.read_body|ngx.req.read_body]]. == ngx.req.get_body_data == -'''syntax:''' ''data = ngx.req.get_body_data()'' +'''syntax:''' ''data = ngx.req.get_body_data(max_bytes?)'' '''context:''' ''rewrite_by_lua*, access_by_lua*, content_by_lua*, log_by_lua*'' Retrieves in-memory request body data. It returns a Lua string rather than a Lua table holding all the parsed query arguments. Use the [[#ngx.req.get_post_args|ngx.req.get_post_args]] function instead if a Lua table is required. +The optional max_bytes function argument can be used when you don't need the entire body. + This function returns nil if # the request body has not been read, @@ -4707,6 +4741,8 @@ Returns a read-only cosocket object that wraps the downstream connection. Only [ In case of error, nil will be returned as well as a string describing the error. +Due to the streaming nature of HTTP2 and HTTP3, this API cannot be used when the downstream connection is HTTP2 and HTTP3. + The socket object returned by this method is usually used to read the current request's body in a streaming fashion. Do not turn on the [[#lua_need_request_body|lua_need_request_body]] directive, and do not mix this call with [[#ngx.req.read_body|ngx.req.read_body]] and [[#ngx.req.discard_body|ngx.req.discard_body]]. If any request body data has been pre-read into the Nginx core request header buffer, the resulting cosocket object will take care of this to avoid potential data loss resulting from such pre-reading. diff --git a/src/deps/src/lua-nginx-module/src/api/ngx_http_lua_api.h b/src/deps/src/lua-nginx-module/src/api/ngx_http_lua_api.h index 640e0c396..193c44e3a 100644 --- a/src/deps/src/lua-nginx-module/src/api/ngx_http_lua_api.h +++ b/src/deps/src/lua-nginx-module/src/api/ngx_http_lua_api.h @@ -19,7 +19,7 @@ /* Public API for other Nginx modules */ -#define ngx_http_lua_version 10025 +#define ngx_http_lua_version 10026 typedef struct ngx_http_lua_co_ctx_s ngx_http_lua_co_ctx_t; diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_accessby.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_accessby.c index d40eab123..2bf40aaa8 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_accessby.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_accessby.c @@ -137,6 +137,26 @@ ngx_http_lua_access_handler(ngx_http_request_t *r) } if (llcf->force_read_body && !ctx->read_body_done) { + +#if (NGX_HTTP_V2) + if (r->main->stream && r->headers_in.content_length_n < 0) { + ngx_log_error(NGX_LOG_WARN, r->connection->log, 0, + "disable lua_need_request_body, since " + "http2 read_body may break http2 stream process"); + goto done; + } +#endif + +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30 + && r->headers_in.content_length_n < 0) + { + ngx_log_error(NGX_LOG_WARN, r->connection->log, 0, + "disable lua_need_request_body, since " + "http2 read_body may break http2 stream process"); + goto done; + } +#endif r->request_body_in_single_buf = 1; r->request_body_in_persistent_file = 1; r->request_body_in_clean_file = 1; @@ -154,6 +174,12 @@ ngx_http_lua_access_handler(ngx_http_request_t *r) } } +#if defined(NGX_HTTP_V3) || defined(NGX_HTTP_V2) + +done: + +#endif + dd("calling access handler"); return llcf->access_handler(r); } diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_clfactory.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_clfactory.c index c13fd14dc..9eab16466 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_clfactory.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_clfactory.c @@ -91,7 +91,7 @@ * | Int | At which line this function is defined * | [linedefined] | * --------------------- - * | Int | At while line this function definition ended + * | Int | At which line this function definition ended * | [lastlinedefined] | * --------------------- * | Char | Number of upvalues referenced by this function @@ -128,7 +128,7 @@ * | Vector | Debug lineinfo vector * | [lineinfo] | Empty vector here if debug info is stripped * --------------------- - * | Int | Number of local variable in this function + * | Int | Number of local variables in this function * | [sizelocvars] | 0 if debug info is stripped * --------------------- * | String | ------------------------------------ diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_common.h b/src/deps/src/lua-nginx-module/src/ngx_http_lua_common.h index 843504549..4c946297f 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_common.h +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_common.h @@ -55,11 +55,17 @@ typedef struct { #if (NGX_PCRE) -#include -# if (PCRE_MAJOR > 8) || (PCRE_MAJOR == 8 && PCRE_MINOR >= 21) +# if (NGX_PCRE2) # define LUA_HAVE_PCRE_JIT 1 # else -# define LUA_HAVE_PCRE_JIT 0 + +#include + +# if (PCRE_MAJOR > 8) || (PCRE_MAJOR == 8 && PCRE_MINOR >= 21) +# define LUA_HAVE_PCRE_JIT 1 +# else +# define LUA_HAVE_PCRE_JIT 0 +# endif # endif #endif @@ -221,9 +227,14 @@ struct ngx_http_lua_main_conf_s { ngx_int_t regex_cache_entries; ngx_int_t regex_cache_max_entries; ngx_int_t regex_match_limit; -# if (LUA_HAVE_PCRE_JIT) +#endif + +#if (LUA_HAVE_PCRE_JIT) +#if (NGX_PCRE2) + pcre2_jit_stack *jit_stack; +#else pcre_jit_stack *jit_stack; -# endif +#endif #endif ngx_array_t *shm_zones; /* of ngx_shm_zone_t* */ @@ -360,6 +371,8 @@ union ngx_http_lua_srv_conf_u { typedef struct { #if (NGX_HTTP_SSL) ngx_ssl_t *ssl; /* shared by SSL cosockets */ + ngx_array_t *ssl_certificates; + ngx_array_t *ssl_certificate_keys; ngx_uint_t ssl_protocols; ngx_str_t ssl_ciphers; ngx_uint_t ssl_verify_depth; diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_contentby.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_contentby.c index 5e2ae5520..2014d52d8 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_contentby.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_contentby.c @@ -196,6 +196,26 @@ ngx_http_lua_content_handler(ngx_http_request_t *r) } if (llcf->force_read_body && !ctx->read_body_done) { + +#if (NGX_HTTP_V2) + if (r->main->stream && r->headers_in.content_length_n < 0) { + ngx_log_error(NGX_LOG_WARN, r->connection->log, 0, + "disable lua_need_request_body, since " + "http2 read_body may break http2 stream process"); + goto done; + } +#endif + +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30 + && r->headers_in.content_length_n < 0) + { + ngx_log_error(NGX_LOG_WARN, r->connection->log, 0, + "disable lua_need_request_body, since " + "http2 read_body may break http2 stream process"); + goto done; + } +#endif r->request_body_in_single_buf = 1; r->request_body_in_persistent_file = 1; r->request_body_in_clean_file = 1; @@ -214,6 +234,12 @@ ngx_http_lua_content_handler(ngx_http_request_t *r) } } +#if defined(NGX_HTTP_V3) || defined(NGX_HTTP_V2) + +done: + +#endif + dd("setting entered"); ctx->entered_content_phase = 1; diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_control.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_control.c index 99460456c..d7e427385 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_control.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_control.c @@ -280,6 +280,9 @@ ngx_http_lua_ngx_redirect(lua_State *L) h->value.len = len; h->value.data = uri; +#if defined(nginx_version) && nginx_version >= 1023000 + h->next = NULL; +#endif ngx_str_set(&h->key, "Location"); r->headers_out.status = rc; diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers.c index a2ce6e145..85836a128 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers.c @@ -782,6 +782,11 @@ ngx_http_lua_ffi_req_get_headers_count(ngx_http_request_t *r, int max, { int count; ngx_list_part_t *part; +#if (NGX_HTTP_V3) + int has_host = 0; + ngx_uint_t i; + ngx_table_elt_t *header; +#endif if (r->connection->fd == (ngx_socket_t) -1) { return NGX_HTTP_LUA_FFI_BAD_CONTEXT; @@ -794,11 +799,54 @@ ngx_http_lua_ffi_req_get_headers_count(ngx_http_request_t *r, int max, } part = &r->headers_in.headers.part; + +#if (NGX_HTTP_V3) + count = 0; + header = part->elts; + + if (r->http_version == NGX_HTTP_VERSION_30 + && r->headers_in.server.data != NULL) + { + has_host = 1; + count++; + } + + if (has_host == 1) { + for (i = 0; /* void */; i++) { + if (i >= part->nelts) { + if (part->next == NULL) { + break; + } + + part = part->next; + header = part->elts; + i = 0; + } + + if (header[i].key.len == 4 + && ngx_strncasecmp(header[i].key.data, + (u_char *) "host", 4) == 0) + { + continue; + } + + count++; + } + + } else { + count = part->nelts; + while (part->next != NULL) { + part = part->next; + count += part->nelts; + } + } +#else count = part->nelts; while (part->next != NULL) { part = part->next; count += part->nelts; } +#endif if (max > 0 && count > max) { *truncated = 1; @@ -821,12 +869,29 @@ ngx_http_lua_ffi_req_get_headers(ngx_http_request_t *r, ngx_uint_t i; ngx_list_part_t *part; ngx_table_elt_t *header; +#if (NGX_HTTP_V3) + int has_host = 0; +#endif if (count <= 0) { return NGX_OK; } n = 0; + +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30 + && r->headers_in.server.data != NULL) + { + out[n].key.data = (u_char *) "host"; + out[n].key.len = sizeof("host") - 1; + out[n].value.len = r->headers_in.server.len; + out[n].value.data = r->headers_in.server.data; + has_host = 1; + ++n; + } +#endif + part = &r->headers_in.headers.part; header = part->elts; @@ -842,6 +907,14 @@ ngx_http_lua_ffi_req_get_headers(ngx_http_request_t *r, i = 0; } +#if (NGX_HTTP_V3) + if (has_host == 1 && header[i].key.len == 4 + && ngx_strncasecmp(header[i].key.data, (u_char *) "host", 4) == 0) + { + continue; + } +#endif + if (raw) { out[n].key.data = header[i].key.data; out[n].key.len = (int) header[i].key.len; diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers_in.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers_in.c index 440548140..e756700b0 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers_in.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers_in.c @@ -280,6 +280,9 @@ new_header: h->key = hv->key; h->value = *value; +#if defined(nginx_version) && nginx_version >= 1023000 + h->next = NULL; +#endif h->lowcase_key = ngx_pnalloc(r->pool, h->key.len); if (h->lowcase_key == NULL) { @@ -588,19 +591,21 @@ ngx_http_set_builtin_multi_header(ngx_http_request_t *r, { #if defined(nginx_version) && nginx_version >= 1023000 ngx_table_elt_t **headers, **ph, *h; - int nelts; headers = (ngx_table_elt_t **) ((char *) &r->headers_in + hv->offset); if (!hv->no_override && *headers != NULL) { - nelts = 0; +#if defined(DDEBUG) && (DDEBUG) + int nelts = 0; + for (h = *headers; h; h = h->next) { nelts++; } - *headers = NULL; - dd("clear multi-value headers: %d", nelts); +#endif + + *headers = NULL; } if (ngx_http_set_header_helper(r, hv, value, &h) == NGX_ERROR) { diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers_out.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers_out.c index 571723d9a..c51146a3f 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers_out.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_headers_out.c @@ -229,6 +229,9 @@ new_header: h->key = hv->key; h->value = *value; +#if defined(nginx_version) && nginx_version >= 1023000 + h->next = NULL; +#endif h->lowcase_key = ngx_pnalloc(r->pool, h->key.len); if (h->lowcase_key == NULL) { diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_module.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_module.c index 16f442464..fb10bf933 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_module.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_module.c @@ -48,6 +48,8 @@ static char *ngx_http_lua_merge_loc_conf(ngx_conf_t *cf, void *parent, static ngx_int_t ngx_http_lua_init(ngx_conf_t *cf); static char *ngx_http_lua_lowat_check(ngx_conf_t *cf, void *post, void *data); #if (NGX_HTTP_SSL) +static ngx_int_t ngx_http_lua_merge_ssl(ngx_conf_t *cf, + ngx_http_lua_loc_conf_t *conf, ngx_http_lua_loc_conf_t *prev); static ngx_int_t ngx_http_lua_set_ssl(ngx_conf_t *cf, ngx_http_lua_loc_conf_t *llcf); #if (nginx_version >= 1019004) @@ -57,6 +59,9 @@ static char *ngx_http_lua_ssl_conf_command_check(ngx_conf_t *cf, void *post, #endif static char *ngx_http_lua_malloc_trim(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); +#if (NGX_PCRE2) +extern void ngx_http_lua_regex_cleanup(void *data); +#endif static ngx_conf_post_t ngx_http_lua_lowat_post = @@ -648,6 +653,20 @@ static ngx_command_t ngx_http_lua_cmds[] = { offsetof(ngx_http_lua_loc_conf_t, ssl_verify_depth), NULL }, + { ngx_string("lua_ssl_certificate"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, + ngx_conf_set_str_array_slot, + NGX_HTTP_LOC_CONF_OFFSET, + offsetof(ngx_http_lua_loc_conf_t, ssl_certificates), + NULL }, + + { ngx_string("lua_ssl_certificate_key"), + NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, + ngx_conf_set_str_array_slot, + NGX_HTTP_LOC_CONF_OFFSET, + offsetof(ngx_http_lua_loc_conf_t, ssl_certificate_keys), + NULL }, + { ngx_string("lua_ssl_trusted_certificate"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, ngx_conf_set_str_slot, @@ -839,6 +858,17 @@ ngx_http_lua_init(ngx_conf_t *cf) cln->data = lmcf; cln->handler = ngx_http_lua_sema_mm_cleanup; +#if (NGX_PCRE2) + /* add the cleanup of pcre2 regex */ + cln = ngx_pool_cleanup_add(cf->pool, 0); + if (cln == NULL) { + return NGX_ERROR; + } + + cln->data = lmcf; + cln->handler = ngx_http_lua_regex_cleanup; +#endif + #ifdef HAVE_NGX_LUA_PIPE ngx_http_lua_pipe_init(); #endif @@ -1148,15 +1178,15 @@ ngx_http_lua_create_srv_conf(ngx_conf_t *cf) * lscf->srv.ssl_cert_chunkname = NULL; * lscf->srv.ssl_cert_src_key = NULL; * - * lscf->srv.ssl_session_store_handler = NULL; - * lscf->srv.ssl_session_store_src = { 0, NULL }; - * lscf->srv.ssl_session_store_chunkname = NULL; - * lscf->srv.ssl_session_store_src_key = NULL; + * lscf->srv.ssl_sess_store_handler = NULL; + * lscf->srv.ssl_sess_store_src = { 0, NULL }; + * lscf->srv.ssl_sess_store_chunkname = NULL; + * lscf->srv.ssl_sess_store_src_key = NULL; * - * lscf->srv.ssl_session_fetch_handler = NULL; - * lscf->srv.ssl_session_fetch_src = { 0, NULL }; - * lscf->srv.ssl_session_fetch_chunkname = NULL; - * lscf->srv.ssl_session_fetch_src_key = NULL; + * lscf->srv.ssl_sess_fetch_handler = NULL; + * lscf->srv.ssl_sess_fetch_src = { 0, NULL }; + * lscf->srv.ssl_sess_fetch_chunkname = NULL; + * lscf->srv.ssl_sess_fetch_src_key = NULL; * * lscf->balancer.handler = NULL; * lscf->balancer.src = { 0, NULL }; @@ -1399,6 +1429,8 @@ ngx_http_lua_create_loc_conf(ngx_conf_t *cf) #if (NGX_HTTP_SSL) conf->ssl_verify_depth = NGX_CONF_UNSET_UINT; + conf->ssl_certificates = NGX_CONF_UNSET_PTR; + conf->ssl_certificate_keys = NGX_CONF_UNSET_PTR; #if (nginx_version >= 1019004) conf->ssl_conf_commands = NGX_CONF_UNSET_PTR; #endif @@ -1464,16 +1496,24 @@ ngx_http_lua_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) #if (NGX_HTTP_SSL) + if (ngx_http_lua_merge_ssl(cf, conf, prev) != NGX_OK) { + return NGX_CONF_ERROR; + } + ngx_conf_merge_bitmask_value(conf->ssl_protocols, prev->ssl_protocols, - (NGX_CONF_BITMASK_SET|NGX_SSL_SSLv3 + (NGX_CONF_BITMASK_SET |NGX_SSL_TLSv1|NGX_SSL_TLSv1_1 - |NGX_SSL_TLSv1_2)); + |NGX_SSL_TLSv1_2|NGX_SSL_TLSv1_3)); ngx_conf_merge_str_value(conf->ssl_ciphers, prev->ssl_ciphers, "DEFAULT"); ngx_conf_merge_uint_value(conf->ssl_verify_depth, prev->ssl_verify_depth, 1); + ngx_conf_merge_ptr_value(conf->ssl_certificates, + prev->ssl_certificates, NULL); + ngx_conf_merge_ptr_value(conf->ssl_certificate_keys, + prev->ssl_certificate_keys, NULL); ngx_conf_merge_str_value(conf->ssl_trusted_certificate, prev->ssl_trusted_certificate, ""); ngx_conf_merge_str_value(conf->ssl_crl, prev->ssl_crl, ""); @@ -1527,17 +1567,77 @@ ngx_http_lua_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) #if (NGX_HTTP_SSL) +static ngx_int_t +ngx_http_lua_merge_ssl(ngx_conf_t *cf, + ngx_http_lua_loc_conf_t *conf, ngx_http_lua_loc_conf_t *prev) +{ + ngx_uint_t preserve; + + if (conf->ssl_protocols == 0 + && conf->ssl_ciphers.data == NULL + && conf->ssl_verify_depth == NGX_CONF_UNSET_UINT + && conf->ssl_certificates == NGX_CONF_UNSET_PTR + && conf->ssl_certificate_keys == NGX_CONF_UNSET_PTR + && conf->ssl_trusted_certificate.data == NULL + && conf->ssl_crl.data == NULL +#if (nginx_version >= 1019004) + && conf->ssl_conf_commands == NGX_CONF_UNSET_PTR +#endif + ) + { + if (prev->ssl) { + conf->ssl = prev->ssl; + return NGX_OK; + } + + preserve = 1; + + } else { + preserve = 0; + } + + conf->ssl = ngx_pcalloc(cf->pool, sizeof(ngx_ssl_t)); + if (conf->ssl == NULL) { + return NGX_ERROR; + } + + conf->ssl->log = cf->log; + + /* + * special handling to preserve conf->ssl_* in the "http" section + * to inherit it to all servers + */ + + if (preserve) { + prev->ssl = conf->ssl; + } + + return NGX_OK; +} + + static ngx_int_t ngx_http_lua_set_ssl(ngx_conf_t *cf, ngx_http_lua_loc_conf_t *llcf) { ngx_pool_cleanup_t *cln; - llcf->ssl = ngx_pcalloc(cf->pool, sizeof(ngx_ssl_t)); - if (llcf->ssl == NULL) { - return NGX_ERROR; + if (llcf->ssl->ctx) { + return NGX_OK; } - llcf->ssl->log = cf->log; + if (llcf->ssl_certificates) { + if (llcf->ssl_certificate_keys == NULL + || llcf->ssl_certificate_keys->nelts + < llcf->ssl_certificates->nelts) + { + ngx_log_error(NGX_LOG_EMERG, cf->log, 0, + "no \"lua_ssl_certificate_key\" is defined " + "for certificate \"%V\"", + ((ngx_str_t *) llcf->ssl_certificates->elts) + + llcf->ssl_certificates->nelts - 1); + return NGX_ERROR; + } + } if (ngx_ssl_create(llcf->ssl, llcf->ssl_protocols, NULL) != NGX_OK) { return NGX_ERROR; @@ -1562,6 +1662,16 @@ ngx_http_lua_set_ssl(ngx_conf_t *cf, ngx_http_lua_loc_conf_t *llcf) return NGX_ERROR; } + if (llcf->ssl_certificates + && ngx_ssl_certificates(cf, llcf->ssl, + llcf->ssl_certificates, + llcf->ssl_certificate_keys, + NULL) + != NGX_OK) + { + return NGX_ERROR; + } + if (llcf->ssl_trusted_certificate.len && ngx_ssl_trusted_certificate(cf, llcf->ssl, &llcf->ssl_trusted_certificate, diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_pcrefix.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_pcrefix.c index 562847a63..5693b5495 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_pcrefix.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_pcrefix.c @@ -18,15 +18,61 @@ static ngx_pool_t *ngx_http_lua_pcre_pool = NULL; + +#if (NGX_PCRE2) +static ngx_uint_t ngx_regex_direct_alloc; +#else static void *(*old_pcre_malloc)(size_t); static void (*old_pcre_free)(void *ptr); +#endif /* XXX: work-around to nginx regex subsystem, must init a memory pool * to use PCRE functions. As PCRE still has memory-leaking problems, * and nginx overwrote pcre_malloc/free hooks with its own static * functions, so nobody else can reuse nginx regex subsystem... */ -static void * +#if (NGX_PCRE2) + +void * +ngx_http_lua_pcre_malloc(size_t size, void *data) +{ + dd("lua pcre pool is %p", ngx_http_lua_pcre_pool); + + if (ngx_http_lua_pcre_pool) { + return ngx_palloc(ngx_http_lua_pcre_pool, size); + } + + if (ngx_regex_direct_alloc) { + return ngx_alloc(size, ngx_cycle->log); + } + + fprintf(stderr, "error: lua pcre malloc failed due to empty pcre pool"); + + return NULL; +} + + +void +ngx_http_lua_pcre_free(void *ptr, void *data) +{ + dd("lua pcre pool is %p", ngx_http_lua_pcre_pool); + + if (ngx_http_lua_pcre_pool) { + ngx_pfree(ngx_http_lua_pcre_pool, ptr); + return; + } + + if (ngx_regex_direct_alloc) { + ngx_free(ptr); + return; + } + + fprintf(stderr, "error: lua pcre free failed due to empty pcre pool"); +} + +#else + +void * ngx_http_lua_pcre_malloc(size_t size) { dd("lua pcre pool is %p", ngx_http_lua_pcre_pool); @@ -54,6 +100,41 @@ ngx_http_lua_pcre_free(void *ptr) fprintf(stderr, "error: lua pcre free failed due to empty pcre pool"); } +#endif + + +#if (NGX_PCRE2) + +ngx_pool_t * +ngx_http_lua_pcre_malloc_init(ngx_pool_t *pool) +{ + ngx_pool_t *old_pool; + + dd("lua pcre pool was %p", ngx_http_lua_pcre_pool); + + ngx_regex_direct_alloc = (pool == NULL) ? 1 : 0; + + old_pool = ngx_http_lua_pcre_pool; + ngx_http_lua_pcre_pool = pool; + + dd("lua pcre pool is %p", ngx_http_lua_pcre_pool); + + return old_pool; +} + + +void +ngx_http_lua_pcre_malloc_done(ngx_pool_t *old_pool) +{ + dd("lua pcre pool was %p", ngx_http_lua_pcre_pool); + + ngx_http_lua_pcre_pool = old_pool; + ngx_regex_direct_alloc = 0; + + dd("lua pcre pool is %p", ngx_http_lua_pcre_pool); +} + +#else ngx_pool_t * ngx_http_lua_pcre_malloc_init(ngx_pool_t *pool) @@ -101,6 +182,7 @@ ngx_http_lua_pcre_malloc_done(ngx_pool_t *old_pool) } } +#endif #endif /* NGX_PCRE */ /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_pcrefix.h b/src/deps/src/lua-nginx-module/src/ngx_http_lua_pcrefix.h index 80f29f9e7..e1097b72e 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_pcrefix.h +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_pcrefix.h @@ -13,8 +13,15 @@ #if (NGX_PCRE) + ngx_pool_t *ngx_http_lua_pcre_malloc_init(ngx_pool_t *pool); void ngx_http_lua_pcre_malloc_done(ngx_pool_t *old_pool); + +#if NGX_PCRE2 +void *ngx_http_lua_pcre_malloc(size_t size, void *data); +void ngx_http_lua_pcre_free(void *ptr, void *data); +#endif + #endif diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_regex.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_regex.c index 5c17cfe09..1b52fa233 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_regex.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_regex.c @@ -9,7 +9,6 @@ #endif #include "ddebug.h" - #if (NGX_PCRE) #include "ngx_http_lua_pcrefix.h" @@ -17,13 +16,24 @@ #include "ngx_http_lua_util.h" -#if (PCRE_MAJOR >= 6) +#if (PCRE_MAJOR >= 6 || NGX_PCRE2) # define LUA_HAVE_PCRE_DFA 1 #else # define LUA_HAVE_PCRE_DFA 0 #endif +#if (NGX_PCRE2) +static pcre2_compile_context *ngx_regex_compile_context; +static pcre2_match_context *ngx_regex_match_context; +static pcre2_match_data *ngx_regex_match_data; +static ngx_uint_t ngx_regex_match_data_size = 0; + +#define PCRE2_VERSION_SIZE 64 +static char ngx_pcre2_version[PCRE2_VERSION_SIZE]; +#endif + + #define NGX_LUA_RE_MODE_DFA (1<<1) #define NGX_LUA_RE_MODE_JIT (1<<2) #define NGX_LUA_RE_NO_UTF8_CHECK (1<<4) @@ -42,8 +52,17 @@ typedef struct { int ncaptures; int *captures; +#if (NGX_PCRE2) + pcre2_code *regex; + /* + * pcre2 doesn't use pcre_extra any more, + * just for keeping same memory layout in the lua ffi cdef + */ + void *regex_sd; +#else pcre *regex; pcre_extra *regex_sd; +#endif ngx_http_lua_complex_value_t *replace; @@ -57,7 +76,11 @@ typedef struct { ngx_pool_t *pool; ngx_int_t options; +#if (NGX_PCRE2) + pcre2_code *regex; +#else pcre *regex; +#endif int captures; ngx_str_t err; } ngx_http_lua_regex_compile_t; @@ -65,8 +88,12 @@ typedef struct { typedef struct { ngx_http_request_t *request; +#if (NGX_PCRE2) + pcre2_code *regex; +#else pcre *regex; pcre_extra *regex_sd; +#endif int ncaptures; int *captures; int captures_len; @@ -74,8 +101,6 @@ typedef struct { } ngx_http_lua_regex_ctx_t; -static void ngx_http_lua_regex_free_study_data(ngx_pool_t *pool, - pcre_extra *sd); static ngx_int_t ngx_http_lua_regex_compile(ngx_http_lua_regex_compile_t *rc); @@ -91,22 +116,156 @@ static ngx_int_t ngx_http_lua_regex_compile(ngx_http_lua_regex_compile_t *rc); static void -ngx_http_lua_regex_free_study_data(ngx_pool_t *pool, pcre_extra *sd) +ngx_http_lua_regex_free_study_data(ngx_pool_t *pool, ngx_http_lua_regex_t *re) { - ngx_pool_t *old_pool; + ngx_pool_t *old_pool; - old_pool = ngx_http_lua_pcre_malloc_init(pool); +#if (NGX_PCRE2) + if (re && re->regex) { + old_pool = ngx_http_lua_pcre_malloc_init(pool); -#if LUA_HAVE_PCRE_JIT - pcre_free_study(sd); + pcre2_code_free(re->regex); + + ngx_http_lua_pcre_malloc_done(old_pool); + + re->regex = NULL; + } #else - pcre_free(sd); + if (re && re->regex_sd) { + old_pool = ngx_http_lua_pcre_malloc_init(pool); +#if LUA_HAVE_PCRE_JIT + pcre_free_study(re->regex_sd); +#else + pcre_free(re->regex_sd); #endif + ngx_http_lua_pcre_malloc_done(old_pool); - ngx_http_lua_pcre_malloc_done(old_pool); + re->regex_sd = NULL; + } +#endif } +#if (NGX_PCRE2) +static ngx_int_t +ngx_http_lua_regex_compile(ngx_http_lua_regex_compile_t *rc) +{ + int n, errcode; + char *p; + size_t erroff; + u_char errstr[128]; + pcre2_code *re; + ngx_pool_t *old_pool; + pcre2_general_context *gctx; + pcre2_compile_context *cctx; + + ngx_http_lua_main_conf_t *lmcf; + + if (ngx_regex_compile_context == NULL) { + /* + * Allocate a compile context if not yet allocated. This uses + * direct allocations from heap, so the result can be cached + * even at runtime. + */ + + old_pool = ngx_http_lua_pcre_malloc_init(NULL); + + gctx = pcre2_general_context_create(ngx_http_lua_pcre_malloc, + ngx_http_lua_pcre_free, + NULL); + if (gctx == NULL) { + ngx_http_lua_pcre_malloc_done(old_pool); + goto nomem; + } + + cctx = pcre2_compile_context_create(gctx); + if (cctx == NULL) { + pcre2_general_context_free(gctx); + ngx_http_lua_pcre_malloc_done(old_pool); + goto nomem; + } + + ngx_regex_compile_context = cctx; + + ngx_regex_match_context = pcre2_match_context_create(gctx); + if (ngx_regex_match_context == NULL) { + pcre2_general_context_free(gctx); + ngx_http_lua_pcre_malloc_done(old_pool); + goto nomem; + } + + lmcf = ngx_http_cycle_get_module_main_conf(ngx_cycle, + ngx_http_lua_module); + if (lmcf && lmcf->regex_match_limit > 0) { + pcre2_set_match_limit(ngx_regex_match_context, + lmcf->regex_match_limit); + } + + pcre2_general_context_free(gctx); + ngx_http_lua_pcre_malloc_done(old_pool); + } + + old_pool = ngx_http_lua_pcre_malloc_init(rc->pool); + + re = pcre2_compile(rc->pattern.data, + rc->pattern.len, rc->options, + &errcode, &erroff, ngx_regex_compile_context); + + ngx_http_lua_pcre_malloc_done(old_pool); + + if (re == NULL) { + pcre2_get_error_message(errcode, errstr, 128); + + if ((size_t) erroff == rc->pattern.len) { + rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, + "pcre2_compile() failed: %s in \"%V\"", + errstr, &rc->pattern) + - rc->err.data; + + } else { + rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, + "pcre2_compile() failed: %s in " + "\"%V\" at \"%s\"", errstr, &rc->pattern, + rc->pattern.data + erroff) + - rc->err.data; + } + + return NGX_ERROR; + } + + rc->regex = re; + + n = pcre2_pattern_info(re, PCRE2_INFO_CAPTURECOUNT, &rc->captures); + if (n < 0) { + p = "pcre2_pattern_info(\"%V\", PCRE_INFO_CAPTURECOUNT) failed: %d"; + goto failed; + } + +#if (NGX_DEBUG) + ngx_log_debug3(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0, + "pcre2_compile: pattern[%V], options 0x%08Xd, ncaptures %d", + &rc->pattern, rc->options, rc->captures); +#endif + + return NGX_OK; + +failed: + + rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, p, &rc->pattern, n) + - rc->err.data; + return NGX_ERROR; + +nomem: + + rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, + "regex \"%V\" compilation failed: no memory", + &rc->pattern) + - rc->err.data; + return NGX_ERROR; +} + +#else + static ngx_int_t ngx_http_lua_regex_compile(ngx_http_lua_regex_compile_t *rc) { @@ -159,13 +318,14 @@ failed: - rc->err.data; return NGX_OK; } +#endif ngx_int_t ngx_http_lua_ffi_set_jit_stack_size(int size, u_char *errstr, size_t *errstr_size) { -#if LUA_HAVE_PCRE_JIT +#if (LUA_HAVE_PCRE_JIT) ngx_http_lua_main_conf_t *lmcf; ngx_pool_t *pool, *old_pool; @@ -186,15 +346,24 @@ ngx_http_lua_ffi_set_jit_stack_size(int size, u_char *errstr, if (lmcf->jit_stack) { old_pool = ngx_http_lua_pcre_malloc_init(pool); +#if (NGX_PCRE2) + pcre2_jit_stack_free(lmcf->jit_stack); +#else pcre_jit_stack_free(lmcf->jit_stack); +#endif ngx_http_lua_pcre_malloc_done(old_pool); } old_pool = ngx_http_lua_pcre_malloc_init(pool); +#if (NGX_PCRE2) + lmcf->jit_stack = pcre2_jit_stack_create(NGX_LUA_RE_MIN_JIT_STACK_SIZE, + size, NULL); +#else lmcf->jit_stack = pcre_jit_stack_alloc(NGX_LUA_RE_MIN_JIT_STACK_SIZE, size); +#endif ngx_http_lua_pcre_malloc_done(old_pool); @@ -214,10 +383,150 @@ ngx_http_lua_ffi_set_jit_stack_size(int size, u_char *errstr, - errstr; return NGX_ERROR; -#endif /* LUA_HAVE_PCRE_JIT */ +#endif } +#if (NGX_PCRE2) +static void +ngx_http_lua_regex_jit_compile(ngx_http_lua_regex_t *re, int flags, + ngx_pool_t *pool, ngx_http_lua_main_conf_t *lmcf, + ngx_http_lua_regex_compile_t *re_comp) +{ + ngx_int_t ret; + ngx_pool_t *old_pool; + + if (flags & NGX_LUA_RE_MODE_JIT) { + old_pool = ngx_http_lua_pcre_malloc_init(pool); + ret = pcre2_jit_compile(re_comp->regex, PCRE2_JIT_COMPLETE); + + if (ret != 0) { + ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0, + "pcre2_jit_compile() failed: %d in \"%V\", " + "ignored", + ret, &re_comp->pattern); + +#if (NGX_DEBUG) + + } else { + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0, + "pcre2 JIT compiled successfully"); +# endif /* !(NGX_DEBUG) */ + } + + ngx_http_lua_pcre_malloc_done(old_pool); + + } + + if (lmcf && lmcf->jit_stack) { + pcre2_jit_stack_assign(ngx_regex_match_context, NULL, + lmcf->jit_stack); + } + + return; +} + +#else + +static void +ngx_http_lua_regex_jit_compile(ngx_http_lua_regex_t *re, int flags, + ngx_pool_t *pool, ngx_http_lua_main_conf_t *lmcf, + ngx_http_lua_regex_compile_t *re_comp) +{ + const char *msg; + pcre_extra *sd = NULL; + ngx_pool_t *old_pool; + + +#if (LUA_HAVE_PCRE_JIT) + if (flags & NGX_LUA_RE_MODE_JIT) { + old_pool = ngx_http_lua_pcre_malloc_init(pool); + sd = pcre_study(re_comp->regex, PCRE_STUDY_JIT_COMPILE, &msg); + ngx_http_lua_pcre_malloc_done(old_pool); + +# if (NGX_DEBUG) + if (msg != NULL) { + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0, + "pcre study failed with PCRE_STUDY_JIT_COMPILE: " + "%s (%p)", msg, sd); + } + + if (sd != NULL) { + int jitted; + + old_pool = ngx_http_lua_pcre_malloc_init(pool); + + pcre_fullinfo(re_comp->regex, sd, PCRE_INFO_JIT, &jitted); + + ngx_http_lua_pcre_malloc_done(old_pool); + + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0, + "pcre JIT compiling result: %d", jitted); + } +# endif /* !(NGX_DEBUG) */ + + } else { + old_pool = ngx_http_lua_pcre_malloc_init(pool); + sd = pcre_study(re_comp->regex, 0, &msg); + ngx_http_lua_pcre_malloc_done(old_pool); + } + + if (sd && lmcf && lmcf->jit_stack) { + pcre_assign_jit_stack(sd, NULL, lmcf->jit_stack); + } + + if (sd + && lmcf && lmcf->regex_match_limit > 0 + && !(flags & NGX_LUA_RE_MODE_DFA)) + { + sd->flags |= PCRE_EXTRA_MATCH_LIMIT; + sd->match_limit = lmcf->regex_match_limit; + } + +#endif /* LUA_HAVE_PCRE_JIT */ + + re->regex_sd = sd; +} +#endif + + +#if (NGX_PCRE2) +void +ngx_http_lua_regex_cleanup(void *data) +{ + ngx_pool_t *old_pool; + ngx_http_lua_main_conf_t *lmcf; + + lmcf = data; + + if (ngx_regex_compile_context) { + old_pool = ngx_http_lua_pcre_malloc_init(NULL); + pcre2_compile_context_free(ngx_regex_compile_context); + ngx_regex_compile_context = NULL; + ngx_http_lua_pcre_malloc_done(old_pool); + } + + if (lmcf && lmcf->jit_stack) { + old_pool = ngx_http_lua_pcre_malloc_init(NULL); + + pcre2_jit_stack_free(lmcf->jit_stack); + lmcf->jit_stack = NULL; + + ngx_http_lua_pcre_malloc_done(old_pool); + } + + if (ngx_regex_match_data) { + old_pool = ngx_http_lua_pcre_malloc_init(NULL); + pcre2_match_data_free(ngx_regex_match_data); + ngx_regex_match_data = NULL; + ngx_regex_match_data_size = 0; + ngx_http_lua_pcre_malloc_done(old_pool); + } + +} +#endif + + ngx_http_lua_regex_t * ngx_http_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, int flags, int pcre_opts, u_char *errstr, @@ -228,8 +537,7 @@ ngx_http_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, ngx_int_t rc; const char *msg; ngx_pool_t *pool, *old_pool; - pcre_extra *sd = NULL; - ngx_http_lua_regex_t *re; + ngx_http_lua_regex_t *re = NULL; ngx_http_lua_main_conf_t *lmcf; ngx_http_lua_regex_compile_t re_comp; @@ -251,6 +559,8 @@ ngx_http_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, } re->pool = pool; + re->regex = NULL; + re->regex_sd = NULL; re_comp.options = pcre_opts; re_comp.pattern.data = (u_char *) pat; @@ -274,54 +584,7 @@ ngx_http_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, ngx_http_lua_assert(lmcf != NULL); -#if (LUA_HAVE_PCRE_JIT) - - if (flags & NGX_LUA_RE_MODE_JIT) { - - old_pool = ngx_http_lua_pcre_malloc_init(pool); - sd = pcre_study(re_comp.regex, PCRE_STUDY_JIT_COMPILE, &msg); - ngx_http_lua_pcre_malloc_done(old_pool); - -# if (NGX_DEBUG) - if (msg != NULL) { - ngx_log_debug2(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0, - "pcre study failed with PCRE_STUDY_JIT_COMPILE: " - "%s (%p)", msg, sd); - } - - if (sd != NULL) { - int jitted; - - old_pool = ngx_http_lua_pcre_malloc_init(pool); - - pcre_fullinfo(re_comp.regex, sd, PCRE_INFO_JIT, &jitted); - - ngx_http_lua_pcre_malloc_done(old_pool); - - ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0, - "pcre JIT compiling result: %d", jitted); - } -# endif /* !(NGX_DEBUG) */ - - } else { - old_pool = ngx_http_lua_pcre_malloc_init(pool); - sd = pcre_study(re_comp.regex, 0, &msg); - ngx_http_lua_pcre_malloc_done(old_pool); - } - - if (sd && lmcf->jit_stack) { - pcre_assign_jit_stack(sd, NULL, lmcf->jit_stack); - } - -#endif /* LUA_HAVE_PCRE_JIT */ - - if (sd - && lmcf && lmcf->regex_match_limit > 0 - && !(flags & NGX_LUA_RE_MODE_DFA)) - { - sd->flags |= PCRE_EXTRA_MATCH_LIMIT; - sd->match_limit = lmcf->regex_match_limit; - } + ngx_http_lua_regex_jit_compile(re, flags, pool, lmcf, &re_comp); if (flags & NGX_LUA_RE_MODE_DFA) { ovecsize = 2; @@ -339,6 +602,31 @@ ngx_http_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, goto error; } +#if (NGX_PCRE2) + if (pcre2_pattern_info(re_comp.regex, PCRE2_INFO_NAMECOUNT, + &re->name_count) < 0) + { + msg = "cannot acquire named subpattern count"; + goto error; + } + + if (re->name_count > 0) { + if (pcre2_pattern_info(re_comp.regex, PCRE2_INFO_NAMEENTRYSIZE, + &re->name_entry_size) != 0) + { + msg = "cannot acquire named subpattern entry size"; + goto error; + } + + if (pcre2_pattern_info(re_comp.regex, PCRE2_INFO_NAMETABLE, + &re->name_table) != 0) + { + msg = "cannot acquire named subpattern table"; + goto error; + } + } + +#else if (pcre_fullinfo(re_comp.regex, NULL, PCRE_INFO_NAMECOUNT, &re->name_count) != 0) { @@ -361,9 +649,9 @@ ngx_http_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, goto error; } } +#endif re->regex = re_comp.regex; - re->regex_sd = sd; re->ncaptures = re_comp.captures; re->captures = cap; re->replace = NULL; @@ -379,9 +667,7 @@ error: p = ngx_snprintf(errstr, errstr_size - 1, "%s", msg); *p = '\0'; - if (sd) { - ngx_http_lua_regex_free_study_data(pool, sd); - } + ngx_http_lua_regex_free_study_data(pool, re); if (pool) { ngx_destroy_pool(pool); @@ -391,6 +677,103 @@ error: } +#if (NGX_PCRE2) +int +ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, + const u_char *s, size_t len, int pos) +{ + int rc, exec_opts = 0; + size_t *ov; + ngx_uint_t ovecsize, n, i; + ngx_pool_t *old_pool; + + if (flags & NGX_LUA_RE_MODE_DFA) { + ovecsize = 2; + re->ncaptures = 0; + + } else { + ovecsize = (re->ncaptures + 1) * 3; + } + + old_pool = ngx_http_lua_pcre_malloc_init(NULL); + + if (ngx_regex_match_data == NULL + || ovecsize > ngx_regex_match_data_size) + { + /* + * Allocate a match data if not yet allocated or smaller than + * needed. + */ + + if (ngx_regex_match_data) { + pcre2_match_data_free(ngx_regex_match_data); + } + + ngx_regex_match_data_size = ovecsize; + ngx_regex_match_data = pcre2_match_data_create(ovecsize / 3, NULL); + + if (ngx_regex_match_data == NULL) { + rc = PCRE2_ERROR_NOMEMORY; + goto failed; + } + } + + if (flags & NGX_LUA_RE_NO_UTF8_CHECK) { + exec_opts = PCRE2_NO_UTF_CHECK; + + } else { + exec_opts = 0; + } + + if (flags & NGX_LUA_RE_MODE_DFA) { + int ws[NGX_LUA_RE_DFA_MODE_WORKSPACE_COUNT]; + rc = pcre2_dfa_match(re->regex, s, len, pos, exec_opts, + ngx_regex_match_data, ngx_regex_match_context, + ws, sizeof(ws) / sizeof(ws[0])); + + + } else { + rc = pcre2_match(re->regex, s, len, pos, exec_opts, + ngx_regex_match_data, ngx_regex_match_context); + } + + if (rc < 0) { +#if (NGX_DEBUG) + ngx_log_debug4(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0, + "pcre2_match failed: flags 0x%05Xd, options 0x%08Xd, " + "rc %d, ovecsize %ui", flags, exec_opts, rc, ovecsize); +#endif + + goto failed; + } + + n = pcre2_get_ovector_count(ngx_regex_match_data); + ov = pcre2_get_ovector_pointer(ngx_regex_match_data); + +#if (NGX_DEBUG) + ngx_log_debug5(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0, + "pcre2_match: flags 0x%05Xd, options 0x%08Xd, rc %d, " + "n %ui, ovecsize %ui", flags, exec_opts, rc, n, ovecsize); +#endif + + if (!(flags & NGX_LUA_RE_MODE_DFA) && n > ovecsize / 3) { + n = ovecsize / 3; + } + + for (i = 0; i < n; i++) { + re->captures[i * 2] = ov[i * 2]; + re->captures[i * 2 + 1] = ov[i * 2 + 1]; + } + +failed: + + ngx_http_lua_pcre_malloc_done(old_pool); + + return rc; +} + +#else + int ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, const u_char *s, size_t len, int pos) @@ -427,7 +810,8 @@ ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, int ws[NGX_LUA_RE_DFA_MODE_WORKSPACE_COUNT]; rc = ngx_http_lua_regex_dfa_exec(re->regex, sd, &subj, (int) pos, cap, ovecsize, ws, - sizeof(ws)/sizeof(ws[0]), exec_opts); + sizeof(ws) / sizeof(ws[0]), + exec_opts); #else @@ -443,28 +827,19 @@ ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, return rc; } +#endif + void ngx_http_lua_ffi_destroy_regex(ngx_http_lua_regex_t *re) { - ngx_pool_t *old_pool; - dd("destroy regex called"); if (re == NULL || re->pool == NULL) { return; } - if (re->regex_sd) { - old_pool = ngx_http_lua_pcre_malloc_init(re->pool); -#if LUA_HAVE_PCRE_JIT - pcre_free_study(re->regex_sd); -#else - pcre_free(re->regex_sd); -#endif - ngx_http_lua_pcre_malloc_done(old_pool); - re->regex_sd = NULL; - } + ngx_http_lua_regex_free_study_data(re->pool, re); ngx_destroy_pool(re->pool); } @@ -592,7 +967,13 @@ ngx_http_lua_ffi_max_regex_cache_size(void) const char * ngx_http_lua_ffi_pcre_version(void) { +#if (NGX_PCRE2) + pcre2_config(PCRE2_CONFIG_VERSION, ngx_pcre2_version); + + return ngx_pcre2_version; +#else return pcre_version(); +#endif } diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_req_body.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_req_body.c index 935fafc8a..61ab99904 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_req_body.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_req_body.c @@ -85,6 +85,23 @@ ngx_http_lua_ngx_req_read_body(lua_State *L) return luaL_error(L, "request object not found"); } +/* http2 read body may break http2 stream process */ +#if (NGX_HTTP_V2) + if (r->main->stream && r->headers_in.content_length_n < 0) { + return luaL_error(L, "http2 requests are not supported" + " without content-length header"); + } +#endif + +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30 + && r->headers_in.content_length_n < 0) + { + return luaL_error(L, "http3 requests are not supported" + " without content-length header"); + } +#endif + r->request_body_in_single_buf = 1; r->request_body_in_persistent_file = 1; r->request_body_in_clean_file = 1; @@ -229,15 +246,21 @@ ngx_http_lua_ngx_req_get_body_data(lua_State *L) { ngx_http_request_t *r; int n; - size_t len; + size_t len, max; + size_t size, rest; ngx_chain_t *cl; u_char *p; u_char *buf; n = lua_gettop(L); - if (n != 0) { - return luaL_error(L, "expecting 0 arguments but seen %d", n); + if (n != 0 && n != 1) { + return luaL_error(L, "expecting 0 or 1 arguments but seen %d", n); + } + + max = 0; + if (n == 1) { + max = (size_t) luaL_checknumber(L, 1); } r = ngx_http_lua_get_req(L); @@ -265,6 +288,7 @@ ngx_http_lua_ngx_req_get_body_data(lua_State *L) return 1; } + len = (max > 0 && len > max) ? max : len; lua_pushlstring(L, (char *) cl->buf->pos, len); return 1; } @@ -275,7 +299,13 @@ ngx_http_lua_ngx_req_get_body_data(lua_State *L) for (; cl; cl = cl->next) { dd("body chunk len: %d", (int) ngx_buf_size(cl->buf)); - len += cl->buf->last - cl->buf->pos; + size = cl->buf->last - cl->buf->pos; + if (max > 0 && (len + size > max)) { + len = max; + break; + } + + len += size; } if (len == 0) { @@ -286,8 +316,15 @@ ngx_http_lua_ngx_req_get_body_data(lua_State *L) buf = (u_char *) lua_newuserdata(L, len); p = buf; - for (cl = r->request_body->bufs; cl; cl = cl->next) { - p = ngx_copy(p, cl->buf->pos, cl->buf->last - cl->buf->pos); + rest = len; + for (cl = r->request_body->bufs; cl != NULL && rest > 0; cl = cl->next) { + size = ngx_buf_size(cl->buf); + if (size > rest) { /* reach limit*/ + size = rest; + } + + p = ngx_copy(p, cl->buf->pos, size); + rest -= size; } lua_pushlstring(L, (char *) buf, len); @@ -312,6 +349,23 @@ ngx_http_lua_ngx_req_get_body_file(lua_State *L) return luaL_error(L, "request object not found"); } +/* http2 read body may break http2 stream process */ +#if (NGX_HTTP_V2) + if (r->main->stream && r->headers_in.content_length_n < 0) { + return luaL_error(L, "http2 requests are not supported" + " without content-length header"); + } +#endif + +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30 + && r->headers_in.content_length_n < 0) + { + return luaL_error(L, "http3 requests are not supported" + " without content-length header"); + } +#endif + ngx_http_lua_check_fake_request(L, r); if (r->request_body == NULL || r->request_body->temp_file == NULL) { diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_rewriteby.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_rewriteby.c index 4109f288e..c56bba5d7 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_rewriteby.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_rewriteby.c @@ -140,7 +140,12 @@ ngx_http_lua_rewrite_handler(ngx_http_request_t *r) return NGX_DONE; } +/* http2 read body may break http2 stream process */ +#if (NGX_HTTP_V2) + if (llcf->force_read_body && !ctx->read_body_done && !r->main->stream) { +#else if (llcf->force_read_body && !ctx->read_body_done) { +#endif r->request_body_in_single_buf = 1; r->request_body_in_persistent_file = 1; r->request_body_in_clean_file = 1; diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_server_rewriteby.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_server_rewriteby.c index be860693f..997262eeb 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_server_rewriteby.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_server_rewriteby.c @@ -102,8 +102,13 @@ ngx_http_lua_server_rewrite_handler(ngx_http_request_t *r) return NGX_DONE; } - /* TODO: lscf do not have force_read_body */ +/* TODO: lscf do not have force_read_body + * http2 read body may break http2 stream process */ +#if (NGX_HTTP_V2) + if (llcf->force_read_body && !ctx->read_body_done && !r->main->stream) { +#else if (llcf->force_read_body && !ctx->read_body_done) { +#endif r->request_body_in_single_buf = 1; r->request_body_in_persistent_file = 1; r->request_body_in_clean_file = 1; diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_shdict.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_shdict.c index 2e0b04406..c63eb3c10 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_shdict.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_shdict.c @@ -198,9 +198,6 @@ ngx_http_lua_shdict_lookup(ngx_shm_zone_t *shm_zone, ngx_uint_t hash, rc = ngx_memn2cmp(kdata, sd->data, klen, (size_t) sd->key_len); if (rc == 0) { - ngx_queue_remove(&sd->queue); - ngx_queue_insert_head(&ctx->sh->lru_queue, &sd->queue); - *sdp = sd; dd("node expires: %lld", (long long) sd->expires); @@ -219,6 +216,9 @@ ngx_http_lua_shdict_lookup(ngx_shm_zone_t *shm_zone, ngx_uint_t hash, } } + ngx_queue_remove(&sd->queue); + ngx_queue_insert_head(&ctx->sh->lru_queue, &sd->queue); + return NGX_OK; } @@ -654,7 +654,7 @@ ngx_http_lua_shared_dict_get(ngx_shm_zone_t *zone, u_char *key_data, return NGX_ERROR; } - ngx_memcpy(&value->value.b, data, len); + ngx_memcpy(&value->value.n, data, len); break; case SHDICT_TBOOLEAN: diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_socket_tcp.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_socket_tcp.c index 939156952..230679fa7 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_socket_tcp.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_socket_tcp.c @@ -75,6 +75,8 @@ static void ngx_http_lua_socket_dummy_handler(ngx_http_request_t *r, ngx_http_lua_socket_tcp_upstream_t *u); static int ngx_http_lua_socket_tcp_receive_helper(ngx_http_request_t *r, ngx_http_lua_socket_tcp_upstream_t *u, lua_State *L); +static void ngx_http_lua_socket_tcp_read_prepare(ngx_http_request_t *r, + ngx_http_lua_socket_tcp_upstream_t *u, void *data, lua_State *L); static ngx_int_t ngx_http_lua_socket_tcp_read(ngx_http_request_t *r, ngx_http_lua_socket_tcp_upstream_t *u); static int ngx_http_lua_socket_tcp_receive_retval_handler(ngx_http_request_t *r, @@ -863,7 +865,9 @@ ngx_http_lua_socket_tcp_bind(lua_State *L) | NGX_HTTP_LUA_CONTEXT_ACCESS | NGX_HTTP_LUA_CONTEXT_CONTENT | NGX_HTTP_LUA_CONTEXT_TIMER - | NGX_HTTP_LUA_CONTEXT_SSL_CERT); + | NGX_HTTP_LUA_CONTEXT_SSL_CERT + | NGX_HTTP_LUA_CONTEXT_SSL_SESS_FETCH + | NGX_HTTP_LUA_CONTEXT_SSL_CLIENT_HELLO); luaL_checktype(L, 1, LUA_TTABLE); @@ -2163,8 +2167,6 @@ ngx_http_lua_socket_tcp_receive_helper(ngx_http_request_t *r, ngx_http_lua_ctx_t *ctx; ngx_http_lua_co_ctx_t *coctx; - u->input_filter_ctx = u; - ctx = ngx_http_get_module_ctx(r, ngx_http_lua_module); if (u->bufs_in == NULL) { @@ -2193,6 +2195,8 @@ ngx_http_lua_socket_tcp_receive_helper(ngx_http_request_t *r, u->read_waiting = 0; u->read_co_ctx = NULL; + ngx_http_lua_socket_tcp_read_prepare(r, u, u, L); + rc = ngx_http_lua_socket_tcp_read(r, u); if (rc == NGX_ERROR) { @@ -2409,7 +2413,7 @@ ngx_http_lua_socket_tcp_receive(lua_State *L) case LUA_TNUMBER: bytes = lua_tointeger(L, 2); if (bytes < 0) { - return luaL_argerror(L, 2, "bad pattern argument"); + return luaL_argerror(L, 2, "bad number argument"); } #if 1 @@ -2426,7 +2430,7 @@ ngx_http_lua_socket_tcp_receive(lua_State *L) break; default: - return luaL_argerror(L, 2, "bad pattern argument"); + return luaL_argerror(L, 2, "bad argument"); break; } @@ -2514,6 +2518,87 @@ ngx_http_lua_socket_read_any(void *data, ssize_t bytes) } +static void +ngx_http_lua_socket_tcp_read_prepare(ngx_http_request_t *r, + ngx_http_lua_socket_tcp_upstream_t *u, void *data, lua_State *L) +{ + ngx_http_lua_ctx_t *ctx; + ngx_chain_t *new_cl; + ngx_buf_t *b; + off_t size; + + ngx_http_lua_socket_compiled_pattern_t *cp; + + /* input_filter_ctx doesn't change, no need recovering */ + if (u->input_filter_ctx == data) { + return; + } + + /* last input_filter_ctx is null or upstream, no data pending */ + if (u->input_filter_ctx == NULL || u->input_filter_ctx == u) { + u->input_filter_ctx = data; + return; + } + + /* compiled pattern may be with data pending */ + + cp = u->input_filter_ctx; + u->input_filter_ctx = data; + + cp->upstream = NULL; + + /* no data pending */ + if (cp->state <= 0) { + return; + } + + b = &u->buffer; + + if (b->pos - b->start >= cp->state) { + dd("pending data in one buffer"); + + b->pos -= cp->state; + + u->buf_in->buf->pos = b->pos; + u->buf_in->buf->last = b->pos; + + /* reset dfa state for future matching */ + cp->state = 0; + return; + } + + dd("pending data in multiple buffers"); + + ctx = ngx_http_get_module_ctx(r, ngx_http_lua_module); + + size = ngx_buf_size(b); + + new_cl = + ngx_http_lua_chain_get_free_buf(r->connection->log, r->pool, + &ctx->free_recv_bufs, + cp->state + size); + + if (new_cl == NULL) { + luaL_error(L, "no memory"); + return; + } + + ngx_memcpy(b, new_cl->buf, sizeof(ngx_buf_t)); + + b->last = ngx_copy(b->last, cp->pattern.data, cp->state); + b->last = ngx_copy(b->last, u->buf_in->buf->pos, size); + + u->buf_in->next = ctx->free_recv_bufs; + ctx->free_recv_bufs = u->buf_in; + + u->bufs_in = new_cl; + u->buf_in = new_cl; + + /* reset dfa state for future matching */ + cp->state = 0; +} + + static ngx_int_t ngx_http_lua_socket_tcp_read(ngx_http_request_t *r, ngx_http_lua_socket_tcp_upstream_t *u) @@ -3261,7 +3346,7 @@ ngx_http_lua_socket_tcp_settimeouts(lua_State *L) n = lua_gettop(L); if (n != 4) { - return luaL_error(L, "ngx.socket settimeout: expecting 4 arguments " + return luaL_error(L, "ngx.socket settimeouts: expecting 4 arguments " "(including the object) but seen %d", lua_gettop(L)); } @@ -4243,6 +4328,11 @@ ngx_http_lua_socket_tcp_finalize(ngx_http_request_t *r, ngx_http_lua_socket_tcp_finalize_read_part(r, u); ngx_http_lua_socket_tcp_finalize_write_part(r, u); + if (u->input_filter_ctx != NULL && u->input_filter_ctx != u) { + ((ngx_http_lua_socket_compiled_pattern_t *) + u->input_filter_ctx)->upstream = NULL; + } + if (u->raw_downstream || u->body_downstream) { u->peer.connection = NULL; return; @@ -4496,7 +4586,7 @@ ngx_http_lua_socket_receiveuntil_iterator(lua_State *L) n = lua_gettop(L); if (n > 1) { - return luaL_error(L, "expecting 0 or 1 arguments, " + return luaL_error(L, "expecting 0 or 1 argument, " "but seen %d", n); } @@ -4559,8 +4649,6 @@ ngx_http_lua_socket_receiveuntil_iterator(lua_State *L) (u_char *) lua_tolstring(L, lua_upvalueindex(2), &cp->pattern.len); - u->input_filter_ctx = cp; - ctx = ngx_http_get_module_ctx(r, ngx_http_lua_module); if (u->bufs_in == NULL) { @@ -4587,6 +4675,8 @@ ngx_http_lua_socket_receiveuntil_iterator(lua_State *L) u->read_waiting = 0; u->read_co_ctx = NULL; + ngx_http_lua_socket_tcp_read_prepare(r, u, cp, L); + rc = ngx_http_lua_socket_tcp_read(r, u); if (rc == NGX_ERROR) { @@ -4915,13 +5005,24 @@ ngx_http_lua_socket_cleanup_compiled_pattern(lua_State *L) { ngx_http_lua_socket_compiled_pattern_t *cp; - ngx_http_lua_dfa_edge_t *edge, *p; - unsigned i; + ngx_http_lua_socket_tcp_upstream_t *u; + ngx_http_lua_dfa_edge_t *edge, *p; + unsigned i; dd("cleanup compiled pattern"); cp = lua_touserdata(L, 1); - if (cp == NULL || cp->recovering == NULL) { + if (cp == NULL) { + return 0; + } + + u = cp->upstream; + if (u != NULL) { + ngx_http_lua_socket_tcp_read_prepare(u->request, u, NULL, L); + u->input_filter_ctx = NULL; + } + + if (cp->recovering == NULL) { return 0; } @@ -4975,7 +5076,7 @@ ngx_http_lua_req_socket(lua_State *L) lua_pop(L, 1); } else { - return luaL_error(L, "expecting zero arguments, but got %d", + return luaL_error(L, "expecting 0 or 1 argument, but got %d", lua_gettop(L)); } @@ -4998,6 +5099,12 @@ ngx_http_lua_req_socket(lua_State *L) } #endif +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30) { + return luaL_error(L, "http v3 not supported yet"); + } +#endif + if (!raw && r->headers_in.chunked) { lua_pushnil(L); lua_pushliteral(L, "chunked request bodies not supported yet"); @@ -5494,6 +5601,7 @@ ngx_http_lua_socket_tcp_setkeepalive(lua_State *L) if (c->read->ready) { rc = ngx_http_lua_socket_keepalive_close_handler(c->read); if (rc != NGX_OK) { + ngx_http_lua_socket_tcp_finalize(r, u); lua_pushnil(L); lua_pushliteral(L, "connection in dubious state"); return 2; diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_ssl_client_helloby.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_ssl_client_helloby.c index a1dac6188..03ac430ef 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_ssl_client_helloby.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_ssl_client_helloby.c @@ -390,7 +390,7 @@ ngx_http_lua_ssl_client_hello_aborted(void *data) { ngx_http_lua_ssl_ctx_t *cctx = data; - dd("lua ssl client hello done"); + dd("lua ssl client hello aborted"); if (cctx->done) { /* completed successfully already */ diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_subrequest.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_subrequest.c index f6638c299..f4db9aaf6 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_subrequest.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_subrequest.c @@ -52,6 +52,8 @@ ngx_str_t ngx_http_lua_patch_method = ngx_str_t ngx_http_lua_trace_method = ngx_http_lua_method_name("TRACE"); +ngx_str_t host_header = ngx_string("host"); + static ngx_str_t ngx_http_lua_content_length_header_key = ngx_string("Content-Length"); @@ -1667,6 +1669,9 @@ ngx_http_lua_copy_request_headers(ngx_http_request_t *sr, clh->hash = ngx_http_lua_content_length_hash; clh->key = ngx_http_lua_content_length_header_key; +#if defined(nginx_version) && nginx_version >= 1023000 + clh->next = NULL; +#endif clh->lowcase_key = ngx_pnalloc(sr->pool, clh->key.len); if (clh->lowcase_key == NULL) { return NGX_ERROR; @@ -1696,6 +1701,17 @@ ngx_http_lua_copy_request_headers(ngx_http_request_t *sr, part = &pr->headers_in.headers.part; header = part->elts; +#if (NGX_HTTP_V3) + if (pr->headers_in.server.data != NULL) { + if (ngx_http_lua_set_input_header(sr, host_header, + pr->headers_in.server, 0) + == NGX_ERROR) + { + return NGX_ERROR; + } + } +#endif + for (i = 0; /* void */; i++) { if (i >= part->nelts) { diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_variable.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_variable.c index 573629ad2..2c6c6233b 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_variable.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_variable.c @@ -70,6 +70,18 @@ ngx_http_lua_ffi_var_get(ngx_http_request_t *r, u_char *name_data, } #endif +#if (NGX_HTTP_V3) + if (name_len == 9 + && r->http_version == NGX_HTTP_VERSION_30 + && ngx_strncasecmp(name_data, (u_char *) "http_host", 9) == 0 + && r->headers_in.server.data != NULL) + { + *value = r->headers_in.server.data; + *value_len = r->headers_in.server.len; + return NGX_OK; + } +#endif + hash = ngx_hash_strlow(lowcase_buf, name_data, name_len); name.data = lowcase_buf; diff --git a/src/deps/src/lua-nginx-module/src/ngx_http_lua_worker_thread.c b/src/deps/src/lua-nginx-module/src/ngx_http_lua_worker_thread.c index ed7b08929..3820d6377 100644 --- a/src/deps/src/lua-nginx-module/src/ngx_http_lua_worker_thread.c +++ b/src/deps/src/lua-nginx-module/src/ngx_http_lua_worker_thread.c @@ -42,7 +42,7 @@ typedef struct { ngx_http_lua_co_ctx_t *wait_co_ctx; int n_args; int rc; - int is_abort:1; + ngx_uint_t is_abort:1; } ngx_http_lua_worker_thread_ctx_t; @@ -157,15 +157,6 @@ ngx_http_lua_get_task_ctx(lua_State *L, ngx_http_request_t *r) ngx_http_lua_inject_shdict_api(lmcf, vm); lua_setglobal(vm, "ngx"); - /* inject API via ffi */ - lua_getglobal(vm, "require"); - lua_pushstring(vm, "resty.core.regex"); - if (lua_pcall(vm, 1, 0, 0) != 0) { - lua_close(vm); - ngx_free(ctx); - return NULL; - } - lua_getglobal(vm, "require"); lua_pushstring(vm, "resty.core.hash"); if (lua_pcall(vm, 1, 0, 0) != 0) { diff --git a/src/deps/src/lua-nginx-module/t/000--init.t b/src/deps/src/lua-nginx-module/t/000--init.t index 0dd08fe18..0016e1448 100644 --- a/src/deps/src/lua-nginx-module/t/000--init.t +++ b/src/deps/src/lua-nginx-module/t/000--init.t @@ -11,7 +11,7 @@ $ENV{TEST_NGINX_MYSQL_PORT} ||= 3306; our $http_config = <<'_EOC_'; # lua-resty-string is required for lua-resty-mysql - lua_package_path "../lua-resty-mysql/lib/?.lua;../lua-resty-string/lib/?.lua;;"; + lua_package_path "../lua-resty-rsa/lib/?.lua;../lua-resty-mysql/lib/?.lua;../lua-resty-string/lib/?.lua;;"; _EOC_ no_shuffle(); diff --git a/src/deps/src/lua-nginx-module/t/001-set.t b/src/deps/src/lua-nginx-module/t/001-set.t index db18f0258..009159e48 100644 --- a/src/deps/src/lua-nginx-module/t/001-set.t +++ b/src/deps/src/lua-nginx-module/t/001-set.t @@ -389,8 +389,8 @@ GET /lua GET /lua --- response_body_like: 500 Internal Server Error --- error_code: 500 ---- error_log -API disabled in the context of set_by_lua* +--- error_log eval +qr/(?:API disabled in the context of set_by_lua\*|http3 requests are not supported without content-length header)/ms @@ -404,8 +404,16 @@ API disabled in the context of set_by_lua* GET /lua --- response_body_like: 500 Internal Server Error --- error_code: 500 ---- error_log -API disabled in the context of set_by_lua* +--- error_log eval +my $err_log; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $err_log = "http v3 not supported yet"; +} else { + $err_log = "API disabled in the context of set_by_lua*"; +} + +$err_log; diff --git a/src/deps/src/lua-nginx-module/t/005-exit.t b/src/deps/src/lua-nginx-module/t/005-exit.t index eb123bd17..0783c6929 100644 --- a/src/deps/src/lua-nginx-module/t/005-exit.t +++ b/src/deps/src/lua-nginx-module/t/005-exit.t @@ -65,7 +65,7 @@ GET /lua --- error_log attempt to set status 404 via ngx.exit after sending out the response status 200 --- no_error_log -alert +[alert] --- response_body hi @@ -123,6 +123,7 @@ GET /api?user=agentz === TEST 6: working with ngx_auth_request (simplest form, w/o ngx_memc) +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} --- http_config eval " lua_package_cpath '$::LuaCpath'; @@ -195,6 +196,7 @@ Logged in 56 === TEST 7: working with ngx_auth_request (simplest form) +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} --- http_config eval " lua_package_cpath '$::LuaCpath'; @@ -267,6 +269,7 @@ Logged in 56 === TEST 8: working with ngx_auth_request +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} --- http_config eval " lua_package_cpath '$::LuaCpath'; @@ -771,6 +774,8 @@ GET /t --- response_body --- no_error_log [error] +--- curl_error +curl: (95) HTTP/3 stream 0 reset by server @@ -787,6 +792,8 @@ GET /t --- response_body --- no_error_log [error] +--- curl_error +curl: (95) HTTP/3 stream 0 reset by server diff --git a/src/deps/src/lua-nginx-module/t/010-request_body.t b/src/deps/src/lua-nginx-module/t/010-request_body.t index e669d9480..c47f9fc13 100644 --- a/src/deps/src/lua-nginx-module/t/010-request_body.t +++ b/src/deps/src/lua-nginx-module/t/010-request_body.t @@ -270,3 +270,22 @@ Expect: 100-Continue http finalize request: 500, "/echo_body?" a:1, c:2 http finalize request: 500, "/echo_body?" a:1, c:0 --- log_level: debug +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} + + + +=== TEST 13: test reading the first n bytes of request body +--- config + location /echo_body { + lua_need_request_body on; + content_by_lua_block { + local data = ngx.req.get_body_data(1) + ngx.say(data) + } + } +--- request +POST /echo_body +hello +--- response_body +h +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/014-bugs.t b/src/deps/src/lua-nginx-module/t/014-bugs.t index 877aecfdb..1b79aa4c5 100644 --- a/src/deps/src/lua-nginx-module/t/014-bugs.t +++ b/src/deps/src/lua-nginx-module/t/014-bugs.t @@ -194,6 +194,14 @@ Hi" === TEST 8: github issue 37: header bug https://github.com/chaoslawful/lua-nginx-module/issues/37 + +https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2 + Just as in HTTP/1.x, header field names are strings of ASCII + characters that are compared in a case-insensitive fashion. However, + header field names MUST be converted to lowercase prior to their + encoding in HTTP/2. A request or response containing uppercase + header field names MUST be treated as malformed + --- config location /sub { content_by_lua ' @@ -220,8 +228,17 @@ https://github.com/chaoslawful/lua-nginx-module/issues/37 --- request GET /lua --- raw_response_headers_like eval -".*Set-Cookie: TestCookie1=foo\r +my $headers; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $headers = ".*set-cookie: TestCookie1=foo\r +set-cookie: TestCookie2=bar.*" +} else { + $headers = ".*Set-Cookie: TestCookie1=foo\r Set-Cookie: TestCookie2=bar.*" +} + +$headers; @@ -714,6 +731,7 @@ Content-Type: application/json; charset=utf-8 === TEST 32: hang on upstream_next (from kindy) +--- no_http2 --- no_check_leak --- http_config upstream xx { @@ -770,6 +788,10 @@ eof found in body stream === TEST 34: testing a segfault when using ngx_poll_module + ngx_resolver See more details here: http://mailman.nginx.org/pipermail/nginx-devel/2013-January/003275.html + +http3 may cache the dns result. +so need to skip for http3 +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} --- config location /t { set $myserver nginx.org; @@ -786,6 +808,8 @@ See more details here: http://mailman.nginx.org/pipermail/nginx-devel/2013-Janua [alert] --- error_log eval qr/(?:send|recv)\(\) failed \(\d+: Connection refused\) while resolving/ +--- curl_error eval +qr/curl: \(28\) Operation timed out after \d+ milliseconds with 0 bytes received/ @@ -861,6 +885,7 @@ GET /t --- no_error_log [error] --- timeout: 10 +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} @@ -868,7 +893,7 @@ GET /t --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;'; server { - listen 12354; + listen \$TEST_NGINX_RAND_PORT_1; location = /t { echo 'args: \$args'; @@ -878,7 +903,7 @@ GET /t --- config location = /t { set $args "foo=1&bar=2"; - proxy_pass http://127.0.0.1:12354; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_1; } --- request @@ -1281,8 +1306,17 @@ location /t { --- response_body Hello world --- shutdown_error_log eval -qr|failed to read a line: closed| +my $expr; + +if ($ENV{TEST_NGINX_USE_HTTP3}) { + $expr = qr|lua close the global Lua VM| +} else { + $expr = qr|failed to read a line: closed| +} + +$expr; --- timeout: 1.2 +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/015-status.t b/src/deps/src/lua-nginx-module/t/015-status.t index a69c59377..aa816c08d 100644 --- a/src/deps/src/lua-nginx-module/t/015-status.t +++ b/src/deps/src/lua-nginx-module/t/015-status.t @@ -233,6 +233,8 @@ GET /t --- error_code: 101 --- no_error_log [error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} +--- no_http2 diff --git a/src/deps/src/lua-nginx-module/t/016-resp-header.t b/src/deps/src/lua-nginx-module/t/016-resp-header.t index 65c5d75a8..6cf699d88 100644 --- a/src/deps/src/lua-nginx-module/t/016-resp-header.t +++ b/src/deps/src/lua-nginx-module/t/016-resp-header.t @@ -65,6 +65,7 @@ GET /read Content-Length: 3 --- response_body chop Hel +--- skip_eval: 3:defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2}) @@ -113,8 +114,16 @@ Hello } --- request GET /read ---- raw_response_headers_like chomp -X-Foo: a\r\n.*?X-Foo: bc\r\n +--- raw_response_headers_like eval +my $headers; + +if (defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2})) { + $headers = qr/x-foo: a\r\n.*?x-foo: bc\r\n/ +} else { + $headers = qr/X-Foo: a\r\n.*?X-Foo: bc\r\n/ +} + +$headers; --- response_body Hello @@ -184,8 +193,16 @@ Hello } --- request GET /read ---- raw_response_headers_like chomp -X-Foo: a\r\n.*?X-Foo: abc\r\n +--- raw_response_headers_like eval +my $headers; + +if (defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2})) { + $headers = "x-foo: a\r\n.*?x-foo: abc\r\n" +} else { + $headers = "X-Foo: a\r\n.*?X-Foo: abc\r\n" +} + +$headers; --- response_body Hello @@ -203,8 +220,17 @@ Hello --- request GET /lua --- raw_response_headers_like eval -".*Foo: a\r -Foo: b.*" +my $headers; + +if (defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2})) { + $headers = ".*foo: a\r +foo: b.*"; +} else { + $headers = ".*Foo: a\r +Foo: b.*"; +} + +$headers; --- response_body @@ -222,8 +248,17 @@ Foo: b.*" --- request GET /lua --- raw_response_headers_like eval -".*Foo: a\r -Foo: b.*" +my $headers; + +if (defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2})) { + $headers = ".*foo: a\r +foo: b.*"; +} else { + $headers = ".*Foo: a\r +Foo: b.*"; +} + +$headers; --- response_body @@ -278,7 +313,7 @@ hello --- error_log attempt to set ngx.header.HEADER after sending out response headers --- no_error_log eval -["alert", "warn"] +["[alert]", "[warn]"] @@ -1071,8 +1106,8 @@ GET /t --- more_headers Foo: bar Bah: baz ---- response_headers -Location: http://localhost:$ServerPort/t/ +--- response_headers_like +Location: https?://localhost:\d+/t/ --- response_body_like: 301 Moved Permanently --- error_code: 301 --- no_error_log @@ -1094,8 +1129,8 @@ GET /t Foo: bar Bah: baz --- response_body_like: 301 Moved Permanently ---- response_headers -Location: http://localhost:$ServerPort/t/ +--- response_headers_like +Location: https?://localhost:\d+/t/ --- error_code: 301 --- no_error_log [error] @@ -1115,8 +1150,8 @@ GET /t --- more_headers Foo: bar Bah: baz ---- response_headers -Location: http://localhost:$ServerPort/t/ +--- response_headers_like +Location: https?://localhost:\d+/t/ Foo: /t/ --- response_body_like: 301 Moved Permanently --- error_code: 301 @@ -1139,8 +1174,8 @@ GET /t --- more_headers Foo: bar Bah: baz ---- response_headers -Location: http://localhost:$ServerPort/t/ +--- response_headers_like +Location: https?://localhost:\d+/t/ Foo: /t/ --- response_body_like: 301 Moved Permanently --- error_code: 301 @@ -1159,8 +1194,16 @@ Foo: /t/ } --- request GET /lua ---- raw_response_headers_like chop -cache-Control: private +--- raw_response_headers_like eval +my $headers; + +if (defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2})) { + $headers = "cache-control: private" +} else { + $headers = "cache-Control: private" +} + +$headers; --- response_body Cache-Control: private @@ -1509,6 +1552,7 @@ hi --- error_log my Transfer-Encoding: chunked my transfer-encoding: chunked +--- skip_eval: 6:defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2}) @@ -2165,8 +2209,8 @@ upstream prematurely closed connection while sending to client Foo --- request GET /a.txt ---- raw_response_headers_like chomp -Age: \d\r\n +--- raw_response_headers_like eval +qr/^(a|A)ge: \d\r\n/ms --- no_error_log [error] @@ -2196,8 +2240,8 @@ Age: \d\r\n Foo --- request GET /test/a.txt ---- raw_response_headers_like chomp -Age: \d\r\n +--- raw_response_headers_like eval +qr/^(a|A)ge: \d\r\n/ms --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/020-subrequest.t b/src/deps/src/lua-nginx-module/t/020-subrequest.t index 844b64794..c731f1e61 100644 --- a/src/deps/src/lua-nginx-module/t/020-subrequest.t +++ b/src/deps/src/lua-nginx-module/t/020-subrequest.t @@ -1227,6 +1227,8 @@ F(ngx_http_finalize_request) { --- error_code --- no_error_log [error] +--- curl_error eval +qr{(\Qcurl: (52) Empty reply from server\E|\Qcurl: (95) HTTP/3 stream 0 reset by server\E)}ms @@ -1238,7 +1240,7 @@ F(ngx_http_finalize_request) { set $memc_key 'foo'; #set $memc_exptime 300; - memc_pass 127.0.0.1:19112; #$TEST_NGINX_MEMCACHED_PORT; + memc_pass 127.0.0.1:$TEST_NGINX_RAND_PORT_1; #$TEST_NGINX_MEMCACHED_PORT; } location /main { @@ -1251,7 +1253,7 @@ F(ngx_http_finalize_request) { } --- request GET /main ---- tcp_listen: 19112 +--- tcp_listen: $TEST_NGINX_RAND_PORT_1 --- tcp_query_len: 9 --- tcp_reply eval "VALUE foo 0 1024\r\nhello world" @@ -1308,7 +1310,7 @@ upstream prematurely closed connection set $memc_key 'foo'; #set $memc_exptime 300; - memc_pass 127.0.0.1:19112; #$TEST_NGINX_MEMCACHED_PORT; + memc_pass 127.0.0.1:$TEST_NGINX_RAND_PORT_1; #$TEST_NGINX_MEMCACHED_PORT; } location /main { @@ -1321,7 +1323,7 @@ upstream prematurely closed connection } --- request GET /main ---- tcp_listen: 19112 +--- tcp_listen: $TEST_NGINX_RAND_PORT_1 --- tcp_no_close --- tcp_reply eval "VALUE foo 0 1024\r\nhello world" @@ -1381,7 +1383,7 @@ upstream timed out #proxy_read_timeout 100ms; proxy_buffering on; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -1394,7 +1396,7 @@ upstream timed out } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_query_len: 65 --- tcp_reply eval "HTTP/1.0 200 OK\r\nContent-Length: 1024\r\n\r\nhello world" @@ -1441,7 +1443,7 @@ upstream prematurely closed connection proxy_read_timeout 100ms; proxy_buffering on; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -1454,7 +1456,7 @@ upstream prematurely closed connection } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_no_close --- tcp_reply eval "HTTP/1.0 200 OK\r\nContent-Length: 1024\r\n\r\nhello world" @@ -1503,7 +1505,7 @@ upstream timed out #proxy_read_timeout 100ms; proxy_buffering on; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -1516,7 +1518,7 @@ upstream timed out } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_query_len: 65 --- tcp_reply eval "HTTP/1.0 200 OK\r\n\r\nhello world" @@ -1563,7 +1565,7 @@ truncated: false proxy_read_timeout 100ms; proxy_buffering on; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -1576,7 +1578,7 @@ truncated: false } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_no_close --- tcp_reply eval "HTTP/1.0 200 OK\r\n\r\nhello world" @@ -1626,7 +1628,7 @@ upstream timed out #proxy_read_timeout 100ms; proxy_buffering off; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -1639,7 +1641,7 @@ upstream timed out } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_query_len: 65 --- tcp_reply eval "HTTP/1.0 200 OK\r\n\r\nhello world" @@ -1686,7 +1688,7 @@ truncated: false proxy_read_timeout 500ms; proxy_buffering off; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -1699,7 +1701,7 @@ truncated: false } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_no_close --- tcp_reply eval "HTTP/1.0 200 OK\r\n\r\nhello world" @@ -1912,7 +1914,7 @@ a client request body is buffered to a temporary file #proxy_read_timeout 100ms; proxy_http_version 1.1; proxy_buffering on; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -1925,7 +1927,7 @@ a client request body is buffered to a temporary file } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_query_len: 65 --- tcp_reply eval "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\nb\r\nhello world\r" @@ -1975,7 +1977,7 @@ upstream prematurely closed connection #proxy_read_timeout 100ms; proxy_http_version 1.1; proxy_buffering off; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -1988,7 +1990,7 @@ upstream prematurely closed connection } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_query_len: 65 --- tcp_reply eval "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\nb\r\nhello world\r" @@ -2036,7 +2038,7 @@ upstream prematurely closed connection proxy_read_timeout 100ms; proxy_buffering on; proxy_http_version 1.1; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -2049,7 +2051,7 @@ upstream prematurely closed connection } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_no_close --- tcp_reply eval "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\nb\r\nhello world\r" @@ -2098,7 +2100,7 @@ upstream timed out #proxy_read_timeout 100ms; proxy_buffering on; proxy_http_version 1.1; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -2111,7 +2113,7 @@ upstream timed out } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_no_close --- tcp_reply eval "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n0\r\n\r\n" @@ -2156,7 +2158,7 @@ truncated: false #proxy_read_timeout 100ms; proxy_buffering off; proxy_http_version 1.1; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -2169,7 +2171,7 @@ truncated: false } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_no_close --- tcp_reply eval "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n0\r\n\r\n" @@ -2215,7 +2217,7 @@ truncated: false #proxy_read_timeout 100ms; proxy_buffering off; - proxy_pass http://127.0.0.1:19113; + proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2; } location /main { @@ -2228,7 +2230,7 @@ truncated: false } --- request GET /main ---- tcp_listen: 19113 +--- tcp_listen: $TEST_NGINX_RAND_PORT_2 --- tcp_query_len: 65 --- tcp_reply eval "HTTP/1.0 200 OK\r\nContent-Length: 1024\r\n\r\nhello world" @@ -2338,6 +2340,7 @@ hello world nil --- no_error_log [error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} @@ -2622,6 +2625,7 @@ pr: Host: localhost --- no_error_log [error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} @@ -2655,6 +2659,7 @@ pr: Host: localhost --- no_error_log [error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/022-redirect.t b/src/deps/src/lua-nginx-module/t/022-redirect.t index ef80174ca..197c76e1d 100644 --- a/src/deps/src/lua-nginx-module/t/022-redirect.t +++ b/src/deps/src/lua-nginx-module/t/022-redirect.t @@ -122,7 +122,16 @@ GET /read } --- request GET /read ---- raw_response_headers_like: Location: /echo\r\n +--- raw_response_headers_like eval +my $headers; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $headers = "location: /echo\r\n" +} else { + $headers = "Location: /echo\r\n" +} + +$headers; --- response_body_like: 302 Found --- error_code: 302 diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/client-abort.t b/src/deps/src/lua-nginx-module/t/023-rewrite/client-abort.t index 0d6f2b39b..61ada3a1b 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/client-abort.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/client-abort.t @@ -19,7 +19,13 @@ our $StapScript = $t::StapThread::StapScript; repeat_each(2); -plan tests => repeat_each() * (blocks() * 3 - 1); +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + plan(skip_all => "HTTP3 does not support client abort"); +} elsif (defined $ENV{TEST_NGINX_USE_HTTP2}) { + plan(skip_all => "HTTP2 does not support client abort"); +} else { + plan tests => repeat_each() * (blocks() * 3 - 1); +} $ENV{TEST_NGINX_RESOLVER} ||= '8.8.8.8'; $ENV{TEST_NGINX_MEMCACHED_PORT} ||= '11211'; diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/exit.t b/src/deps/src/lua-nginx-module/t/023-rewrite/exit.t index 39ea5cbd6..9add80441 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/exit.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/exit.t @@ -187,6 +187,7 @@ ngx.var.uid = res[1].uid; GET /api?uid=32 --- response_body Logged in 56 +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} @@ -258,6 +259,7 @@ ngx.var.uid = res[1].uid; GET /api?uid=32 --- response_body Logged in 56 +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} @@ -342,6 +344,7 @@ GET /api?uid=32 Logged in 56 --- no_error_log [error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/on-abort.t b/src/deps/src/lua-nginx-module/t/023-rewrite/on-abort.t index 59c5df116..0535732a0 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/on-abort.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/on-abort.t @@ -19,7 +19,13 @@ our $StapScript = $t::StapThread::StapScript; repeat_each(2); -plan tests => repeat_each() * (blocks() * 4 + 15); +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + plan(skip_all => "HTTP3 does not support on_abort"); +} elsif (defined $ENV{TEST_NGINX_USE_HTTP2}) { + plan(skip_all => "HTTP2 does not support on_abort"); +} else { + plan tests => repeat_each() * (blocks() * 4 + 15); +} $ENV{TEST_NGINX_RESOLVER} ||= '8.8.8.8'; $ENV{TEST_NGINX_MEMCACHED_PORT} ||= '11211'; diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/redirect.t b/src/deps/src/lua-nginx-module/t/023-rewrite/redirect.t index 8fa9aa2e7..2b3dccb0c 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/redirect.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/redirect.t @@ -119,7 +119,16 @@ GET /read } --- request GET /read ---- raw_response_headers_like: Location: /foo\r\n +--- raw_response_headers_like eval +my $headers; + +if (defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2})) { + $headers = "location: /foo\r\n" +} else { + $headers = "Location: /foo\r\n" +} + +$headers; --- response_body_like: 302 Found --- error_code: 302 diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/req-body.t b/src/deps/src/lua-nginx-module/t/023-rewrite/req-body.t index 13bdcb251..0c1857384 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/req-body.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/req-body.t @@ -125,6 +125,7 @@ Expect: 100-Continue [alert] [error] http finalize request: 500, "/test?" a:1, c:0 +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/req-socket.t b/src/deps/src/lua-nginx-module/t/023-rewrite/req-socket.t index 929238526..f4dd6f4e1 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/req-socket.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/req-socket.t @@ -1,6 +1,14 @@ # vim:set ft= ts=4 sw=4 et fdm=marker: -use Test::Nginx::Socket::Lua; +our $SkipReason; + +BEGIN { + if ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "http3 does not support ngx.req.socket"; + } +} + +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); repeat_each(2); diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/request_body.t b/src/deps/src/lua-nginx-module/t/023-rewrite/request_body.t index b867d3a82..32c02e151 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/request_body.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/request_body.t @@ -170,3 +170,26 @@ Expect: 100-Continue http finalize request: 500, "/echo_body?" a:1, c:2 http finalize request: 500, "/echo_body?" a:1, c:0 --- log_level: debug +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} + + + +=== TEST 9: test HTTP2 reading request body was disabled +--- config + location /echo_body { + lua_need_request_body on; + rewrite_by_lua_block { + ngx.print(ngx.var.request_body or "nil") + } + content_by_lua 'ngx.exit(ngx.OK)'; + } +--- http2 +--- request eval +"POST /echo_body +hello\x00\x01\x02 +world\x03\x04\xff" +--- more_headers +Content-Length: +--- response_body eval +"nil" +--- no_error_log diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/sleep.t b/src/deps/src/lua-nginx-module/t/023-rewrite/sleep.t index 8d4c2da2e..0135d5e44 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/sleep.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/sleep.t @@ -110,6 +110,7 @@ bad argument #1 to 'sleep' === TEST 5: sleep 0.5 - multi-times +--- quic_max_idle_timeout: 1.0 --- config location /test { rewrite_by_lua ' @@ -135,6 +136,7 @@ lua sleep timer expired: "/test?" === TEST 6: sleep 0.5 - interleaved by ngx.say() - ended by ngx.sleep +--- quic_max_idle_timeout: 2.05 --- config location /test { rewrite_by_lua ' @@ -163,6 +165,7 @@ lua sleep timer expired: "/test?" === TEST 7: sleep 0.5 - interleaved by ngx.say() - not ended by ngx.sleep +--- quic_max_idle_timeout: 0.85 --- config location /test { rewrite_by_lua ' diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/socket-keepalive.t b/src/deps/src/lua-nginx-module/t/023-rewrite/socket-keepalive.t index c943e4461..9ce8d5e29 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/socket-keepalive.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/socket-keepalive.t @@ -176,6 +176,7 @@ received: OK === TEST 3: upstream sockets close prematurely +--- no_http3 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -253,6 +254,7 @@ done === TEST 4: http keepalive +--- no_http3 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -330,6 +332,7 @@ done === TEST 5: lua_socket_keepalive_timeout +--- quic_max_idle_timeout: 1.1 --- config server_tokens off; location /t { @@ -409,6 +412,7 @@ qr/lua tcp socket connection pool size: 30\b/] === TEST 6: lua_socket_pool_size +--- quic_max_idle_timeout: 1.1 --- config server_tokens off; location /t { @@ -489,6 +493,7 @@ qr/lua tcp socket connection pool size: 1\b/] === TEST 7: "lua_socket_keepalive_timeout 0" means unlimited +--- quic_max_idle_timeout: 1.2 --- config server_tokens off; location /t { @@ -571,6 +576,7 @@ lua tcp socket keepalive timeout: unlimited === TEST 8: setkeepalive(timeout) overrides lua_socket_keepalive_timeout +--- quic_max_idle_timeout: 1.1 --- config server_tokens off; location /t { @@ -650,6 +656,7 @@ qr/lua tcp socket connection pool size: 30\b/] === TEST 9: sock:setkeepalive(timeout, size) overrides lua_socket_pool_size +--- quic_max_idle_timeout: 1.1 --- config server_tokens off; location /t { @@ -730,6 +737,7 @@ qr/lua tcp socket connection pool size: 25\b/] === TEST 10: sock:keepalive_timeout(0) means unlimited +--- quic_max_idle_timeout: 1.1 --- config server_tokens off; location /t { diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/tcp-socket-timeout.t b/src/deps/src/lua-nginx-module/t/023-rewrite/tcp-socket-timeout.t index e713bb575..9be808132 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/tcp-socket-timeout.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/tcp-socket-timeout.t @@ -16,6 +16,7 @@ BEGIN { $ENV{MOCKEAGAIN} = 'w'; } + delete($ENV{TEST_NGINX_USE_HTTP2}); $ENV{TEST_NGINX_EVENT_TYPE} = 'poll'; $ENV{MOCKEAGAIN_WRITE_TIMEOUT_PATTERN} = 'get helloworld'; } diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/tcp-socket.t b/src/deps/src/lua-nginx-module/t/023-rewrite/tcp-socket.t index 5258487eb..966365f90 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/tcp-socket.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/tcp-socket.t @@ -86,6 +86,7 @@ failed to receive a line: closed [] close: 1 nil --- no_error_log [error] +--- no_http2 @@ -155,6 +156,7 @@ failed to receive a line: closed [foo] closed --- no_error_log [error] +--- no_http2 @@ -197,6 +199,7 @@ connected: nil failed to send request: closed --- error_log attempt to send data on a closed socket: +--- no_http2 @@ -521,6 +524,7 @@ failed to receive a line: closed close: 1 nil --- no_error_log [error] +--- no_http2 @@ -591,6 +595,7 @@ close: 1 nil " --- no_error_log [error] +--- no_http2 @@ -672,6 +677,7 @@ close: 1 nil " --- no_error_log [error] +--- no_http2 @@ -749,6 +755,7 @@ close: 1 nil " --- no_error_log [error] +--- no_http2 @@ -827,6 +834,7 @@ close: 1 nil " --- no_error_log [error] +--- no_http2 @@ -898,6 +906,7 @@ failed to receive a line: closed [] close: 1 nil --- no_error_log [error] +--- no_http2 @@ -967,6 +976,7 @@ failed to receive a line: closed [] close: 1 nil --- no_error_log [error] +--- no_http2 @@ -1077,6 +1087,7 @@ close: 1 nil " --- no_error_log [error] +--- no_http2 @@ -1521,6 +1532,7 @@ GET /t 2: close: 1 nil --- no_error_log [error] +--- no_http2 @@ -1593,6 +1605,7 @@ failed to receive a line: closed [] close: 1 nil --- no_error_log [error] +--- no_http2 @@ -1654,6 +1667,9 @@ GET /t --- ignore_response --- error_log bad argument #1 to 'send' (bad data type nil found) +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# +--- no_http2 @@ -1715,6 +1731,9 @@ GET /t --- ignore_response --- error_log bad argument #1 to 'send' (bad data type boolean found) +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# +--- no_http2 @@ -1776,6 +1795,9 @@ GET /t --- ignore_response --- error_log bad argument #1 to 'send' (bad data type userdata found) +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# +--- no_http2 @@ -1845,6 +1867,7 @@ subrequest: 200, OK\r " --- no_error_log [error] +--- no_http2 @@ -1916,6 +1939,7 @@ close: 1 nil --- no_error_log [error] --- SKIP +--- no_http2 @@ -1976,6 +2000,7 @@ receive(0): [] close: 1 nil --- no_error_log [error] +--- no_http2 @@ -2036,6 +2061,7 @@ send(""): 0 close: 1 nil --- no_error_log [error] +--- no_http2 @@ -2092,6 +2118,7 @@ qr/runtime error: rewrite_by_lua\(nginx\.conf:\d+\):7: bad request/ --- no_error_log [alert] +--- no_http2 @@ -2151,6 +2178,7 @@ qr/runtime error: rewrite_by_lua\(nginx\.conf:\d+\):14: bad request/ --- no_error_log [alert] +--- no_http2 diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/uthread-exit.t b/src/deps/src/lua-nginx-module/t/023-rewrite/uthread-exit.t index e25f7f8b0..87f850ce8 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/uthread-exit.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/uthread-exit.t @@ -987,6 +987,7 @@ hello in thread after --- no_error_log [error] +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} @@ -1072,6 +1073,7 @@ hello in thread after --- no_error_log [error] +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/023-rewrite/uthread-spawn.t b/src/deps/src/lua-nginx-module/t/023-rewrite/uthread-spawn.t index dccef87da..62d837cff 100644 --- a/src/deps/src/lua-nginx-module/t/023-rewrite/uthread-spawn.t +++ b/src/deps/src/lua-nginx-module/t/023-rewrite/uthread-spawn.t @@ -1120,6 +1120,7 @@ body: hello world)$ --- no_error_log [error] +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/024-access/client-abort.t b/src/deps/src/lua-nginx-module/t/024-access/client-abort.t index 83bf0a4df..e4abb4ebd 100644 --- a/src/deps/src/lua-nginx-module/t/024-access/client-abort.t +++ b/src/deps/src/lua-nginx-module/t/024-access/client-abort.t @@ -1,6 +1,16 @@ # vim:set ft= ts=4 sw=4 et fdm=marker: -use Test::Nginx::Socket::Lua; +our $SkipReason; + +BEGIN { + if ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "http3 does not support ngx.req.socket and lua_check_client_abort"; + } elsif ($ENV{TEST_NGINX_USE_HTTP2}) { + $SkipReason = "http2 does not support ngx.req.socket and lua_check_client_abort"; + } +} + +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); use t::StapThread; our $GCScript = <<_EOC_; diff --git a/src/deps/src/lua-nginx-module/t/024-access/exit.t b/src/deps/src/lua-nginx-module/t/024-access/exit.t index d6d66b8cf..b77778213 100644 --- a/src/deps/src/lua-nginx-module/t/024-access/exit.t +++ b/src/deps/src/lua-nginx-module/t/024-access/exit.t @@ -177,6 +177,7 @@ GET /api?uid=32 --- response_body Logged in 56 --- timeout: 3 +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} @@ -243,6 +244,7 @@ ngx.var.uid = res[1].uid; GET /api?uid=32 --- response_body Logged in 56 +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} @@ -320,6 +322,7 @@ ngx.var.uid = res[1].uid; GET /api?uid=32 --- response_body Logged in 56 +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/024-access/on-abort.t b/src/deps/src/lua-nginx-module/t/024-access/on-abort.t index b9532aea3..70637ba86 100644 --- a/src/deps/src/lua-nginx-module/t/024-access/on-abort.t +++ b/src/deps/src/lua-nginx-module/t/024-access/on-abort.t @@ -19,7 +19,13 @@ our $StapScript = $t::StapThread::StapScript; repeat_each(2); -plan tests => repeat_each() * (blocks() * 4 + 15); +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + plan(skip_all => "HTTP3 does not support on_abort"); +} elsif (defined $ENV{TEST_NGINX_USE_HTTP2}) { + plan(skip_all => "HTTP2 does not support on_abort"); +} else { + plan tests => repeat_each() * (blocks() * 4 + 15); +} $ENV{TEST_NGINX_RESOLVER} ||= '8.8.8.8'; $ENV{TEST_NGINX_MEMCACHED_PORT} ||= '11211'; diff --git a/src/deps/src/lua-nginx-module/t/024-access/redirect.t b/src/deps/src/lua-nginx-module/t/024-access/redirect.t index b45fac718..e8609af06 100644 --- a/src/deps/src/lua-nginx-module/t/024-access/redirect.t +++ b/src/deps/src/lua-nginx-module/t/024-access/redirect.t @@ -119,6 +119,15 @@ GET /read } --- request GET /read ---- raw_response_headers_like: Location: /foo\r\n +--- raw_response_headers_like eval +my $headers; + +if (defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2})) { + $headers = "location: /foo\r\n" +} else { + $headers = "Location: /foo\r\n" +} + +$headers; --- response_body_like: 302 Found --- error_code: 302 diff --git a/src/deps/src/lua-nginx-module/t/024-access/req-body.t b/src/deps/src/lua-nginx-module/t/024-access/req-body.t index 70db85c1c..48caeb900 100644 --- a/src/deps/src/lua-nginx-module/t/024-access/req-body.t +++ b/src/deps/src/lua-nginx-module/t/024-access/req-body.t @@ -122,6 +122,7 @@ Expect: 100-Continue [alert] [error] http finalize request: 500, "/test?" a:1, c:0 +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/024-access/request_body.t b/src/deps/src/lua-nginx-module/t/024-access/request_body.t index fa0319527..0aa12c8b5 100644 --- a/src/deps/src/lua-nginx-module/t/024-access/request_body.t +++ b/src/deps/src/lua-nginx-module/t/024-access/request_body.t @@ -170,3 +170,26 @@ Expect: 100-Continue http finalize request: 500, "/echo_body?" a:1, c:2 http finalize request: 500, "/echo_body?" a:1, c:0 --- log_level: debug +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} + + + +=== TEST 9: test HTTP2 reading request body was disabled +--- config + location /echo_body { + lua_need_request_body on; + access_by_lua_block { + ngx.print(ngx.var.request_body or "nil") + } + content_by_lua 'ngx.exit(ngx.OK)'; + } +--- http2 +--- request eval +"POST /echo_body +hello\x00\x01\x02 +world\x03\x04\xff" +--- more_headers +Content-Length: +--- response_body eval +"nil" +--- no_error_log diff --git a/src/deps/src/lua-nginx-module/t/024-access/sleep.t b/src/deps/src/lua-nginx-module/t/024-access/sleep.t index fc1fc024b..c7aa0b65a 100644 --- a/src/deps/src/lua-nginx-module/t/024-access/sleep.t +++ b/src/deps/src/lua-nginx-module/t/024-access/sleep.t @@ -110,6 +110,7 @@ bad argument #1 to 'sleep' === TEST 5: sleep 0.5 - multi-times +--- quic_max_idle_timeout: 1.0 --- config location /test { access_by_lua ' @@ -135,6 +136,7 @@ lua sleep timer expired: "/test?" === TEST 6: sleep 0.5 - interleaved by ngx.say() - ended by ngx.sleep +--- quic_max_idle_timeout: 2.2 --- config location /test { access_by_lua ' @@ -163,6 +165,7 @@ lua sleep timer expired: "/test?" === TEST 7: sleep 0.5 - interleaved by ngx.say() - not ended by ngx.sleep +--- quic_max_idle_timeout: 0.85 --- config location /test { access_by_lua ' diff --git a/src/deps/src/lua-nginx-module/t/024-access/uthread-exit.t b/src/deps/src/lua-nginx-module/t/024-access/uthread-exit.t index 27572370d..bd165ae70 100644 --- a/src/deps/src/lua-nginx-module/t/024-access/uthread-exit.t +++ b/src/deps/src/lua-nginx-module/t/024-access/uthread-exit.t @@ -880,6 +880,7 @@ after === TEST 11: exit in user thread (entry thread is still pending on reqsock:receive) +--- skip_eval: 5:$ENV{TEST_NGINX_USE_HTTP3} --- config location /lua { access_by_lua ' @@ -973,6 +974,7 @@ after === TEST 12: exit in user thread (entry thread is still pending on ngx.req.read_body) +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} --- config location /lua { client_body_timeout 12000ms; diff --git a/src/deps/src/lua-nginx-module/t/024-access/uthread-spawn.t b/src/deps/src/lua-nginx-module/t/024-access/uthread-spawn.t index bc92ccd32..b31edbcb1 100644 --- a/src/deps/src/lua-nginx-module/t/024-access/uthread-spawn.t +++ b/src/deps/src/lua-nginx-module/t/024-access/uthread-spawn.t @@ -1120,3 +1120,4 @@ body: hello world)$ --- no_error_log [error] +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/025-codecache.t b/src/deps/src/lua-nginx-module/t/025-codecache.t index ebe4f61b7..cd56cf57a 100644 --- a/src/deps/src/lua-nginx-module/t/025-codecache.t +++ b/src/deps/src/lua-nginx-module/t/025-codecache.t @@ -966,6 +966,7 @@ qr/\[alert\] \S+ lua_code_cache is off; this will hurt performance/, === TEST 27: GC issue with the on_abort thread object +curl: (52) Empty reply from server --- config lua_code_cache off; location = /t { @@ -991,6 +992,8 @@ decrementing the reference count for Lua VM: 3 qr/\[alert\] \S+ lua_code_cache is off; this will hurt performance/, "lua close the global Lua VM", ] +--- curl_error eval +qr/curl: \(\d+\) Empty reply from server|curl: \(28\) Operation timed out after \d+ milliseconds with 0 bytes received/ @@ -1720,6 +1723,7 @@ grep me: b } --- config lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location = /proxy { proxy_pass http://backend; @@ -1877,3 +1881,4 @@ qr/log_by_lua\(nginx.conf:\d+\):\d+: hello/, --- log_level: debug --- no_error_log [error] +--- skip_eval: 14:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/026-mysql.t b/src/deps/src/lua-nginx-module/t/026-mysql.t index 569f96fbc..02e14b938 100644 --- a/src/deps/src/lua-nginx-module/t/026-mysql.t +++ b/src/deps/src/lua-nginx-module/t/026-mysql.t @@ -69,6 +69,7 @@ kill status = 200 kill body = \{"errcode":0\}$ --- error_log eval qr{upstream timed out \(\d+: Connection timed out\) while sending query to drizzle upstream} +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/028-req-header.t b/src/deps/src/lua-nginx-module/t/028-req-header.t index 8c8ff83fd..21da3fc1a 100644 --- a/src/deps/src/lua-nginx-module/t/028-req-header.t +++ b/src/deps/src/lua-nginx-module/t/028-req-header.t @@ -59,8 +59,13 @@ lua exceeding request header limit for k, v in pairs(headers) do h[k] = v end - ngx.say("Foo: ", h["Foo"] or "nil") - ngx.say("Bar: ", h["Bar"] or "nil") + if (ngx.req.http_version() == 3 or ngx.req.http_version() == 2) then + ngx.say("Foo: ", h["foo"] or "nil") + ngx.say("Bar: ", h["bar"] or "nil") + else + ngx.say("Foo: ", h["Foo"] or "nil") + ngx.say("Bar: ", h["Bar"] or "nil") + end '; } --- request @@ -127,6 +132,8 @@ Foo: --- response_body eval "a" x 2048 --- timeout: 15 +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} +--- no_http2 @@ -145,6 +152,8 @@ Foo: --- response_body eval "a" x 2048 --- timeout: 15 +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} +--- no_http2 @@ -273,8 +282,13 @@ Content-Type: } --- request GET /bar ---- response_body -Foo: a +--- response_body eval +# Since nginx version 1.23.0, nginx combines same $http_* variable together +$Test::Nginx::Util::NginxVersion >= 1.023000 ? + +"Foo: a, b\n" +: +"Foo: a\n" @@ -480,6 +494,8 @@ for my $k (@k) { --- timeout: 4 --- error_log lua exceeding request header limit 101 > 100 +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} +--- no_http2 @@ -518,20 +534,30 @@ while ($i <= 98) { $s --- response_body eval my @k; + +if (defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2})) { + push @k, "host: localhost\n"; +} my $i = 1; while ($i <= 98) { push @k, "x-$i"; $i++; } -push @k, "connection: close\n"; -push @k, "host: localhost\n"; + +my $found_headers = "found 99 headers\n"; +if (!defined($ENV{TEST_NGINX_USE_HTTP3}) && !defined($ENV{TEST_NGINX_USE_HTTP2})) { + push @k, "connection: close\n"; + push @k, "host: localhost\n"; + $found_headers = "found 100 headers\n"; +} @k = sort @k; for my $k (@k) { if ($k =~ /\d+/) { $k .= ": $&\n"; } } -CORE::join("", @k) . "found 100 headers\n"; + +CORE::join("", @k) . $found_headers; --- timeout: 4 --- no_error_log [error] @@ -571,6 +597,9 @@ while ($i <= 101) { $s --- response_body eval my @k; +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + push @k, "host: localhost\n"; +} my $i = 1; while ($i <= 100) { push @k, "x-$i"; @@ -588,6 +617,8 @@ for my $k (@k) { --- timeout: 4 --- error_log lua exceeding request header limit 103 > 102 +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} +--- no_http2 @@ -623,13 +654,20 @@ while ($i <= 100) { $s --- response_body eval my @k; +if (defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2})) { + push @k, "host: localhost\n"; +} my $i = 1; while ($i <= 100) { push @k, "x-$i"; $i++; } -push @k, "connection: close\n"; -push @k, "host: localhost\n"; + +if (!defined($ENV{TEST_NGINX_USE_HTTP3}) && !defined($ENV{TEST_NGINX_USE_HTTP2})) { + push @k, "connection: close\n"; + push @k, "host: localhost\n"; +} + @k = sort @k; for my $k (@k) { if ($k =~ /\d+/) { @@ -676,13 +714,18 @@ while ($i <= 105) { $s --- response_body eval my @k; +if (defined($ENV{TEST_NGINX_USE_HTTP3}) || defined($ENV{TEST_NGINX_USE_HTTP2})) { + push @k, "host: localhost\n"; +} my $i = 1; while ($i <= 105) { push @k, "x-$i"; $i++; } -push @k, "connection: close\n"; -push @k, "host: localhost\n"; +if (!defined($ENV{TEST_NGINX_USE_HTTP3}) && !defined($ENV{TEST_NGINX_USE_HTTP2})) { + push @k, "connection: close\n"; + push @k, "host: localhost\n"; +} @k = sort @k; for my $k (@k) { if ($k =~ /\d+/) { @@ -825,10 +868,21 @@ hello world Content-Type: application/ocsp-request Test-Header: 1 --- response_body_like eval -qr/Connection: close\r +my $body; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $body = qr/Connection: close\r +test-header: 1\r +\r +$/; +} else { + $body = qr/Connection: close\r Test-Header: 1\r \r -$/ +$/; +} + +$body; --- no_error_log [error] @@ -876,7 +930,36 @@ Foo20: foo20 Foo21: foo21 Foo22: foo22 --- response_body_like eval -qr/Bah: bah\r +my $headers; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $headers = qr/bah: bah\r +test-header: 1\r +foo1: foo1\r +foo2: foo2\r +foo3: foo3\r +foo4: foo4\r +foo5: foo5\r +foo6: foo6\r +foo7: foo7\r +foo8: foo8\r +foo9: foo9\r +foo10: foo10\r +foo11: foo11\r +foo12: foo12\r +foo13: foo13\r +foo14: foo14\r +foo15: foo15\r +foo16: foo16\r +foo17: foo17\r +foo18: foo18\r +foo19: foo19\r +foo20: foo20\r +foo21: foo21\r +foo22: foo22\r +/; +} else { + $headers = qr/Bah: bah\r Test-Header: 1\r Foo1: foo1\r Foo2: foo2\r @@ -900,7 +983,10 @@ Foo19: foo19\r Foo20: foo20\r Foo21: foo21\r Foo22: foo22\r -/ +/; +} + +$headers; @@ -931,11 +1017,21 @@ GET /t --- more_headers My-Foo: bar Bar: baz ---- response_body -Bar: baz +--- response_body eval +my $body; +if ($ENV{TEST_NGINX_USE_HTTP3} || $ENV{TEST_NGINX_USE_HTTP2}) { + $body = "bar: baz +host: localhost +my-foo: bar +"; +} else { + $body = "Bar: baz Connection: close Host: localhost My-Foo: bar +"; +} +$body; @@ -1005,29 +1101,23 @@ for my $i ('a' .. 'r') { } $s --- response_body eval -"GET /back HTTP/1.0\r +my $s = "GET /back HTTP/1.0\r Host: foo\r -Connection: close\r -User-Agent: curl\r -A: a\r -B: b\r -C: c\r -D: d\r -E: e\r -F: f\r -G: g\r -H: h\r -I: i\r -J: j\r -K: k\r -L: l\r -M: m\r -N: n\r -O: o\r -P: p\r -Q: q\r -\r -" +Connection: close\r\n"; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $s .= "user-agent: curl\r\n"; + for my $i ('a' .. 'q') { + $s .= $i . ": " . "$i\r\n" + } +} else { + $s .= "User-Agent: curl\r\n"; + for my $i ('a' .. 'q') { + $s .= uc($i) . ": " . "$i\r\n" + } +} + +$s . "\r\n"; @@ -1058,7 +1148,55 @@ for my $i ('a' .. 'r') { } $s --- response_body eval -"GET /back HTTP/1.0\r +my $body; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $body = "GET /back HTTP/1.0\r +Host: foo\r +Connection: close\r +user-agent: curl\r +a: a\r +b: b\r +c: c\r +d: d\r +e: e\r +f: f\r +g: g\r +h: h\r +i: i\r +j: j\r +k: k\r +l: l\r +m: m\r +n: n\r +o: o\r +p: p\r +q: q\r +foo-1: 1\r +foo-2: 2\r +foo-3: 3\r +foo-4: 4\r +foo-5: 5\r +foo-6: 6\r +foo-7: 7\r +foo-8: 8\r +foo-9: 9\r +foo-10: 10\r +foo-11: 11\r +foo-12: 12\r +foo-13: 13\r +foo-14: 14\r +foo-15: 15\r +foo-16: 16\r +foo-17: 17\r +foo-18: 18\r +foo-19: 19\r +foo-20: 20\r +foo-21: 21\r +\r +"; +} else { + $body = "GET /back HTTP/1.0\r Host: foo\r Connection: close\r User-Agent: curl\r @@ -1101,7 +1239,10 @@ foo-19: 19\r foo-20: 20\r foo-21: 21\r \r -" +"; +} + +$body; @@ -1130,7 +1271,34 @@ for my $i ('a' .. 'r') { } $s --- response_body eval -"GET /back HTTP/1.0\r +my $body; + +if ($ENV{TEST_NGINX_USE_HTTP3}) { + $body = "GET /back HTTP/1.0\r +Host: foo\r +Connection: close\r +user-agent: curl\r +bah: bah\r +a: a\r +b: b\r +c: c\r +d: d\r +e: e\r +f: f\r +g: g\r +h: h\r +i: i\r +j: j\r +k: k\r +l: l\r +m: m\r +n: n\r +o: o\r +p: p\r +\r +" +} else { +$body = "GET /back HTTP/1.0\r Host: foo\r Connection: close\r User-Agent: curl\r @@ -1153,6 +1321,9 @@ O: o\r P: p\r \r " +} + +$body; @@ -1184,7 +1355,55 @@ for my $i ('a' .. 'r') { } $s --- response_body eval -"GET /back HTTP/1.0\r +my $body; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $body = "GET /back HTTP/1.0\r +Host: foo\r +Connection: close\r +user-agent: curl\r +bah: bah\r +a: a\r +b: b\r +c: c\r +d: d\r +e: e\r +f: f\r +g: g\r +h: h\r +i: i\r +j: j\r +k: k\r +l: l\r +m: m\r +n: n\r +o: o\r +p: p\r +foo-1: 1\r +foo-2: 2\r +foo-3: 3\r +foo-4: 4\r +foo-5: 5\r +foo-6: 6\r +foo-7: 7\r +foo-8: 8\r +foo-9: 9\r +foo-10: 10\r +foo-11: 11\r +foo-12: 12\r +foo-13: 13\r +foo-14: 14\r +foo-15: 15\r +foo-16: 16\r +foo-17: 17\r +foo-18: 18\r +foo-19: 19\r +foo-20: 20\r +foo-21: 21\r +\r +"; +} else { + $body = "GET /back HTTP/1.0\r Host: foo\r Connection: close\r User-Agent: curl\r @@ -1228,6 +1447,9 @@ foo-20: 20\r foo-21: 21\r \r " +} + +$body; @@ -1259,11 +1481,23 @@ GET /t --- more_headers My-Foo: bar Bar: baz ---- response_body -Bar: baz +--- response_body eval +my $body; + +if (defined($ENV{TEST_NGINX_USE_HTTP3})|| defined($ENV{TEST_NGINX_USE_HTTP2})) { + $body="bar: baz +host: localhost +my-foo: bar +"; +} else { + $body="Bar: baz Connection: close Host: localhost My-Foo: bar +"; +} + +$body; --- no_error_log [error] @@ -1898,6 +2132,8 @@ found 3 headers. lua exceeding request header limit 4 > 3 --- no_error_log [error] +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} +--- no_http2 @@ -1934,6 +2170,8 @@ found 3 headers. --- no_error_log lua exceeding request header limit [error] +--- skip_eval: 4: $ENV{TEST_NGINX_USE_HTTP3} +--- no_http2 @@ -1972,6 +2210,8 @@ found 3 headers. lua exceeding request header limit 4 > 3 --- no_error_log [error] +--- skip_eval: 4: $ENV{TEST_NGINX_USE_HTTP3} +--- no_http2 @@ -2002,12 +2242,22 @@ while ($i <= 1) { $i++; } $s ---- response_body -found 3 headers. +--- response_body eval +my $body; +if (!defined $ENV{TEST_NGINX_USE_HTTP2}) { + $body = "found 3 headers. +"; +} else { + $body = "found 2 headers. +"; +} + +$body; --- timeout: 4 --- no_error_log lua exceeding request header limit [error] +--- skip_eval: 4: $ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/031-post-args.t b/src/deps/src/lua-nginx-module/t/031-post-args.t index 4659f059f..78805d372 100644 --- a/src/deps/src/lua-nginx-module/t/031-post-args.t +++ b/src/deps/src/lua-nginx-module/t/031-post-args.t @@ -108,6 +108,7 @@ a=3&b=4&c --- request POST /lua --- response_body +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/033-ctx.t b/src/deps/src/lua-nginx-module/t/033-ctx.t index 8fc50aa7a..782a0fab6 100644 --- a/src/deps/src/lua-nginx-module/t/033-ctx.t +++ b/src/deps/src/lua-nginx-module/t/033-ctx.t @@ -278,6 +278,8 @@ GET /t [error] --- error_log ngx.ctx = 32 +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ diff --git a/src/deps/src/lua-nginx-module/t/034-match.t b/src/deps/src/lua-nginx-module/t/034-match.t index 1bf45bce1..fd4d9439e 100644 --- a/src/deps/src/lua-nginx-module/t/034-match.t +++ b/src/deps/src/lua-nginx-module/t/034-match.t @@ -361,8 +361,11 @@ he } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -648,8 +651,12 @@ regex: (?:>[\w\s]*) } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "([0-9]+" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile\(\) failed: missing closing parenthesis in \"\([0-9]+\"\n" +: +"error: pcre_compile\(\) failed: missing \) in \"\([0-9]+\"\n" + --- no_error_log [error] @@ -939,8 +946,11 @@ nil } --- request GET /t ---- response_body_like chop -^error: pcre_exec\(\) failed: -10$ +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] @@ -1050,8 +1060,14 @@ end --- request GET /re ---- response_body -error: pcre_exec() failed: -8 +--- response_body eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"failed to match\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/lua-nginx-module/t/035-gmatch.t b/src/deps/src/lua-nginx-module/t/035-gmatch.t index 0dfeaeaf3..0a4efd2b2 100644 --- a/src/deps/src/lua-nginx-module/t/035-gmatch.t +++ b/src/deps/src/lua-nginx-module/t/035-gmatch.t @@ -698,8 +698,11 @@ not matched! } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -735,8 +738,11 @@ error: pcre_compile() failed: missing ) in "(abc" } --- request GET /t ---- response_body_like chop -error: pcre_exec\(\) failed: -10 +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] @@ -854,8 +860,14 @@ end --- request GET /re ---- response_body -error: pcre_exec() failed: -8 +--- response_body eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"failed to match\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/lua-nginx-module/t/036-sub.t b/src/deps/src/lua-nginx-module/t/036-sub.t index 3e88eba5a..0657ebb2c 100644 --- a/src/deps/src/lua-nginx-module/t/036-sub.t +++ b/src/deps/src/lua-nginx-module/t/036-sub.t @@ -480,8 +480,11 @@ a [b c] [b] [c] [] [] d } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -506,8 +509,11 @@ error: pcre_compile() failed: missing ) in "(abc" } --- request GET /t ---- response_body_like chop -error: pcre_exec\(\) failed: -10 +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] @@ -610,8 +616,14 @@ ngx.say("sub: ", cnt) --- request GET /re ---- response_body -error: pcre_exec() failed: -8 +--- response_body eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"sub: 0\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/lua-nginx-module/t/037-gsub.t b/src/deps/src/lua-nginx-module/t/037-gsub.t index 41f86ac01..a6fe579bd 100644 --- a/src/deps/src/lua-nginx-module/t/037-gsub.t +++ b/src/deps/src/lua-nginx-module/t/037-gsub.t @@ -423,8 +423,11 @@ n: 1 } --- request GET /t ---- response_body_like chop -error: pcre_exec\(\) failed: -10 +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] @@ -531,8 +534,14 @@ ngx.say("gsub: ", cnt) --- request GET /re ---- response_body -error: pcre_exec() failed: -8 +--- response_body eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"gsub: 0\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/lua-nginx-module/t/038-match-o.t b/src/deps/src/lua-nginx-module/t/038-match-o.t index f6ae0103f..cc80244e8 100644 --- a/src/deps/src/lua-nginx-module/t/038-match-o.t +++ b/src/deps/src/lua-nginx-module/t/038-match-o.t @@ -336,8 +336,11 @@ he } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/041-header-filter.t b/src/deps/src/lua-nginx-module/t/041-header-filter.t index be390b325..23fdac02c 100644 --- a/src/deps/src/lua-nginx-module/t/041-header-filter.t +++ b/src/deps/src/lua-nginx-module/t/041-header-filter.t @@ -124,6 +124,8 @@ Hi GET /read --- error_code --- response_body +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -465,6 +467,8 @@ GET /lua failed to run header_filter_by_lua*: header_filter_by_lua(nginx.conf:47):2: Something bad --- no_error_log [alert] +--- curl_error eval +qr/curl: \(56\) Failure when receiving data from the peer|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(52\) Empty reply from server|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -487,6 +491,8 @@ GET /lua failed to run header_filter_by_lua*: unknown reason --- no_error_log [alert] +--- curl_error eval +qr/curl: \(56\) Failure when receiving data from the peer|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(52\) Empty reply from server|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -501,6 +507,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -515,6 +523,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -529,6 +539,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -543,6 +555,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -557,6 +571,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -575,6 +591,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -593,6 +611,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -607,6 +627,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -621,6 +643,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -635,6 +659,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -665,8 +691,10 @@ uri: /blah --- request GET /lua --- ignore_response ---- error_log -API disabled in the context of header_filter_by_lua* +--- error_log eval +qr/API disabled in the context of header_filter_by_lua\*|http3 requests are not supported without content-length header/ms +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -679,8 +707,18 @@ API disabled in the context of header_filter_by_lua* --- request GET /lua --- ignore_response ---- error_log -API disabled in the context of header_filter_by_lua* +--- error_log eval +my $err_log; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $err_log = "http v3 not supported yet"; +} else { + $err_log = "API disabled in the context of header_filter_by_lua*"; +} + +$err_log; +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -695,6 +733,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -709,6 +749,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -756,6 +798,8 @@ stack traceback: in function 'error' in function 'bar' in function 'foo' +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -774,6 +818,8 @@ GET /lua?a=1&b=2 --- ignore_response --- error_log eval qr/failed to load external Lua file ".*?test2\.lua": cannot open .*? No such file or directory/ +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -820,6 +866,8 @@ GET /lua failed to load inlined Lua code: header_filter_by_lua(nginx.conf:41):2: unexpected symbol near ''for end'' --- no_error_log no_such_error +--- curl_error eval +qr/curl: \(56\) Failure when receiving data from the peer/ @@ -849,6 +897,8 @@ GET /lua failed to load inlined Lua code: header_filter_by_lua(nginx.conf:49):2: unexpected symbol near ''for end'' --- no_error_log no_such_error +--- curl_error eval +qr/curl: \(56\) Failure when receiving data from the peer/ @@ -873,3 +923,5 @@ GET /lua failed to load inlined Lua code: header_filter_by_lua(...901234567890123456789012345.conf:1):2: unexpected symbol near ''for end'' --- no_error_log [alert] +--- curl_error eval +qr/curl: \(56\) Failure when receiving data from the peer/ diff --git a/src/deps/src/lua-nginx-module/t/043-shdict.t b/src/deps/src/lua-nginx-module/t/043-shdict.t index b0528e5cc..649683b9f 100644 --- a/src/deps/src/lua-nginx-module/t/043-shdict.t +++ b/src/deps/src/lua-nginx-module/t/043-shdict.t @@ -768,7 +768,7 @@ foo = 10502 dogs:set("bar", 32, 0.001) dogs:set("baz", 32, 0.001) dogs:set("foo", 32, 0.001) - ngx.location.capture("/sleep/0.002") + ngx.location.capture("/sleep/0.003") local res, err, forcible = dogs:add("foo", 10502) ngx.say("add: ", res, " ", err, " ", forcible) ngx.say("foo = ", dogs:get("foo")) @@ -797,7 +797,7 @@ foo = 10502 dogs:set("bar", 32, 0.001) dogs:set("baz", 32, 0.001) dogs:set("foo", "hi", 0.001) - ngx.location.capture("/sleep/0.002") + ngx.location.capture("/sleep/0.003") local res, err, forcible = dogs:add("foo", "hello") ngx.say("add: ", res, " ", err, " ", forcible) ngx.say("foo = ", dogs:get("foo")) @@ -1184,6 +1184,7 @@ nil nil === TEST 45: flush_expires +--- quic_max_idle_timeout: 1.6 --- http_config lua_shared_dict dogs 1m; --- config @@ -1210,6 +1211,7 @@ GET /t === TEST 46: flush_expires with number +--- quic_max_idle_timeout: 1.6 --- http_config lua_shared_dict dogs 1m; --- config @@ -1337,6 +1339,7 @@ GET /t === TEST 51: list all keys in a shdict with expires +--- quic_max_idle_timeout: 1.6 --- http_config lua_shared_dict dogs 1m; --- config @@ -1426,6 +1429,7 @@ GET /t === TEST 55: list all keys in a shdict with all keys expired +--- quic_max_idle_timeout: 1.6 --- http_config lua_shared_dict dogs 1m; --- config diff --git a/src/deps/src/lua-nginx-module/t/044-req-body.t b/src/deps/src/lua-nginx-module/t/044-req-body.t index 2ef7e1d29..f4509e149 100644 --- a/src/deps/src/lua-nginx-module/t/044-req-body.t +++ b/src/deps/src/lua-nginx-module/t/044-req-body.t @@ -7,7 +7,7 @@ log_level('warn'); repeat_each(2); -plan tests => repeat_each() * (blocks() * 4 + 52 ); +plan tests => repeat_each() * (blocks() * 4 + 56); #no_diff(); no_long_string(); @@ -351,9 +351,18 @@ hello, world --- user_files >>> a.txt Will you change this world? ---- raw_response_headers_like -X-Old: \S+/client_body_temp/\d+\r -.*?X-New: \S+/html/a\.txt\r +--- raw_response_headers_like eval +my $headers; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $headers = qr#x-old: \S+/client_body_temp/\d+\r +.*?x-new: \S+/html/a\.txt\r#; +} else { + $headers = qr#X-Old: \S+/client_body_temp/\d+\r +.*?X-New: \S+/html/a\.txt\r#; +} + +$headers; --- response_body Will you change this world? --- no_error_log @@ -390,9 +399,18 @@ hello, world! --- user_files >>> a.txt Will you change this world? ---- raw_response_headers_like -X-Old: \S+/client_body_temp/\d+\r -.*?X-New: \S+/html/a\.txt\r +--- raw_response_headers_like eval +my $headers; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $headers = qr#x-old: \S+/client_body_temp/\d+\r +.*?x-new: \S+/html/a\.txt\r#; +} else { + $headers = qr#X-Old: \S+/client_body_temp/\d+\r +.*?X-New: \S+/html/a\.txt\r#; +} + +$headers; --- response_body Will you change this world? --- no_error_log @@ -898,6 +916,7 @@ body: hell --- no_error_log [error] [alert] +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} @@ -959,6 +978,7 @@ body file: hello [alert] --- error_log a client request body is buffered to a temporary file +--- skip_eval: 5:$ENV{TEST_NGINX_USE_HTTP3} @@ -985,9 +1005,9 @@ a client request body is buffered to a temporary file --- error_code: 500 --- error_log eval qr/lua entry thread aborted: runtime error: content_by_lua\(nginx\.conf:\d+\):2: request body not read yet/ - --- no_error_log [alert] +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} @@ -1017,8 +1037,8 @@ body: hell --- no_error_log [error] [alert] ---- no_error_log a client request body is buffered to a temporary file +--- skip_eval: 5:$ENV{TEST_NGINX_USE_HTTP3} @@ -1241,8 +1261,8 @@ body: hello, my dear friend! --- no_error_log [error] [alert] ---- no_error_log a client request body is buffered to a temporary file +--- skip_eval: 5:$ENV{TEST_NGINX_USE_HTTP3} @@ -1382,8 +1402,8 @@ failed to get req socket: request body already exists --- no_error_log [error] [alert] ---- no_error_log a client request body is buffered to a temporary file +--- skip_eval: 5:$ENV{TEST_NGINX_USE_HTTP3} @@ -1405,6 +1425,7 @@ Expect: 100-Continue [alert] [error] http finalize request: 500, "/test?" a:1, c:0 +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} @@ -1480,13 +1501,22 @@ probe syscall.fcntl { --- stap_out_unlike fcntl\(O_DIRECT\) ---- raw_response_headers_like -.*?X-New: \S+/html/a\.txt\r +--- raw_response_headers_like eval +my $headers; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $headers = qr#.*?x-new: \S+/html/a\.txt\r#; +} else { + $headers = qr#.*?X-New: \S+/html/a\.txt\r#; +} + +$headers; --- response_body Will you change this world? --- no_error_log [error] [alert] +--- skip_eval: 6:$ENV{TEST_NGINX_USE_HTTP3} @@ -1744,3 +1774,23 @@ content length: 5 --- no_error_log [error] [alert] +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} + + + +=== TEST 53: HTTP2 read buffered body was discarded +--- config + location = /test { + content_by_lua_block { + local err = pcall(ngx.req.read_body()) + ngx.say(err) + } + } +--- http2 +--- request +POST /test +hello, world +--- more_headers +Content-Length: +--- error_code: 500 +--- error_log: http2 requests are not supported without content-length header diff --git a/src/deps/src/lua-nginx-module/t/045-ngx-var.t b/src/deps/src/lua-nginx-module/t/045-ngx-var.t index 81fcef645..6fe5590d9 100644 --- a/src/deps/src/lua-nginx-module/t/045-ngx-var.t +++ b/src/deps/src/lua-nginx-module/t/045-ngx-var.t @@ -170,10 +170,22 @@ invalid referer: 1 } --- request GET /t ---- raw_response_headers_like -Proxy-Host: 127.0.0.1\:\d+\r +--- raw_response_headers_like eval +my $headers; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $headers = +qr/proxy-host: 127.0.0.1\:\d+\r +proxy-port: \d+\r +proxy-add-x-forwarded-for: 127.0.0.1\r/; +} else { + $headers = +qr/Proxy-Host: 127.0.0.1\:\d+\r Proxy-Port: \d+\r -Proxy-Add-X-Forwarded-For: 127.0.0.1\r +Proxy-Add-X-Forwarded-For: 127.0.0.1\r/; +} + +$headers; --- response_body hello --- no_error_log @@ -248,19 +260,19 @@ variable "query_string" not changeable } server { # this is the real entry point - listen 8091; + listen $TEST_NGINX_RAND_PORT_1; location / { content_by_lua_block{ - ngx.print("this is backend peer 8091") + ngx.print("this is backend peer $TEST_NGINX_RAND_PORT_1") } } } server { # this is the real entry point - listen 8092; + listen $TEST_NGINX_RAND_PORT_2; location / { content_by_lua_block{ - ngx.print("this is backend peer 8092") + ngx.print("this is backend peer $TEST_NGINX_RAND_PORT_2") } } } @@ -275,6 +287,6 @@ variable "query_string" not changeable proxy_pass http://balancer; } --- pipelined_requests eval -["GET /balancer?port=8091", "GET /balancer?port=8092"] +["GET /balancer?port=\$TEST_NGINX_RAND_PORT_1", "GET /balancer?port=\$TEST_NGINX_RAND_PORT_2"] --- response_body eval -["this is backend peer 8091", "this is backend peer 8092"] +["this is backend peer \$TEST_NGINX_RAND_PORT_1", "this is backend peer \$TEST_NGINX_RAND_PORT_2"] diff --git a/src/deps/src/lua-nginx-module/t/047-match-jit.t b/src/deps/src/lua-nginx-module/t/047-match-jit.t index f53a4083a..9b40a889d 100644 --- a/src/deps/src/lua-nginx-module/t/047-match-jit.t +++ b/src/deps/src/lua-nginx-module/t/047-match-jit.t @@ -32,8 +32,11 @@ __DATA__ GET /re --- response_body 1234 ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -53,8 +56,11 @@ pcre JIT compiling result: 1 GET /re --- response_body not matched! ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -76,9 +82,15 @@ pcre JIT compiling result: 1 1234 --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -101,9 +113,15 @@ qr/pcre JIT compiling result: \d+/ not matched! --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -128,8 +146,11 @@ qr/pcre JIT compiling result: \d+/ } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -170,8 +191,15 @@ end --- request GET /re ---- response_body -error: pcre_exec() failed: -8 +--- response_body eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +# PCRE2_ERROR_MATCHLIMIT (-47) +"error: pcre_exec() failed: -47\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/lua-nginx-module/t/049-gmatch-jit.t b/src/deps/src/lua-nginx-module/t/049-gmatch-jit.t index 5134d526b..b76df35e9 100644 --- a/src/deps/src/lua-nginx-module/t/049-gmatch-jit.t +++ b/src/deps/src/lua-nginx-module/t/049-gmatch-jit.t @@ -34,8 +34,11 @@ __DATA__ --- response_body hello world ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -60,8 +63,11 @@ pcre JIT compiling result: 1 nil nil nil ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -77,8 +83,11 @@ pcre JIT compiling result: 1 GET /re --- response_body done ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -99,8 +108,11 @@ pcre JIT compiling result: 1 GET /re --- response_body hello ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -124,9 +136,15 @@ hello world --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -154,9 +172,15 @@ nil nil --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -175,9 +199,15 @@ qr/pcre JIT compiling result: \d+/ done --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -201,9 +231,15 @@ qr/pcre JIT compiling result: \d+/ hello --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -222,7 +258,10 @@ qr/pcre JIT compiling result: \d+/ } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/050-gmatch-dfa.t b/src/deps/src/lua-nginx-module/t/050-gmatch-dfa.t index d2ac2bc66..4c5f820e4 100644 --- a/src/deps/src/lua-nginx-module/t/050-gmatch-dfa.t +++ b/src/deps/src/lua-nginx-module/t/050-gmatch-dfa.t @@ -214,8 +214,11 @@ hello } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/051-sub-jit.t b/src/deps/src/lua-nginx-module/t/051-sub-jit.t index c8a49c051..7aec7ccb7 100644 --- a/src/deps/src/lua-nginx-module/t/051-sub-jit.t +++ b/src/deps/src/lua-nginx-module/t/051-sub-jit.t @@ -32,8 +32,11 @@ __DATA__ GET /re --- response_body hello, world 5678: 1 ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -53,8 +56,11 @@ pcre JIT compiling result: 1 GET /re --- response_body hello, world: 0 ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -76,9 +82,15 @@ pcre JIT compiling result: 1 hello, world 5678: 1 --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -101,9 +113,15 @@ qr/pcre JIT compiling result: \d+/ hello, world: 0 --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -122,8 +140,11 @@ qr/pcre JIT compiling result: \d+/ } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -143,7 +164,10 @@ error: pcre_compile() failed: missing ) in "(abc" } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/052-sub-dfa.t b/src/deps/src/lua-nginx-module/t/052-sub-dfa.t index 254913b3e..2329c77aa 100644 --- a/src/deps/src/lua-nginx-module/t/052-sub-dfa.t +++ b/src/deps/src/lua-nginx-module/t/052-sub-dfa.t @@ -107,8 +107,11 @@ hello, world: 0 } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -129,8 +132,11 @@ error: pcre_compile() failed: missing ) in "(abc" } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/053-gsub-jit.t b/src/deps/src/lua-nginx-module/t/053-gsub-jit.t index 3efc0a24a..c7c87ee29 100644 --- a/src/deps/src/lua-nginx-module/t/053-gsub-jit.t +++ b/src/deps/src/lua-nginx-module/t/053-gsub-jit.t @@ -32,8 +32,11 @@ __DATA__ GET /re --- response_body hello, world world: 2 ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -53,8 +56,11 @@ pcre JIT compiling result: 1 GET /re --- response_body hello, world: 0 ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -76,9 +82,15 @@ pcre JIT compiling result: 1 hello, world world: 2 --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -101,9 +113,15 @@ qr/pcre JIT compiling result: \d+/ hello, world: 0 --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -122,8 +140,11 @@ qr/pcre JIT compiling result: \d+/ } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -143,7 +164,10 @@ error: pcre_compile() failed: missing ) in "(abc" } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/054-gsub-dfa.t b/src/deps/src/lua-nginx-module/t/054-gsub-dfa.t index 937aa1c42..bd0825d4b 100644 --- a/src/deps/src/lua-nginx-module/t/054-gsub-dfa.t +++ b/src/deps/src/lua-nginx-module/t/054-gsub-dfa.t @@ -107,8 +107,11 @@ hello, world: 0 } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" @@ -126,8 +129,11 @@ error: pcre_compile() failed: missing ) in "(abc" } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/056-flush.t b/src/deps/src/lua-nginx-module/t/056-flush.t index bdd33d4f9..4376b1893 100644 --- a/src/deps/src/lua-nginx-module/t/056-flush.t +++ b/src/deps/src/lua-nginx-module/t/056-flush.t @@ -491,6 +491,7 @@ GET /test === TEST 17: limit_rate +--- quic_max_idle_timeout: 2 --- config location /test { limit_rate 150; @@ -512,10 +513,19 @@ GET /test --- response_body eval "a" x 200 --- error_log eval -[ +my @errlog; +if (defined $ENV{TEST_NGINX_USE_HTTP2}) { + @errlog = [ +qr/lua writes elapsed 0\.[7-9]\d+ sec/, +qr/lua flush requires waiting: buffered 0x[0-9a-f]+, delayed:1/, +]; +} else { + @errlog = [ qr/lua writes elapsed [12](?:\.\d+)? sec/, qr/lua flush requires waiting: buffered 0x[0-9a-f]+, delayed:1/, -] +]; +} +@errlog; --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/057-flush-timeout.t b/src/deps/src/lua-nginx-module/t/057-flush-timeout.t index 1f8cfaadf..8f0b7790a 100644 --- a/src/deps/src/lua-nginx-module/t/057-flush-timeout.t +++ b/src/deps/src/lua-nginx-module/t/057-flush-timeout.t @@ -19,9 +19,14 @@ BEGIN { $ENV{TEST_NGINX_EVENT_TYPE} = 'poll'; $ENV{MOCKEAGAIN_WRITE_TIMEOUT_PATTERN} = 'hello, world'; $ENV{TEST_NGINX_POSTPONE_OUTPUT} = 1; + delete($ENV{TEST_NGINX_USE_HTTP2}); + + if ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "HTTP3 does not support mockeagain"; + } } -use Test::Nginx::Socket::Lua; +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); use t::StapThread; our $GCScript = $t::StapThread::GCScript; diff --git a/src/deps/src/lua-nginx-module/t/058-tcp-socket.t b/src/deps/src/lua-nginx-module/t/058-tcp-socket.t index 6ffb32f58..ef2b05f0d 100644 --- a/src/deps/src/lua-nginx-module/t/058-tcp-socket.t +++ b/src/deps/src/lua-nginx-module/t/058-tcp-socket.t @@ -21,6 +21,7 @@ run_tests(); __DATA__ === TEST 1: sanity +--- no_http2 --- config server_tokens off; location /t { @@ -90,6 +91,7 @@ close: 1 nil === TEST 2: no trailing newline +--- no_http2 --- config server_tokens off; location /t { @@ -253,10 +255,12 @@ second line received: (?:Date|Server): .*? --- no_error_log [error] --- timeout: 10 +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} === TEST 5: connection refused (tcp) +--- no_http2 --- config location /test { content_by_lua ' @@ -327,6 +331,7 @@ lua tcp socket connect timed out, when connecting to 127.0.0.2:12345 === TEST 7: not closed manually +--- no_http2 --- config server_tokens off; location /t { @@ -441,6 +446,7 @@ attempt to send data on a closed socket === TEST 10: explicit *l pattern for receive +--- no_http2 --- config server_tokens off; location /t { @@ -509,6 +515,7 @@ close: 1 nil === TEST 11: *a pattern for receive +--- no_http2 --- config server_tokens off; location /t { @@ -577,6 +584,7 @@ close: 1 nil === TEST 12: mixing *a and *l patterns for receive +--- no_http2 --- config server_tokens off; location /t { @@ -656,6 +664,7 @@ close: 1 nil === TEST 13: receive by chunks +--- no_http2 --- timeout: 5 --- config server_tokens off; @@ -731,6 +740,7 @@ close: 1 nil === TEST 14: receive by chunks (very small buffer) +--- no_http2 --- timeout: 5 --- config server_tokens off; @@ -807,6 +817,7 @@ close: 1 nil === TEST 15: line reading (very small buffer) +--- no_http2 --- config server_tokens off; lua_socket_buffer_size 1; @@ -876,6 +887,7 @@ close: 1 nil === TEST 16: ngx.socket.connect (working) +--- no_http2 --- config server_tokens off; location /t { @@ -982,6 +994,7 @@ qr/connect\(\) failed \(\d+: Connection refused\)/ === TEST 18: receive by chunks (stringified size) +--- no_http2 --- config server_tokens off; location /t { @@ -1056,6 +1069,7 @@ close: 1 nil === TEST 19: cannot survive across request boundary (send) +--- no_http2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -1115,6 +1129,7 @@ received: OK|failed to send request: closed)\$" === TEST 20: cannot survive across request boundary (receive) +--- no_http2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -1190,6 +1205,7 @@ received: OK|failed to receive a line: closed \[nil\])$/ === TEST 21: cannot survive across request boundary (close) +--- no_http2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -1259,6 +1275,7 @@ received: OK|failed to close: closed)$/ === TEST 22: cannot survive across request boundary (connect) +--- no_http2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -1335,6 +1352,7 @@ lua reuse socket upstream ctx === TEST 23: connect again immediately +--- no_http2 --- config server_tokens off; location /t { @@ -1403,6 +1421,7 @@ close: 1 nil === TEST 24: two sockets mix together +--- no_http2 --- config server_tokens off; location /t { @@ -1494,6 +1513,7 @@ GET /t === TEST 25: send tables of string fragments (with integers too) +--- no_http2 --- config server_tokens off; location /t { @@ -1564,6 +1584,7 @@ close: 1 nil === TEST 26: send tables of string fragments (bad type "nil") +--- no_http2 --- config server_tokens off; location /t { @@ -1619,10 +1640,13 @@ GET /t --- ignore_response --- error_log bad argument #1 to 'send' (bad data type nil found) +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# === TEST 27: send tables of string fragments (bad type "boolean") +--- no_http2 --- config server_tokens off; location /t { @@ -1678,10 +1702,13 @@ GET /t --- ignore_response --- error_log bad argument #1 to 'send' (bad data type boolean found) +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# === TEST 28: send tables of string fragments (bad type ngx.null) +--- no_http2 --- config server_tokens off; location /t { @@ -1737,10 +1764,13 @@ GET /t --- ignore_response --- error_log bad argument #1 to 'send' (bad data type userdata found) +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# === TEST 29: cosocket before location capture (tcpsock:send did not clear u->waiting) +--- no_http2 --- config server_tokens off; location /t { @@ -1808,6 +1838,7 @@ subrequest: 200, OK\r === TEST 30: CR in a line +--- no_http2 --- config server_tokens off; location /t { @@ -1877,6 +1908,7 @@ close: nil closed === TEST 31: receive(0) +--- no_http2 --- config server_tokens off; location /t { @@ -1935,6 +1967,7 @@ close: 1 nil === TEST 32: send("") +--- no_http2 --- config server_tokens off; location /t { @@ -2176,6 +2209,7 @@ lua tcp socket read timed out === TEST 37: successful reread after a read time out happen (receive -> receive) +--- no_http2 --- config server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; @@ -2253,6 +2287,7 @@ lua tcp socket read timed out === TEST 38: successful reread after a read time out happen (receive -> receiveuntil) +--- no_http2 --- config server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; @@ -2333,6 +2368,7 @@ lua tcp socket read timed out === TEST 39: successful reread after a read time out happen (receiveuntil -> receiveuntil) +--- no_http2 --- config server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; @@ -2415,6 +2451,7 @@ lua tcp socket read timed out === TEST 40: successful reread after a read time out happen (receiveuntil -> receive) +--- no_http2 --- config server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; @@ -2495,6 +2532,7 @@ lua tcp socket read timed out === TEST 41: receive(0) +--- no_http2 --- config server_tokens off; location /t { @@ -2542,6 +2580,7 @@ close: 1 nil === TEST 42: empty options table +--- no_http2 --- config server_tokens off; location /t { @@ -2580,6 +2619,7 @@ close: 1 nil === TEST 43: u->coctx left over bug +--- no_http2 --- config server_tokens off; location = /t { @@ -2671,6 +2711,7 @@ lua clean up the timer for pending ngx.sleep === TEST 44: bad request tries to connect +--- no_http2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -2725,6 +2766,7 @@ qr/runtime error: content_by_lua\(nginx\.conf:\d+\):7: bad request/ === TEST 45: bad request tries to receive +--- no_http2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -2782,6 +2824,7 @@ qr/runtime error: content_by_lua\(nginx\.conf:\d+\):14: bad request/ === TEST 46: bad request tries to send +--- no_http2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -2839,6 +2882,7 @@ qr/runtime error: content_by_lua\(nginx\.conf:\d+\):14: bad request/ === TEST 47: bad request tries to close +--- no_http2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -2896,6 +2940,7 @@ qr/runtime error: content_by_lua\(nginx\.conf:\d+\):14: bad request/ === TEST 48: bad request tries to set keepalive +--- no_http2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -2953,6 +2998,7 @@ qr/runtime error: content_by_lua\(nginx\.conf:\d+\):14: bad request/ === TEST 49: bad request tries to receiveuntil +--- no_http2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -3084,6 +3130,7 @@ could not cancel === TEST 52: tcp_nodelay on +--- no_http2 --- config tcp_nodelay on; server_tokens off; @@ -3157,6 +3204,7 @@ lua socket tcp_nodelay === TEST 53: tcp_nodelay off +--- no_http2 --- config tcp_nodelay off; server_tokens off; @@ -3348,6 +3396,7 @@ lua tcp socket connect timeout: 100 === TEST 56: reuse cleanup +--- no_http2 --- config server_tokens off; location /t { @@ -3412,6 +3461,7 @@ lua http cleanup reuse === TEST 57: reuse cleanup in ngx.timer (fake_request) +--- no_http2 --- config server_tokens off; location /t { @@ -3495,6 +3545,7 @@ lua http cleanup reuse === TEST 58: free cleanup in ngx.timer (without sock:close) +--- no_http2 --- config server_tokens off; location /t { @@ -3576,6 +3627,7 @@ total_send_bytes: 114 === TEST 59: reuse cleanup in subrequest +--- no_http2 --- config server_tokens off; location /t { @@ -3644,6 +3696,7 @@ lua http cleanup reuse === TEST 60: setkeepalive on socket already shutdown +--- no_http2 --- config location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -3682,6 +3735,7 @@ failed to setkeepalive: closed === TEST 61: options_table is nil +--- no_http2 --- config location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -3788,6 +3842,7 @@ failed to connect: bad port number: 65536 === TEST 64: send boolean and nil +--- no_http2 --- config location /t { set $port $TEST_NGINX_SERVER_PORT; @@ -3850,6 +3905,7 @@ received: truefalsenil === TEST 65: receiveany method in cosocket +--- no_http2 --- config server_tokens off; location = /t { @@ -3942,10 +3998,13 @@ lua tcp socket read any --- config server_tokens off; location = /t { + set $port $TEST_NGINX_RAND_PORT_1; + content_by_lua_block { local sock = ngx.socket.tcp() + local port = ngx.var.port sock:settimeout(500) - assert(sock:connect("127.0.0.1", 7658)) + assert(sock:connect("127.0.0.1", port)) while true do local data, err = sock:receiveany(1024) @@ -3972,7 +4031,7 @@ lua tcp socket read any --- request GET /t ---- tcp_listen: 7658 +--- tcp_listen: $TEST_NGINX_RAND_PORT_1 --- tcp_shutdown: 1 --- tcp_query eval: "send data after read side closed" --- tcp_query_len: 32 @@ -3983,6 +4042,7 @@ GET /t === TEST 67: receiveany with limited, max <= 0 +--- no_http2 --- config location = /t { set $port $TEST_NGINX_SERVER_PORT; @@ -4019,6 +4079,7 @@ GET /t === TEST 68: receiveany with limited, max is larger than data +--- no_http2 --- config server_tokens off; location = /t { @@ -4088,6 +4149,7 @@ lua tcp socket calling receiveany() method to read at most 128 bytes === TEST 69: receiveany with limited, max is smaller than data +--- no_http2 --- config server_tokens off; location = /t { @@ -4162,6 +4224,7 @@ lua tcp socket calling receiveany() method to read at most 7 bytes === TEST 70: send tables of string fragments (with floating point number too) +--- no_http2 --- config server_tokens off; location /t { @@ -4236,6 +4299,7 @@ close: 1 nil === TEST 71: send numbers the maximum number of significant digits is 14 in lua +--- no_http2 --- config server_tokens off; location /t { diff --git a/src/deps/src/lua-nginx-module/t/062-count.t b/src/deps/src/lua-nginx-module/t/062-count.t index ad464ba2d..07605f95b 100644 --- a/src/deps/src/lua-nginx-module/t/062-count.t +++ b/src/deps/src/lua-nginx-module/t/062-count.t @@ -262,6 +262,7 @@ hello world n = 6 --- no_error_log [error] +--- skip_eval: 3: $ENV{TEST_NGINX_USE_HTTP3} @@ -515,6 +516,7 @@ GET /test n = 7 --- no_error_log [error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} @@ -554,6 +556,7 @@ narr = 2 nrec = 3 --- no_error_log [error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} @@ -589,3 +592,4 @@ narr = 2 nrec = 3 --- no_error_log [error] +--- skip_eval: 3: $ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/065-tcp-socket-timeout.t b/src/deps/src/lua-nginx-module/t/065-tcp-socket-timeout.t index 092094a3c..14563f70c 100644 --- a/src/deps/src/lua-nginx-module/t/065-tcp-socket-timeout.t +++ b/src/deps/src/lua-nginx-module/t/065-tcp-socket-timeout.t @@ -16,6 +16,7 @@ BEGIN { $ENV{MOCKEAGAIN} = 'w'; } + delete($ENV{TEST_NGINX_USE_HTTP2}); $ENV{TEST_NGINX_EVENT_TYPE} = 'poll'; $ENV{MOCKEAGAIN_WRITE_TIMEOUT_PATTERN} = 'get helloworld'; } @@ -873,6 +874,7 @@ quitting request now --- no_error_log lua tcp socket write timed out [alert] +--- skip_eval: 4: $ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/066-socket-receiveuntil.t b/src/deps/src/lua-nginx-module/t/066-socket-receiveuntil.t index 1182a536c..43744a372 100644 --- a/src/deps/src/lua-nginx-module/t/066-socket-receiveuntil.t +++ b/src/deps/src/lua-nginx-module/t/066-socket-receiveuntil.t @@ -71,6 +71,7 @@ close: 1 nil === TEST 2: http read lines +--- no_http2 --- config server_tokens off; location /t { @@ -140,6 +141,7 @@ close: 1 nil === TEST 3: http read all the headers in a single run +--- no_http2 --- config server_tokens off; location /t { @@ -208,6 +210,7 @@ close: 1 nil === TEST 4: ambiguous boundary patterns (abcabd) +--- no_http2 --- config server_tokens off; location /t { @@ -279,6 +282,7 @@ close: 1 nil === TEST 5: ambiguous boundary patterns (aa) +--- no_http2 --- config server_tokens off; location /t { @@ -350,6 +354,7 @@ close: 1 nil === TEST 6: ambiguous boundary patterns (aaa) +--- no_http2 --- config server_tokens off; location /t { @@ -421,6 +426,7 @@ close: 1 nil === TEST 7: ambiguous boundary patterns (aaaaad) +--- no_http2 --- config server_tokens off; location /t { @@ -492,6 +498,7 @@ close: 1 nil === TEST 8: ambiguous boundary patterns (aaaaad), small buffer, 2 bytes +--- no_http2 --- config server_tokens off; lua_socket_buffer_size 2; @@ -564,6 +571,7 @@ close: 1 nil === TEST 9: ambiguous boundary patterns (aaaaad), small buffer, 1 byte +--- no_http2 --- config server_tokens off; lua_socket_buffer_size 1; @@ -636,6 +644,7 @@ close: 1 nil === TEST 10: ambiguous boundary patterns (abcabdabcabe) +--- no_http2 --- config server_tokens off; location /t { @@ -707,6 +716,7 @@ close: 1 nil === TEST 11: ambiguous boundary patterns (abcabdabcabe 2) +--- no_http2 --- config server_tokens off; location /t { @@ -778,6 +788,7 @@ close: 1 nil === TEST 12: ambiguous boundary patterns (abcabdabcabe 3) +--- no_http2 --- config server_tokens off; location /t { @@ -849,6 +860,7 @@ close: 1 nil === TEST 13: ambiguous boundary patterns (abcabdabcabe 4) +--- no_http2 --- config server_tokens off; location /t { @@ -920,6 +932,7 @@ close: 1 nil === TEST 14: ambiguous boundary patterns (--abc) +--- no_http2 --- config server_tokens off; location /t { @@ -991,6 +1004,7 @@ close: 1 nil === TEST 15: ambiguous boundary patterns (--abc) +--- no_http2 --- config server_tokens off; location /t { @@ -1066,6 +1080,7 @@ close: 1 nil === TEST 16: ambiguous boundary patterns (--abc), small buffer +--- no_http2 --- config server_tokens off; location /t { @@ -1142,6 +1157,7 @@ close: 1 nil === TEST 17: ambiguous boundary patterns (--abc), small buffer, mixed by other reading calls +--- no_http2 --- config server_tokens off; location /t { @@ -1230,6 +1246,7 @@ close: 1 nil === TEST 18: ambiguous boundary patterns (abcabd), small buffer +--- no_http2 --- config server_tokens off; lua_socket_buffer_size 3; @@ -1327,6 +1344,7 @@ this exposed a memory leak in receiveuntil ok --- no_error_log [error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} @@ -1402,3 +1420,595 @@ close: 1 nil } --- no_error_log [error] + + + +=== TEST 21: ambiguous boundary patterns (--abc), mixed by other reading calls consume boundary +--- config + server_tokens off; + location /t { + set $port $TEST_NGINX_SERVER_PORT; + + content_by_lua_block { + -- collectgarbage("collect") + + local sock = ngx.socket.tcp() + local port = ngx.var.port + + local ok, err = sock:connect("127.0.0.1", port) + if not ok then + ngx.say("failed to connect: ", err) + return + end + + ngx.say("connected: ", ok) + + local req = "GET /foo HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n" + + local bytes, err = sock:send(req) + if not bytes then + ngx.say("failed to send request: ", err) + return + end + ngx.say("request sent: ", bytes) + + local read_headers = sock:receiveuntil("\r\n\r\n") + local headers, err, part = read_headers() + if not headers then + ngx.say("failed to read headers: ", err, " [", part, "]") + end + + local reader = sock:receiveuntil("--abc") + + for i = 1, 5 do + local line, err, part = reader(2) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + break + + else + ngx.say("read: ", line) + end + + local data, err, part = sock:receive(1) + if not data then + ngx.say("failed to read a byte: ", err, " [", part, "]") + break + + else + ngx.say("read one byte: ", data) + end + end + + local line, err, part = reader(2) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + ok, err = sock:close() + ngx.say("close: ", ok, " ", err) + } + } + + location /foo { + echo -- ----abc----abc-; + more_clear_headers Date; + } +--- request +GET /t + +--- response_body eval +qq{connected: 1 +request sent: 57 +read: -- +read one byte: - +read: -a +read one byte: b +read: c- +read one byte: - +read: +read one byte: - +failed to read a line: nil [nil] +failed to read a line: closed [ +] +close: 1 nil +} +--- no_error_log +[error] + + + +=== TEST 22: ambiguous boundary patterns (--abc), mixed by other reading calls (including receiveuntil) consume boundary +--- config + server_tokens off; + location /t { + set $port $TEST_NGINX_SERVER_PORT; + + content_by_lua_block { + -- collectgarbage("collect") + + local sock = ngx.socket.tcp() + local port = ngx.var.port + + local ok, err = sock:connect("127.0.0.1", port) + if not ok then + ngx.say("failed to connect: ", err) + return + end + + ngx.say("connected: ", ok) + + local req = "GET /foo HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n" + + local bytes, err = sock:send(req) + if not bytes then + ngx.say("failed to send request: ", err) + return + end + ngx.say("request sent: ", bytes) + + local read_headers = sock:receiveuntil("\r\n\r\n") + local headers, err, part = read_headers() + if not headers then + ngx.say("failed to read headers: ", err, " [", part, "]") + end + + local reader1 = sock:receiveuntil("--abc") + local reader2 = sock:receiveuntil("-ab") + + local line, err, part = reader1(2) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + local data, err, part = sock:receive(1) + if not data then + ngx.say("failed to read a byte: ", err, " [", part, "]") + + else + ngx.say("read one byte: ", data) + end + + local line, err, part = reader1(1) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + local line, err, part = reader2(2) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + local line, err, part = reader1() + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + local line, err, part = reader1() + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + ok, err = sock:close() + ngx.say("close: ", ok, " ", err) + } + } + + location /foo { + echo -- ------abd----abc; + more_clear_headers Date; + } +--- request +GET /t + +--- response_body eval +qq{connected: 1 +request sent: 57 +read: -- +read one byte: - +read: - +read: - +read: d-- +failed to read a line: closed [ +] +close: 1 nil +} +--- no_error_log +[error] + + + +=== TEST 23: ambiguous boundary patterns (--abc), mixed by other reading calls consume boundary, small buffer +--- config + lua_socket_buffer_size 3; + server_tokens off; + location /t { + set $port $TEST_NGINX_SERVER_PORT; + + content_by_lua_block { + -- collectgarbage("collect") + + local sock = ngx.socket.tcp() + local port = ngx.var.port + + local ok, err = sock:connect("127.0.0.1", port) + if not ok then + ngx.say("failed to connect: ", err) + return + end + + ngx.say("connected: ", ok) + + local req = "GET /foo HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n" + + local bytes, err = sock:send(req) + if not bytes then + ngx.say("failed to send request: ", err) + return + end + ngx.say("request sent: ", bytes) + + local read_headers = sock:receiveuntil("\r\n\r\n") + local headers, err, part = read_headers() + if not headers then + ngx.say("failed to read headers: ", err, " [", part, "]") + end + + local reader = sock:receiveuntil("--abc") + + for i = 1, 5 do + local line, err, part = reader(2) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + break + + else + ngx.say("read: ", line) + end + + local data, err, part = sock:receive(1) + if not data then + ngx.say("failed to read a byte: ", err, " [", part, "]") + break + + else + ngx.say("read one byte: ", data) + end + end + + local line, err, part = reader(2) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + ok, err = sock:close() + ngx.say("close: ", ok, " ", err) + } + } + + location /foo { + echo -- ----abc----abc-; + more_clear_headers Date; + } +--- request +GET /t + +--- response_body eval +qq{connected: 1 +request sent: 57 +read: -- +read one byte: - +read: -a +read one byte: b +read: c- +read one byte: - +read: +read one byte: - +failed to read a line: nil [nil] +failed to read a line: closed [ +] +close: 1 nil +} +--- no_error_log +[error] + + + +=== TEST 24: ambiguous boundary patterns (--abc), mixed by other reading calls (including receiveuntil) consume boundary, small buffer +--- config + lua_socket_buffer_size 3; + server_tokens off; + location /t { + set $port $TEST_NGINX_SERVER_PORT; + + content_by_lua_block { + -- collectgarbage("collect") + + local sock = ngx.socket.tcp() + local port = ngx.var.port + + local ok, err = sock:connect("127.0.0.1", port) + if not ok then + ngx.say("failed to connect: ", err) + return + end + + ngx.say("connected: ", ok) + + local req = "GET /foo HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n" + + local bytes, err = sock:send(req) + if not bytes then + ngx.say("failed to send request: ", err) + return + end + ngx.say("request sent: ", bytes) + + local read_headers = sock:receiveuntil("\r\n\r\n") + local headers, err, part = read_headers() + if not headers then + ngx.say("failed to read headers: ", err, " [", part, "]") + end + + local reader1 = sock:receiveuntil("--abc") + local reader2 = sock:receiveuntil("-ab") + + local line, err, part = reader1(2) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + local data, err, part = sock:receive(1) + if not data then + ngx.say("failed to read a byte: ", err, " [", part, "]") + + else + ngx.say("read one byte: ", data) + end + + local line, err, part = reader1(1) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + local line, err, part = reader2(2) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + local line, err, part = reader1() + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + local line, err, part = reader1() + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + + ok, err = sock:close() + ngx.say("close: ", ok, " ", err) + } + } + + location /foo { + echo -- ------abd----abc; + more_clear_headers Date; + } +--- request +GET /t + +--- response_body eval +qq{connected: 1 +request sent: 57 +read: -- +read one byte: - +read: - +read: - +read: d-- +failed to read a line: closed [ +] +close: 1 nil +} +--- no_error_log +[error] + + + +=== TEST 25: ambiguous boundary patterns (ab1ab2), ends half way +--- config + server_tokens off; + location /t { + set $port $TEST_NGINX_SERVER_PORT; + + content_by_lua_block { + -- collectgarbage("collect") + + local sock = ngx.socket.tcp() + local port = ngx.var.port + + local ok, err = sock:connect("127.0.0.1", port) + if not ok then + ngx.say("failed to connect: ", err) + return + end + + ngx.say("connected: ", ok) + + local req = "GET /foo HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n" + + local bytes, err = sock:send(req) + if not bytes then + ngx.say("failed to send request: ", err) + return + end + ngx.say("request sent: ", bytes) + + local read_headers = sock:receiveuntil("\r\n\r\n") + local headers, err, part = read_headers() + if not headers then + ngx.say("failed to read headers: ", err, " [", part, "]") + end + + if true then + local reader = sock:receiveuntil("ab1ab2") + + local line, err, part = reader(2) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + end + + collectgarbage("collect") + + local data, err, part = sock:receive(3) + if not data then + ngx.say("failed to read three bytes: ", err, " [", part, "]") + + else + ngx.say("read three bytes: ", data) + end + + ok, err = sock:close() + ngx.say("close: ", ok, " ", err) + } + } + + location /foo { + echo -- ab1ab1; + more_clear_headers Date; + } +--- request +GET /t + +--- response_body eval +qq{connected: 1 +request sent: 57 +read: ab1 +read three bytes: ab1 +close: 1 nil +} +--- no_error_log +[error] + + + +=== TEST 26: ambiguous boundary patterns (ab1ab2), ends half way, small buffer +--- config + lua_socket_buffer_size 3; + server_tokens off; + location /t { + set $port $TEST_NGINX_SERVER_PORT; + + content_by_lua_block { + -- collectgarbage("collect") + + local sock = ngx.socket.tcp() + local port = ngx.var.port + + local ok, err = sock:connect("127.0.0.1", port) + if not ok then + ngx.say("failed to connect: ", err) + return + end + + ngx.say("connected: ", ok) + + local req = "GET /foo HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n" + + local bytes, err = sock:send(req) + if not bytes then + ngx.say("failed to send request: ", err) + return + end + ngx.say("request sent: ", bytes) + + local read_headers = sock:receiveuntil("\r\n\r\n") + local headers, err, part = read_headers() + if not headers then + ngx.say("failed to read headers: ", err, " [", part, "]") + end + + if true then + local reader = sock:receiveuntil("ab1ab2") + + local line, err, part = reader(2) + if not line then + ngx.say("failed to read a line: ", err, " [", part, "]") + + else + ngx.say("read: ", line) + end + end + + collectgarbage("collect") + + local data, err, part = sock:receive(3) + if not data then + ngx.say("failed to read three bytes: ", err, " [", part, "]") + + else + ngx.say("read three bytes: ", data) + end + + ok, err = sock:close() + ngx.say("close: ", ok, " ", err) + } + } + + location /foo { + echo -- ab1ab1; + more_clear_headers Date; + } +--- request +GET /t + +--- response_body eval +qq{connected: 1 +request sent: 57 +read: ab1 +read three bytes: ab1 +close: 1 nil +} +--- no_error_log +[error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/067-req-socket.t b/src/deps/src/lua-nginx-module/t/067-req-socket.t index c5b2631e5..9aff58b64 100644 --- a/src/deps/src/lua-nginx-module/t/067-req-socket.t +++ b/src/deps/src/lua-nginx-module/t/067-req-socket.t @@ -1,6 +1,16 @@ # vim:set ft= ts=4 sw=4 et fdm=marker: -use Test::Nginx::Socket::Lua; +our $SkipReason; + +BEGIN { + if ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "http3 does not support ngx.req.socket"; + } elsif ($ENV{TEST_NGINX_USE_HTTP2}) { + $SkipReason = "http2 does not support ngx.req.socket"; + } +} + +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); repeat_each(2); diff --git a/src/deps/src/lua-nginx-module/t/068-socket-keepalive.t b/src/deps/src/lua-nginx-module/t/068-socket-keepalive.t index cf8bc25ac..5ca94e4b7 100644 --- a/src/deps/src/lua-nginx-module/t/068-socket-keepalive.t +++ b/src/deps/src/lua-nginx-module/t/068-socket-keepalive.t @@ -168,6 +168,7 @@ received: OK === TEST 3: upstream sockets close prematurely +--- no_http3 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -243,6 +244,7 @@ done === TEST 4: http keepalive +--- quic_max_idle_timeout: 1.2 --- http_config eval "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" --- config @@ -318,6 +320,7 @@ done === TEST 5: lua_socket_keepalive_timeout +--- quic_max_idle_timeout: 1.2 --- config server_tokens off; location /t { @@ -395,6 +398,7 @@ qr/lua tcp socket connection pool size: 30\b/] === TEST 6: lua_socket_pool_size +--- quic_max_idle_timeout: 1.2 --- config server_tokens off; location /t { @@ -473,6 +477,7 @@ qr/lua tcp socket connection pool size: 1\b/] === TEST 7: "lua_socket_keepalive_timeout 0" means unlimited +--- quic_max_idle_timeout: 1.2 --- config server_tokens off; location /t { @@ -548,6 +553,7 @@ qr/lua tcp socket connection pool size: 30\b/] === TEST 8: setkeepalive(timeout) overrides lua_socket_keepalive_timeout +--- quic_max_idle_timeout: 1.2 --- config server_tokens off; location /t { @@ -625,6 +631,7 @@ qr/lua tcp socket connection pool size: 30\b/] === TEST 9: sock:setkeepalive(timeout, size) overrides lua_socket_pool_size +--- quic_max_idle_timeout: 1.2 --- config server_tokens off; location /t { @@ -731,6 +738,7 @@ bad argument #3 to '?' (bad "pool_size" option value: 0) === TEST 11: sock:keepalive_timeout(0) means unlimited +--- quic_max_idle_timeout: 1.2 --- config server_tokens off; location /t { @@ -1508,6 +1516,7 @@ done === TEST 25: setkeepalive() with explicit nil args +--- quic_max_idle_timeout: 1.2 --- config server_tokens off; location /t { @@ -1919,6 +1928,7 @@ too many waiting connect operations === TEST 32: conn queuing: once 'pool_size' is reached and pool has 'backlog' +--- quic_max_idle_timeout: 1.2 --- config location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -2536,6 +2546,8 @@ GET /t --- abort --- no_error_log [error] +--- curl_error eval +qr/curl: \(28\) Operation timed out after \d+ milliseconds with 0 bytes received/ @@ -2643,6 +2655,7 @@ lua tcp socket connect timed out, when connecting to === TEST 46: conn queuing: resume connect operation if resumed connect failed (could not be resolved) +--- quic_max_idle_timeout: 1.2 --- config resolver 127.0.0.2:12345 ipv6=off; resolver_timeout 1s; diff --git a/src/deps/src/lua-nginx-module/t/075-logby.t b/src/deps/src/lua-nginx-module/t/075-logby.t index 8eece698e..3e9743584 100644 --- a/src/deps/src/lua-nginx-module/t/075-logby.t +++ b/src/deps/src/lua-nginx-module/t/075-logby.t @@ -444,6 +444,7 @@ GET /lua ok --- error_log API disabled in the context of log_by_lua* +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} @@ -457,8 +458,16 @@ API disabled in the context of log_by_lua* GET /lua --- response_body ok ---- error_log -API disabled in the context of log_by_lua* +--- error_log eval +my $err_log; + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $err_log = "http v3 not supported yet"; +} else { + $err_log = "API disabled in the context of log_by_lua*"; +} + +$err_log; diff --git a/src/deps/src/lua-nginx-module/t/077-sleep.t b/src/deps/src/lua-nginx-module/t/077-sleep.t index 96f04bd98..4867b9ca7 100644 --- a/src/deps/src/lua-nginx-module/t/077-sleep.t +++ b/src/deps/src/lua-nginx-module/t/077-sleep.t @@ -105,6 +105,7 @@ bad argument #1 to 'sleep' === TEST 5: sleep 0.33 - multi-times in content +--- quic_max_idle_timeout: 1.1 --- config location /test { content_by_lua ' @@ -129,6 +130,7 @@ lua sleep timer expired: "/test?" === TEST 6: sleep 0.5 - interleaved by ngx.say() - ended by ngx.sleep +--- quic_max_idle_timeout: 2.2 --- config location /test { content_by_lua ' @@ -156,6 +158,7 @@ lua sleep timer expired: "/test?" === TEST 7: sleep 0.5 - interleaved by ngx.say() - not ended by ngx.sleep +--- quic_max_idle_timeout: 0.9 --- config location /test { content_by_lua ' diff --git a/src/deps/src/lua-nginx-module/t/082-body-filter-2.t b/src/deps/src/lua-nginx-module/t/082-body-filter-2.t index eafe7cf26..ffccad28a 100644 --- a/src/deps/src/lua-nginx-module/t/082-body-filter-2.t +++ b/src/deps/src/lua-nginx-module/t/082-body-filter-2.t @@ -6,10 +6,21 @@ BEGIN { if ($ENV{TEST_NGINX_EVENT_TYPE} && $ENV{TEST_NGINX_EVENT_TYPE} ne 'poll') { $SkipReason = "unavailable for the event type '$ENV{TEST_NGINX_EVENT_TYPE}'"; + } elsif ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "http3 does not support mockeagain"; + + } elsif ($ENV{TEST_NGINX_USE_HTTP2}) { + $SkipReason = "http2 does not support mockeagain"; + } else { - $ENV{TEST_NGINX_POSTPONE_OUTPUT} = 1; - $ENV{TEST_NGINX_EVENT_TYPE} = 'poll'; - $ENV{MOCKEAGAIN}='w' + if ($ENV{LD_PRELOAD} && $ENV{LD_PRELOAD} =~ /\bmockeagain\.so\b/) { + $ENV{TEST_NGINX_POSTPONE_OUTPUT} = 1; + $ENV{TEST_NGINX_EVENT_TYPE} = 'poll'; + $ENV{MOCKEAGAIN}='w' + } else { + $SkipReason = "'mockeagain.so' does not appear to be preloaded " + . "with 'LD_PRELOAD'"; + } } } @@ -60,3 +71,157 @@ waiting body filter busy buffer to be sent lua say response has busy bufs --- no_error_log [error] + + + +=== TEST 2: arg[1] not change and say long string +--- config + location /t { + header_filter_by_lua_block {ngx.header.content_length = nil} + body_filter_by_lua_block { + local function anyting_not_change_arg1() + return + end + anyting_not_change_arg1() + } + content_by_lua_block { + for i = 1, 100 do + ngx.say("12345678901234567890") + end + } + } +--- request +GET /t +--- response_body eval +("12345678901234567890\n" x 100) +--- no_error_log +[error] +[alert] +[crit] + + + +=== TEST 3: arg[1] not change and chunked_transfer_encoding off +--- config + location /t { + header_filter_by_lua_block {ngx.header.content_length = nil} + body_filter_by_lua_block { + local function anyting_not_change_arg1() + return + end + anyting_not_change_arg1() + } + chunked_transfer_encoding off; + content_by_lua_block { + for i = 1, 100 do + ngx.say("12345678901234567890123456789012345678901234567890".."_"..tostring(i/3)) + end + } + } +--- request +GET /t +--- response_body +12345678901234567890123456789012345678901234567890_0.33333333333333 +12345678901234567890123456789012345678901234567890_0.66666666666667 +12345678901234567890123456789012345678901234567890_1 +12345678901234567890123456789012345678901234567890_1.3333333333333 +12345678901234567890123456789012345678901234567890_1.6666666666667 +12345678901234567890123456789012345678901234567890_2 +12345678901234567890123456789012345678901234567890_2.3333333333333 +12345678901234567890123456789012345678901234567890_2.6666666666667 +12345678901234567890123456789012345678901234567890_3 +12345678901234567890123456789012345678901234567890_3.3333333333333 +12345678901234567890123456789012345678901234567890_3.6666666666667 +12345678901234567890123456789012345678901234567890_4 +12345678901234567890123456789012345678901234567890_4.3333333333333 +12345678901234567890123456789012345678901234567890_4.6666666666667 +12345678901234567890123456789012345678901234567890_5 +12345678901234567890123456789012345678901234567890_5.3333333333333 +12345678901234567890123456789012345678901234567890_5.6666666666667 +12345678901234567890123456789012345678901234567890_6 +12345678901234567890123456789012345678901234567890_6.3333333333333 +12345678901234567890123456789012345678901234567890_6.6666666666667 +12345678901234567890123456789012345678901234567890_7 +12345678901234567890123456789012345678901234567890_7.3333333333333 +12345678901234567890123456789012345678901234567890_7.6666666666667 +12345678901234567890123456789012345678901234567890_8 +12345678901234567890123456789012345678901234567890_8.3333333333333 +12345678901234567890123456789012345678901234567890_8.6666666666667 +12345678901234567890123456789012345678901234567890_9 +12345678901234567890123456789012345678901234567890_9.3333333333333 +12345678901234567890123456789012345678901234567890_9.6666666666667 +12345678901234567890123456789012345678901234567890_10 +12345678901234567890123456789012345678901234567890_10.333333333333 +12345678901234567890123456789012345678901234567890_10.666666666667 +12345678901234567890123456789012345678901234567890_11 +12345678901234567890123456789012345678901234567890_11.333333333333 +12345678901234567890123456789012345678901234567890_11.666666666667 +12345678901234567890123456789012345678901234567890_12 +12345678901234567890123456789012345678901234567890_12.333333333333 +12345678901234567890123456789012345678901234567890_12.666666666667 +12345678901234567890123456789012345678901234567890_13 +12345678901234567890123456789012345678901234567890_13.333333333333 +12345678901234567890123456789012345678901234567890_13.666666666667 +12345678901234567890123456789012345678901234567890_14 +12345678901234567890123456789012345678901234567890_14.333333333333 +12345678901234567890123456789012345678901234567890_14.666666666667 +12345678901234567890123456789012345678901234567890_15 +12345678901234567890123456789012345678901234567890_15.333333333333 +12345678901234567890123456789012345678901234567890_15.666666666667 +12345678901234567890123456789012345678901234567890_16 +12345678901234567890123456789012345678901234567890_16.333333333333 +12345678901234567890123456789012345678901234567890_16.666666666667 +12345678901234567890123456789012345678901234567890_17 +12345678901234567890123456789012345678901234567890_17.333333333333 +12345678901234567890123456789012345678901234567890_17.666666666667 +12345678901234567890123456789012345678901234567890_18 +12345678901234567890123456789012345678901234567890_18.333333333333 +12345678901234567890123456789012345678901234567890_18.666666666667 +12345678901234567890123456789012345678901234567890_19 +12345678901234567890123456789012345678901234567890_19.333333333333 +12345678901234567890123456789012345678901234567890_19.666666666667 +12345678901234567890123456789012345678901234567890_20 +12345678901234567890123456789012345678901234567890_20.333333333333 +12345678901234567890123456789012345678901234567890_20.666666666667 +12345678901234567890123456789012345678901234567890_21 +12345678901234567890123456789012345678901234567890_21.333333333333 +12345678901234567890123456789012345678901234567890_21.666666666667 +12345678901234567890123456789012345678901234567890_22 +12345678901234567890123456789012345678901234567890_22.333333333333 +12345678901234567890123456789012345678901234567890_22.666666666667 +12345678901234567890123456789012345678901234567890_23 +12345678901234567890123456789012345678901234567890_23.333333333333 +12345678901234567890123456789012345678901234567890_23.666666666667 +12345678901234567890123456789012345678901234567890_24 +12345678901234567890123456789012345678901234567890_24.333333333333 +12345678901234567890123456789012345678901234567890_24.666666666667 +12345678901234567890123456789012345678901234567890_25 +12345678901234567890123456789012345678901234567890_25.333333333333 +12345678901234567890123456789012345678901234567890_25.666666666667 +12345678901234567890123456789012345678901234567890_26 +12345678901234567890123456789012345678901234567890_26.333333333333 +12345678901234567890123456789012345678901234567890_26.666666666667 +12345678901234567890123456789012345678901234567890_27 +12345678901234567890123456789012345678901234567890_27.333333333333 +12345678901234567890123456789012345678901234567890_27.666666666667 +12345678901234567890123456789012345678901234567890_28 +12345678901234567890123456789012345678901234567890_28.333333333333 +12345678901234567890123456789012345678901234567890_28.666666666667 +12345678901234567890123456789012345678901234567890_29 +12345678901234567890123456789012345678901234567890_29.333333333333 +12345678901234567890123456789012345678901234567890_29.666666666667 +12345678901234567890123456789012345678901234567890_30 +12345678901234567890123456789012345678901234567890_30.333333333333 +12345678901234567890123456789012345678901234567890_30.666666666667 +12345678901234567890123456789012345678901234567890_31 +12345678901234567890123456789012345678901234567890_31.333333333333 +12345678901234567890123456789012345678901234567890_31.666666666667 +12345678901234567890123456789012345678901234567890_32 +12345678901234567890123456789012345678901234567890_32.333333333333 +12345678901234567890123456789012345678901234567890_32.666666666667 +12345678901234567890123456789012345678901234567890_33 +12345678901234567890123456789012345678901234567890_33.333333333333 +--- no_error_log +[error] +[alert] +[crit] diff --git a/src/deps/src/lua-nginx-module/t/082-body-filter.t b/src/deps/src/lua-nginx-module/t/082-body-filter.t index a69c78fa7..4033bac8c 100644 --- a/src/deps/src/lua-nginx-module/t/082-body-filter.t +++ b/src/deps/src/lua-nginx-module/t/082-body-filter.t @@ -482,6 +482,8 @@ stack traceback: in function 'error' in function 'bar' in function 'foo' +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP\/3 stream 0 reset by server# @@ -524,6 +526,8 @@ GET /lua?a=1&b=2 --- ignore_response --- error_log eval qr/failed to load external Lua file ".*?test2\.lua": cannot open .*? No such file or directory/ +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP\/3 stream 0 reset by server# @@ -838,6 +842,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of body_filter_by_lua* +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP\/3 stream 0 reset by server# @@ -860,6 +866,8 @@ failed to load inlined Lua code: body_filter_by_lua(nginx.conf:41):2: unexpected --- no_error_log no_such_error1 no_such_error2 +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP\/3 stream 0 reset by server# @@ -890,3 +898,5 @@ failed to load inlined Lua code: body_filter_by_lua(nginx.conf:49):2: unexpected --- no_error_log no_such_error1 no_such_error2 +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP\/3 stream 0 reset by server# diff --git a/src/deps/src/lua-nginx-module/t/083-bad-sock-self.t b/src/deps/src/lua-nginx-module/t/083-bad-sock-self.t index 7a76752d9..206de8b99 100644 --- a/src/deps/src/lua-nginx-module/t/083-bad-sock-self.t +++ b/src/deps/src/lua-nginx-module/t/083-bad-sock-self.t @@ -33,6 +33,7 @@ __DATA__ --- error_code: 500 --- error_log bad argument #1 to 'receive' (table expected, got string) +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} @@ -51,6 +52,7 @@ bad argument #1 to 'receive' (table expected, got string) --- error_code: 500 --- error_log bad argument #1 to 'receiveuntil' (table expected, got number) +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/084-inclusive-receiveuntil.t b/src/deps/src/lua-nginx-module/t/084-inclusive-receiveuntil.t index eb5aa1ecd..60f8363f9 100644 --- a/src/deps/src/lua-nginx-module/t/084-inclusive-receiveuntil.t +++ b/src/deps/src/lua-nginx-module/t/084-inclusive-receiveuntil.t @@ -19,6 +19,7 @@ run_tests(); __DATA__ === TEST 1: ambiguous boundary patterns (abcabd) - inclusive mode +--- no_http2 --- config server_tokens off; location /t { @@ -91,6 +92,7 @@ close: 1 nil === TEST 2: ambiguous boundary patterns (abcabdabcabe 4) - inclusive mode +--- no_http2 --- config server_tokens off; location /t { @@ -162,6 +164,7 @@ close: 1 nil === TEST 3: ambiguous boundary patterns (abcabd) - inclusive mode - small buffers +--- no_http2 --- config server_tokens off; lua_socket_buffer_size 1; @@ -235,6 +238,7 @@ close: 1 nil === TEST 4: inclusive option value nil +--- no_http2 --- config server_tokens off; location /t { @@ -306,6 +310,7 @@ close: 1 nil === TEST 5: inclusive option value false +--- no_http2 --- config server_tokens off; location /t { @@ -377,6 +382,7 @@ close: 1 nil === TEST 6: inclusive option value true (aa) +--- no_http2 --- config server_tokens off; location /t { @@ -448,6 +454,7 @@ close: 1 nil === TEST 7: bad inclusive option value type +--- no_http2 --- config server_tokens off; location /t { @@ -511,10 +518,13 @@ bad "inclusive" option value type: string --- no_error_log [alert] [warn] +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP\/3 stream 0 reset by server# === TEST 8: bad option table +--- no_http2 --- config server_tokens off; location /t { @@ -578,10 +588,13 @@ bad "inclusive" option value type: string --- no_error_log [alert] [warn] +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP\/3 stream 0 reset by server# === TEST 9: ambiguous boundary patterns (--abc), small buffer +--- no_http2 --- config server_tokens off; location /t { @@ -658,6 +671,7 @@ close: 1 nil === TEST 10: ambiguous boundary patterns (--abc), small buffer, mixed by other reading calls +--- no_http2 --- config server_tokens off; location /t { diff --git a/src/deps/src/lua-nginx-module/t/087-udp-socket.t b/src/deps/src/lua-nginx-module/t/087-udp-socket.t index 6c26b9387..ffe6b13e9 100644 --- a/src/deps/src/lua-nginx-module/t/087-udp-socket.t +++ b/src/deps/src/lua-nginx-module/t/087-udp-socket.t @@ -143,12 +143,15 @@ GET /t === TEST 3: access a TCP interface +test-nginx use the same port for tcp(http) and udp(http3) +so need to change to a port that is not listen by any app. +default port range: +net.ipv4.ip_local_port_range = 32768 60999 +choose a port greater than 61000 should be less race. --- config server_tokens off; location /t { - #set $port 5000; - set $port $TEST_NGINX_SERVER_PORT; - #set $port 1234; + set $port 65432; content_by_lua ' local socket = ngx.socket diff --git a/src/deps/src/lua-nginx-module/t/088-req-method.t b/src/deps/src/lua-nginx-module/t/088-req-method.t index 198b3b349..9e1499fb8 100644 --- a/src/deps/src/lua-nginx-module/t/088-req-method.t +++ b/src/deps/src/lua-nginx-module/t/088-req-method.t @@ -164,6 +164,7 @@ PUT === TEST 8: set GET to HEAD +--- no_http2 --- config location /t { rewrite_by_lua ' @@ -209,6 +210,8 @@ main: GET === TEST 10: set HEAD to GET +XXX: does http3 do not support set HEAD to GET?? +--- no_http2 --- config location /t { rewrite_by_lua ' @@ -223,10 +226,13 @@ main: GET method: GET --- no_error_log [error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} === TEST 11: set GET to WebDAV methods +XXX: does http3 do not support change HEAD method? +--- no_http2 --- config location /t { content_by_lua ' @@ -262,3 +268,4 @@ method: PATCH method: TRACE --- no_error_log [error] +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/091-coroutine.t b/src/deps/src/lua-nginx-module/t/091-coroutine.t index fafc5a45c..bfbdb3893 100644 --- a/src/deps/src/lua-nginx-module/t/091-coroutine.t +++ b/src/deps/src/lua-nginx-module/t/091-coroutine.t @@ -159,6 +159,8 @@ cc3: 2 === TEST 3: basic coroutine and cosocket +access the public network is unstable, need a bigger timeout +--- quic_max_idle_timeout: 4 --- config resolver $TEST_NGINX_RESOLVER ipv6=off; location /lua { @@ -760,6 +762,8 @@ GET /lua --- ignore_response --- error_log API disabled in the context of header_filter_by_lua* +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ @@ -1695,6 +1699,8 @@ GET /t "stack traceback:", "in function 'co'" ] +--- curl_error eval +qr/curl: \(52\) Empty reply from server|curl: \(92\) HTTP\/2 stream 0 was not closed cleanly|curl: \(95\) HTTP\/3 stream 0 reset by server/ diff --git a/src/deps/src/lua-nginx-module/t/093-uthread-spawn.t b/src/deps/src/lua-nginx-module/t/093-uthread-spawn.t index ab6db2ff2..99750d3c0 100644 --- a/src/deps/src/lua-nginx-module/t/093-uthread-spawn.t +++ b/src/deps/src/lua-nginx-module/t/093-uthread-spawn.t @@ -962,7 +962,7 @@ received: OK content_by_lua ' local function f() local sock = ngx.socket.udp() - local ok, err = sock:setpeername("127.0.0.1", 12345) + local ok, err = sock:setpeername("127.0.0.1", $TEST_NGINX_RAND_PORT_1) local bytes, err = sock:send("blah") if not bytes then ngx.say("failed to send query: ", err) @@ -1002,7 +1002,7 @@ delete thread 2 delete thread 1 )$ ---- udp_listen: 12345 +--- udp_listen: $TEST_NGINX_RAND_PORT_1 --- udp_query: blah --- udp_reply: hello udp --- response_body_like chop @@ -1064,6 +1064,8 @@ body: hello world)$ === TEST 23: simple user thread with ngx.req.socket() +ngx.req.socket() does not support in http3 +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} --- config location /lua { content_by_lua ' diff --git a/src/deps/src/lua-nginx-module/t/094-uthread-exit.t b/src/deps/src/lua-nginx-module/t/094-uthread-exit.t index 58d8d0b7d..0194e44b3 100644 --- a/src/deps/src/lua-nginx-module/t/094-uthread-exit.t +++ b/src/deps/src/lua-nginx-module/t/094-uthread-exit.t @@ -966,6 +966,7 @@ hello in thread after --- no_error_log [error] +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} @@ -1051,6 +1052,7 @@ hello in thread after --- no_error_log [error] +--- skip_eval: 4:$ENV{TEST_NGINX_USE_HTTP3} @@ -1399,6 +1401,8 @@ attempt to abort with pending subrequests --- no_error_log [alert] [warn] +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# @@ -1482,6 +1486,8 @@ free request [alert] [error] [warn] +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# @@ -1565,6 +1571,8 @@ free request [alert] [error] [warn] +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# @@ -1648,3 +1656,5 @@ free request [alert] [error] [warn] +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# diff --git a/src/deps/src/lua-nginx-module/t/095-uthread-exec.t b/src/deps/src/lua-nginx-module/t/095-uthread-exec.t index 7bf37c0e8..4cd121da1 100644 --- a/src/deps/src/lua-nginx-module/t/095-uthread-exec.t +++ b/src/deps/src/lua-nginx-module/t/095-uthread-exec.t @@ -423,3 +423,5 @@ attempt to abort with pending subrequests --- no_error_log [alert] [warn] +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# diff --git a/src/deps/src/lua-nginx-module/t/096-uthread-redirect.t b/src/deps/src/lua-nginx-module/t/096-uthread-redirect.t index 95bff01f3..62909b944 100644 --- a/src/deps/src/lua-nginx-module/t/096-uthread-redirect.t +++ b/src/deps/src/lua-nginx-module/t/096-uthread-redirect.t @@ -277,3 +277,5 @@ attempt to abort with pending subrequests --- no_error_log [alert] [warn] +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# diff --git a/src/deps/src/lua-nginx-module/t/100-client-abort.t b/src/deps/src/lua-nginx-module/t/100-client-abort.t index f5713874e..39d3244b1 100644 --- a/src/deps/src/lua-nginx-module/t/100-client-abort.t +++ b/src/deps/src/lua-nginx-module/t/100-client-abort.t @@ -1,6 +1,14 @@ # vim:set ft= ts=4 sw=4 et fdm=marker: -use Test::Nginx::Socket::Lua; +BEGIN { + if ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "client abort detect does not support in http3"; + } elsif ($ENV{TEST_NGINX_USE_HTTP2}) { + $SkipReason = "client abort detect does not support in http2"; + } +} + +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); use t::StapThread; our $GCScript = <<_EOC_; diff --git a/src/deps/src/lua-nginx-module/t/101-on-abort.t b/src/deps/src/lua-nginx-module/t/101-on-abort.t index ee1e41e3a..784f244e0 100644 --- a/src/deps/src/lua-nginx-module/t/101-on-abort.t +++ b/src/deps/src/lua-nginx-module/t/101-on-abort.t @@ -1,6 +1,14 @@ # vim:set ft= ts=4 sw=4 et fdm=marker: -use Test::Nginx::Socket::Lua; +BEGIN { + if ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "client abort detect does not support in http3"; + } elsif ($ENV{TEST_NGINX_USE_HTTP2}) { + $SkipReason = "client abort detect does not support in http2"; + } +} + +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); use t::StapThread; our $GCScript = <<_EOC_; diff --git a/src/deps/src/lua-nginx-module/t/102-req-start-time.t b/src/deps/src/lua-nginx-module/t/102-req-start-time.t index 3b041afda..d54b19941 100644 --- a/src/deps/src/lua-nginx-module/t/102-req-start-time.t +++ b/src/deps/src/lua-nginx-module/t/102-req-start-time.t @@ -59,7 +59,7 @@ GET /start --- request GET /req_time --- response_body_like chop -^(?:0\.[12]|0\.099)\d* +^(?:0\.[12]|0\.099|0\.098)\d* true$ --- no_error_log [error] @@ -88,7 +88,7 @@ true$ --- request GET /req_time --- response_body_like chomp -^(?:0\.[12]|0\.099)\d* +^(?:0\.[12]|0\.099|0\.098)\d* 0\.\d+ true$ --- no_error_log diff --git a/src/deps/src/lua-nginx-module/t/103-req-http-ver.t b/src/deps/src/lua-nginx-module/t/103-req-http-ver.t index e6de2388c..73ecccae2 100644 --- a/src/deps/src/lua-nginx-module/t/103-req-http-ver.t +++ b/src/deps/src/lua-nginx-module/t/103-req-http-ver.t @@ -26,8 +26,17 @@ __DATA__ } --- request GET /t ---- response_body -1.1 +--- response_body eval +my $body; +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + $body="3\n"; +} elsif (defined $ENV{TEST_NGINX_USE_HTTP2}) { + $body="2\n"; +} else { + $body="1.1\n"; +} + +$body; --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/104-req-raw-header.t b/src/deps/src/lua-nginx-module/t/104-req-raw-header.t index aa6663048..459d190ac 100644 --- a/src/deps/src/lua-nginx-module/t/104-req-raw-header.t +++ b/src/deps/src/lua-nginx-module/t/104-req-raw-header.t @@ -1,5 +1,14 @@ # vim:set ft= ts=4 sw=4 et fdm=marker: -use Test::Nginx::Socket::Lua; + +our $SkipReason; + +BEGIN { + if ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "http3 does not support ngx.req.raw_header()"; + } +} + +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); #worker_connections(1014); #master_on(); diff --git a/src/deps/src/lua-nginx-module/t/105-pressure.t b/src/deps/src/lua-nginx-module/t/105-pressure.t index 9d1ba1ff1..2fc130d09 100644 --- a/src/deps/src/lua-nginx-module/t/105-pressure.t +++ b/src/deps/src/lua-nginx-module/t/105-pressure.t @@ -2,7 +2,7 @@ use Test::Nginx::Socket::Lua; -#worker_connections(1014); +worker_connections(1014); #master_on(); #log_level('debug'); @@ -28,6 +28,8 @@ run_tests(); __DATA__ === TEST 1: memory issue in the "args" string option for ngx.location.capture +the default worker_connections is 64, HTTP3 will keep the connection when curl +request finished. So need to change the worker_connection. --- config location /test1 { content_by_lua ' diff --git a/src/deps/src/lua-nginx-module/t/106-timer.t b/src/deps/src/lua-nginx-module/t/106-timer.t index acd6e4c80..513e1e5b4 100644 --- a/src/deps/src/lua-nginx-module/t/106-timer.t +++ b/src/deps/src/lua-nginx-module/t/106-timer.t @@ -228,6 +228,7 @@ qr/\[lua\] content_by_lua\(nginx\.conf:\d+\):\d+: elapsed: 0\.(?:1[4-9]|2[0-6]?) === TEST 5: tcp cosocket in timer handler (short connections) +--- no_http2 --- config server_tokens off; @@ -1332,6 +1333,7 @@ API disabled === TEST 19: exit in user thread (entry thread is still pending on ngx.sleep) +--- quic_max_idle_timeout: 1.3 --- config location /t { content_by_lua ' @@ -2208,8 +2210,8 @@ qr/\[lua\] content_by_lua\(nginx\.conf:\d+\):\d+: elapsed: .*?, context: ngx\.ti '; } --- log_level: error ---- error_log_file: syslog:server=127.0.0.1:12345 ---- udp_listen: 12345 +--- error_log_file: syslog:server=127.0.0.1:$TEST_NGINX_RAND_PORT_1 +--- udp_listen: $TEST_NGINX_RAND_PORT_1 --- udp_query eval: qr/Bad bad bad/ --- udp_reply: hello --- wait: 0.1 diff --git a/src/deps/src/lua-nginx-module/t/108-timer-safe.t b/src/deps/src/lua-nginx-module/t/108-timer-safe.t index 387f203c3..a23634cd3 100644 --- a/src/deps/src/lua-nginx-module/t/108-timer-safe.t +++ b/src/deps/src/lua-nginx-module/t/108-timer-safe.t @@ -124,6 +124,7 @@ qr/\[lua\] content_by_lua\(nginx\.conf:\d+\):\d+: elapsed: 0\.(?:6[4-9]|7[0-6])/ === TEST 3: tcp cosocket in timer handler (short connections) +--- no_http2 --- config server_tokens off; location = /t { diff --git a/src/deps/src/lua-nginx-module/t/109-timer-hup.t b/src/deps/src/lua-nginx-module/t/109-timer-hup.t index bff1b3346..551dd486c 100644 --- a/src/deps/src/lua-nginx-module/t/109-timer-hup.t +++ b/src/deps/src/lua-nginx-module/t/109-timer-hup.t @@ -6,6 +6,10 @@ BEGIN { if ($ENV{TEST_NGINX_CHECK_LEAK}) { $SkipReason = "unavailable for the hup tests"; + } elsif (defined $ENV{TEST_NGINX_USE_HTTP3}) { + #os.execute("kill -HUP " .. pid) + $SkipReason = "send HUP relaod signal by self make two workers with same id"; + } else { $ENV{TEST_NGINX_USE_HUP} = 1; undef $ENV{TEST_NGINX_USE_STAP}; diff --git a/src/deps/src/lua-nginx-module/t/116-raw-req-socket.t b/src/deps/src/lua-nginx-module/t/116-raw-req-socket.t index 4dfb92664..6704a9208 100644 --- a/src/deps/src/lua-nginx-module/t/116-raw-req-socket.t +++ b/src/deps/src/lua-nginx-module/t/116-raw-req-socket.t @@ -1,6 +1,14 @@ # vim:set ft= ts=4 sw=4 et fdm=marker: -use Test::Nginx::Socket::Lua; +our $SkipReason; + +BEGIN { + if ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "http3 does not support ngx.req.socket(true)"; + } +} + +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); repeat_each(2); diff --git a/src/deps/src/lua-nginx-module/t/120-re-find.t b/src/deps/src/lua-nginx-module/t/120-re-find.t index ddf24a98e..43ccece1a 100644 --- a/src/deps/src/lua-nginx-module/t/120-re-find.t +++ b/src/deps/src/lua-nginx-module/t/120-re-find.t @@ -354,8 +354,11 @@ matched: he } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -562,8 +565,11 @@ matched: hello, 1234 } --- request GET /t ---- response_body_like chop -^error: pcre_exec\(\) failed: -10$ +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] @@ -587,6 +593,7 @@ GET /t '; } --- stap +# TODO: PCRE2 use different option values from PCRE probe process("$LIBPCRE_PATH").function("pcre_compile") { printf("compile opts: %x\n", $options) } @@ -645,8 +652,14 @@ end --- request GET /re ---- response_body -error: pcre_exec() failed: -8 +--- response_body eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"failed to match.\n" +: +"error: pcre_exec() failed: -8\n" --- no_error_log [error] diff --git a/src/deps/src/lua-nginx-module/t/124-init-worker.t b/src/deps/src/lua-nginx-module/t/124-init-worker.t index 57df4a5b3..c68d74bb1 100644 --- a/src/deps/src/lua-nginx-module/t/124-init-worker.t +++ b/src/deps/src/lua-nginx-module/t/124-init-worker.t @@ -529,6 +529,7 @@ second line received: (?:Date|Server): .*? --- no_error_log [error] --- timeout: 10 +--- skip_eval: 3:$ENV{TEST_NGINX_USE_HTTP3} @@ -729,8 +730,8 @@ ok '; } --- log_level: error ---- error_log_file: syslog:server=127.0.0.1:12345 ---- udp_listen: 12345 +--- error_log_file: syslog:server=127.0.0.1:$TEST_NGINX_RAND_PORT_1 +--- udp_listen: $TEST_NGINX_RAND_PORT_1 --- udp_query eval: qr/Bad bad bad/ --- udp_reply: hello --- wait: 0.1 diff --git a/src/deps/src/lua-nginx-module/t/128-duplex-tcp-socket.t b/src/deps/src/lua-nginx-module/t/128-duplex-tcp-socket.t index 22b9f036d..511cc20bf 100644 --- a/src/deps/src/lua-nginx-module/t/128-duplex-tcp-socket.t +++ b/src/deps/src/lua-nginx-module/t/128-duplex-tcp-socket.t @@ -193,7 +193,7 @@ close: 1 nil$ lua_socket_log_errors off; location /t { #set $port 5000; - set $port 7658; + set $port $TEST_NGINX_RAND_PORT_1; content_by_lua ' local sock = ngx.socket.tcp() @@ -258,7 +258,7 @@ received: OK! close: (?:nil socket busy writing|1 nil failed to send request: closed)$ ---- tcp_listen: 7658 +--- tcp_listen: $TEST_NGINX_RAND_PORT_1 --- tcp_shutdown: 0 --- tcp_reply: OK! --- tcp_no_close: 1 @@ -273,7 +273,7 @@ failed to send request: closed)$ lua_socket_log_errors off; location /t { #set $port 5000; - set $port 7658; + set $port $TEST_NGINX_RAND_PORT_1; content_by_lua ' local sock = ngx.socket.tcp() @@ -349,7 +349,7 @@ F(ngx_http_lua_socket_tcp_finalize_write_part) { print_ubacktrace() } --- stap_out2 ---- tcp_listen: 7658 +--- tcp_listen: $TEST_NGINX_RAND_PORT_1 --- tcp_shutdown: 1 --- tcp_query eval: "flush_all\r\n" --- tcp_query_len: 11 diff --git a/src/deps/src/lua-nginx-module/t/129-ssl-socket.t b/src/deps/src/lua-nginx-module/t/129-ssl-socket.t index 81ca51ca4..ccfa19fff 100644 --- a/src/deps/src/lua-nginx-module/t/129-ssl-socket.t +++ b/src/deps/src/lua-nginx-module/t/129-ssl-socket.t @@ -1,18 +1,36 @@ # vim:set ft= ts=4 sw=4 et fdm=marker: -use Test::Nginx::Socket::Lua; +our $SkipReason; +BEGIN { + if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + # FIXME: we still need to enable this test file for HTTP3. + $SkipReason = "the test cases are very unstable, skip for now."; + } +} + +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); + use Cwd qw(abs_path realpath); use File::Basename; repeat_each(2); -plan tests => repeat_each() * (blocks() * 7 - 3); +sub resolve($$); + +plan tests => repeat_each() * (blocks() * 7 - 4); $ENV{TEST_NGINX_HTML_DIR} ||= html_dir(); $ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211; $ENV{TEST_NGINX_RESOLVER} ||= '8.8.8.8'; $ENV{TEST_NGINX_SERVER_SSL_PORT} ||= 12345; $ENV{TEST_NGINX_CERT_DIR} ||= dirname(realpath(abs_path(__FILE__))); +$ENV{TEST_NGINX_OPENRESTY_ORG_IP} ||= resolve("openresty.org", $ENV{TEST_NGINX_RESOLVER}); + +my $NginxBinary = $ENV{'TEST_NGINX_BINARY'} || 'nginx'; +my $openssl_version = eval { `$NginxBinary -V 2>&1` }; +if ($openssl_version =~ m/BoringSSL/) { + $ENV{TEST_NGINX_USE_BORINGSSL} = 1; +} #log_level 'warn'; log_level 'debug'; @@ -29,6 +47,19 @@ sub read_file { $cert; } +sub resolve ($$) { + my ($domain, $resolver) = @_; + my $ips = qx/dig \@$resolver +short $domain/; + + my $exit_code = $? >> 8; + if (!$ips || $exit_code != 0) { + die "failed to resolve '$domain' using '$resolver' as resolver"; + } + + my ($ip) = split /\n/, $ips; + return $ip; +} + our $DSTRootCertificate = read_file("t/cert/dst-ca.crt"); our $EquifaxRootCertificate = read_file("t/cert/equifax.crt"); our $TestCertificate = read_file("t/cert/test.crt"); @@ -39,7 +70,9 @@ run_tests(); __DATA__ -=== TEST 1: www.bing.com +=== TEST 1: www.google.com +access the public network is unstable, need a bigger timeout value. +--- quic_max_idle_timeout: 3 --- config server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; @@ -62,7 +95,7 @@ __DATA__ do local sock = ngx.socket.tcp() sock:settimeout(2000) - local ok, err = sock:connect("www.bing.com", 443) + local ok, err = sock:connect("www.google.com", 443) if not ok then ngx.say("failed to connect: ", err) return @@ -78,7 +111,7 @@ __DATA__ ngx.say("ssl handshake: ", type(sess)) - local req = "GET / HTTP/1.1\\r\\nHost: www.bing.com\\r\\nConnection: close\\r\\n\\r\\n" + local req = "GET / HTTP/1.1\\r\\nHost: www.google.com\\r\\nConnection: close\\r\\n\\r\\n" local bytes, err = sock:send(req) if not bytes then ngx.say("failed to send http request: ", err) @@ -107,7 +140,7 @@ GET /t --- response_body_like chop \Aconnected: 1 ssl handshake: cdata -sent http request: 57 bytes. +sent http request: 59 bytes. received: HTTP/1.1 (?:200 OK|302 Found) close: 1 nil \z @@ -293,6 +326,8 @@ SSL reused session === TEST 4: ssl session reuse +access the public network is unstable, need a bigger timeout value. +--- quic_max_idle_timeout: 3 --- config server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; @@ -1034,6 +1069,8 @@ SSL reused session --- config server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; + location /t { #set $port 5000; set $port $TEST_NGINX_MEMCACHED_PORT; @@ -1376,6 +1413,7 @@ SSL reused session location /t { #set $port 5000; set $port $TEST_NGINX_MEMCACHED_PORT; + set $openresty_org_ip $TEST_NGINX_OPENRESTY_ORG_IP; content_by_lua ' local sock = ngx.socket.tcp() @@ -1385,7 +1423,8 @@ SSL reused session local session for i = 1, 3 do - local ok, err = sock:connect("openresty.org", 443) + -- Use the same IP to ensure that the connection can be reused + local ok, err = sock:connect(ngx.var.openresty_org_ip, 443) if not ok then ngx.say("failed to connect: ", err) return @@ -1452,6 +1491,7 @@ SSL reused session lua_ssl_verify_depth 2; location /t { #set $port 5000; + set $openresty_org_ip $TEST_NGINX_OPENRESTY_ORG_IP; set $port $TEST_NGINX_MEMCACHED_PORT; content_by_lua ' @@ -1461,7 +1501,8 @@ SSL reused session do for i = 1, 3 do - local ok, err = sock:connect("openresty.org", 443) + -- Use the same IP to ensure that the connection can be reused + local ok, err = sock:connect(ngx.var.openresty_org_ip, 443) if not ok then ngx.say("failed to connect: ", err) return @@ -1562,6 +1603,7 @@ attempt to call method 'sslhandshake' (a nil value) --- no_error_log [alert] --- timeout: 3 +--- skip_eval: 5:$ENV{TEST_NGINX_USE_HTTP3} @@ -2099,8 +2141,6 @@ failed to do SSL handshake: timeout --- log_level: debug --- grep_error_log eval: qr/lua ssl (?:set|save|free) session: [0-9A-F]+/ --- grep_error_log_out ---- error_log -lua ssl server name: "openresty.org" --- no_error_log SSL reused session [error] @@ -2561,6 +2601,8 @@ qr/\[error\] .* ngx.socket sslhandshake: expecting 1 ~ 5 arguments \(including t --- no_error_log [alert] --- timeout: 10 +--- curl_error eval +qr#curl: \(52\) Empty reply from server|curl: \(95\) HTTP/3 stream 0 reset by server# @@ -2658,6 +2700,7 @@ SSL reused session === TEST 33: explicit cipher configuration - TLSv1.3 --- skip_openssl: 8: < 1.1.1 --- skip_nginx: 8: < 1.19.4 +--- skip_eval: 8:$ENV{TEST_NGINX_USE_BORINGSSL} --- http_config server { listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl; @@ -2751,6 +2794,7 @@ SSL reused session === TEST 34: explicit cipher configuration not in the default list - TLSv1.3 --- skip_openssl: 8: < 1.1.1 --- skip_nginx: 8: < 1.19.4 +--- skip_eval: 8:$ENV{TEST_NGINX_USE_BORINGSSL} --- http_config server { listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl; diff --git a/src/deps/src/lua-nginx-module/t/131-duplex-req-socket.t b/src/deps/src/lua-nginx-module/t/131-duplex-req-socket.t index 5d698b934..f88649b8d 100644 --- a/src/deps/src/lua-nginx-module/t/131-duplex-req-socket.t +++ b/src/deps/src/lua-nginx-module/t/131-duplex-req-socket.t @@ -1,5 +1,7 @@ # vim:set ft= ts=4 sw=4 et fdm=marker: +our $SkipReason; + BEGIN { if (!defined $ENV{LD_PRELOAD}) { $ENV{LD_PRELOAD} = ''; @@ -18,9 +20,13 @@ BEGIN { $ENV{TEST_NGINX_EVENT_TYPE} = 'poll'; $ENV{MOCKEAGAIN_WRITE_TIMEOUT_PATTERN} = 'slow'; + + if ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "http3 does not support ngx.req.socket()"; + } } -use Test::Nginx::Socket::Lua; +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); log_level('debug'); diff --git a/src/deps/src/lua-nginx-module/t/132-lua-blocks.t b/src/deps/src/lua-nginx-module/t/132-lua-blocks.t index 2a1644e53..35638a848 100644 --- a/src/deps/src/lua-nginx-module/t/132-lua-blocks.t +++ b/src/deps/src/lua-nginx-module/t/132-lua-blocks.t @@ -166,6 +166,7 @@ ok === TEST 8: content_by_lua_block (cosockets) +--- no_http2 --- config server_tokens off; location = /t { diff --git a/src/deps/src/lua-nginx-module/t/138-balancer-upstream-bind.t b/src/deps/src/lua-nginx-module/t/138-balancer-upstream-bind.t new file mode 100644 index 000000000..442f37c8f --- /dev/null +++ b/src/deps/src/lua-nginx-module/t/138-balancer-upstream-bind.t @@ -0,0 +1,142 @@ +# vim:set ft= ts=4 sw=4 et fdm=marker: + +use Test::Nginx::Socket::Lua; + +#worker_connections(1014); +#master_on(); +#workers(2); +#log_level('warn'); + +repeat_each(2); + +plan tests => repeat_each() * (blocks() * 3); + +#no_diff(); +no_long_string(); +run_tests(); + +__DATA__ + +=== TEST 1: bind to empty +--- no_http2 +--- http_config + lua_package_path "$TEST_NGINX_SERVER_ROOT/html/?.lua;;"; + + upstream backend { + server 127.0.0.1:$TEST_NGINX_SERVER_PORT; + } +--- config + set $proxy_local_addr ""; + proxy_bind $proxy_local_addr; + + location = /t { + proxy_pass http://backend/back; + } + + location = /back { + echo ok; + } + +--- request + GET /t +--- response_body +ok +--- no_error_log +[cirt] + + + +=== TEST 2: bind to 127.0.0.1 +--- no_http2 +--- http_config + lua_package_path "$TEST_NGINX_SERVER_ROOT/html/?.lua;;"; + + upstream backend { + server 127.0.0.1:$TEST_NGINX_SERVER_PORT; + } +--- config + set $proxy_local_addr ""; + proxy_bind $proxy_local_addr; + + location = /t { + access_by_lua_block { + ngx.var.proxy_local_addr="127.0.0.1" + } + proxy_pass http://backend/back; + } + + location = /back { + echo ok; + } + +--- request + GET /t +--- response_body +ok +--- no_error_log +[cirt] + + + +=== TEST 3: bind to 127.0.0.10 +--- no_http2 +--- http_config + lua_package_path "$TEST_NGINX_SERVER_ROOT/html/?.lua;;"; + + upstream backend { + server 127.0.0.1:$TEST_NGINX_SERVER_PORT; + } +--- config + set $proxy_local_addr ""; + proxy_bind $proxy_local_addr; + + location = /t { + access_by_lua_block { + ngx.var.proxy_local_addr="127.0.0.10" + } + proxy_pass http://backend/back; + } + + location = /back { + echo ok; + } + +--- request + GET /t +--- response_body +ok +--- no_error_log +[cirt] + + + +=== TEST 4: bind to not exist addr 100.100.100.100 +--- no_http2 +--- http_config + lua_package_path "$TEST_NGINX_SERVER_ROOT/html/?.lua;;"; + + upstream backend { + server 127.0.0.1:$TEST_NGINX_SERVER_PORT; + } +--- config + set $proxy_local_addr ""; + proxy_bind $proxy_local_addr; + + location = /t { + access_by_lua_block { + ngx.var.proxy_local_addr="100.100.100.100" + } + proxy_pass http://backend/back; + } + + location = /back { + echo ok; + } + +--- request + GET /t +--- response_body_like chomp +500 Internal Server Error +--- error_code: 500 +--- error_log +bind(100.100.100.100) failed (99: Cannot assign requested address) diff --git a/src/deps/src/lua-nginx-module/t/138-balancer.t b/src/deps/src/lua-nginx-module/t/138-balancer.t index d9c943388..8ccdee76c 100644 --- a/src/deps/src/lua-nginx-module/t/138-balancer.t +++ b/src/deps/src/lua-nginx-module/t/138-balancer.t @@ -309,6 +309,7 @@ qr{\[crit\] .*? connect\(\) to 0\.0\.0\.1:80 failed .*?, upstream: "http://0\.0\ === TEST 12: code cache off +--- no_http2 --- http_config lua_package_path "$TEST_NGINX_SERVER_ROOT/html/?.lua;;"; diff --git a/src/deps/src/lua-nginx-module/t/139-ssl-cert-by.t b/src/deps/src/lua-nginx-module/t/139-ssl-cert-by.t index 218046690..abf447856 100644 --- a/src/deps/src/lua-nginx-module/t/139-ssl-cert-by.t +++ b/src/deps/src/lua-nginx-module/t/139-ssl-cert-by.t @@ -579,7 +579,7 @@ failed to do SSL handshake: handshake failed --- error_log eval [ 'lua_certificate_by_lua: handler return value: -1, cert cb exit code: 0', -qr/\[info\] .*? SSL_do_handshake\(\) failed .*?cert cb error/, +qr/(\[info\] .*? SSL_do_handshake\(\) failed .*?cert cb error|routines:OPENSSL_internal:CERT_CB_ERROR)/, 'lua exit with code -1', ] @@ -720,7 +720,7 @@ failed to do SSL handshake: handshake failed --- error_log eval [ 'lua_certificate_by_lua: cert cb exit code: 0', -qr/\[info\] .*? SSL_do_handshake\(\) failed .*?cert cb error/, +qr/(\[info\] .*? SSL_do_handshake\(\) failed .*?cert cb error|routines:OPENSSL_internal:CERT_CB_ERROR)/, 'lua exit with code -1', ] @@ -791,7 +791,7 @@ failed to do SSL handshake: handshake failed [ 'runtime error: ssl_certificate_by_lua(nginx.conf:28):2: bad bad bad', 'lua_certificate_by_lua: handler return value: 500, cert cb exit code: 0', -qr/\[info\] .*? SSL_do_handshake\(\) failed .*?cert cb error/, +qr/(\[info\] .*? SSL_do_handshake\(\) failed .*?cert cb error|routines:OPENSSL_internal:CERT_CB_ERROR)/, qr/context: ssl_certificate_by_lua\*, client: \d+\.\d+\.\d+\.\d+, server: \d+\.\d+\.\d+\.\d+:\d+/, ] @@ -863,7 +863,7 @@ failed to do SSL handshake: handshake failed [ 'runtime error: ssl_certificate_by_lua(nginx.conf:28):3: bad bad bad', 'lua_certificate_by_lua: cert cb exit code: 0', -qr/\[info\] .*? SSL_do_handshake\(\) failed .*?cert cb error/, +qr/(\[info\] .*? SSL_do_handshake\(\) failed .*?cert cb error|routines:OPENSSL_internal:CERT_CB_ERROR)/, ] --- no_error_log @@ -1051,7 +1051,7 @@ failed to do SSL handshake: handshake failed [ 'lua ssl server name: "test.com"', 'ssl_certificate_by_lua(nginx.conf:28):1: API disabled in the context of ssl_certificate_by_lua*', -qr/\[info\] .*?cert cb error/, +qr/(\[info\] .*? SSL_do_handshake\(\) failed .*?cert cb error|routines:OPENSSL_internal:CERT_CB_ERROR)/, ] --- no_error_log @@ -1885,7 +1885,7 @@ qr/\[info\] .*? SSL_do_handshake\(\) failed\b/, lua_package_path "../lua-resty-core/lib/?.lua;;"; server { - listen 127.0.0.1:12345 ssl; + listen 127.0.0.1:$TEST_NGINX_RAND_PORT_1 ssl; server_name test.com; ssl_certificate_by_lua_block { @@ -1917,7 +1917,7 @@ qr/\[info\] .*? SSL_do_handshake\(\) failed\b/, sock:settimeout(2000) - local ok, err = sock:connect("127.0.0.1", 12345) + local ok, err = sock:connect("127.0.0.1", $TEST_NGINX_RAND_PORT_1) if not ok then ngx.say("failed to connect: ", err) return diff --git a/src/deps/src/lua-nginx-module/t/142-ssl-session-store.t b/src/deps/src/lua-nginx-module/t/142-ssl-session-store.t index 61598732b..11deb8320 100644 --- a/src/deps/src/lua-nginx-module/t/142-ssl-session-store.t +++ b/src/deps/src/lua-nginx-module/t/142-ssl-session-store.t @@ -40,6 +40,7 @@ __DATA__ server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -115,6 +116,7 @@ ssl_session_store_by_lua\(nginx\.conf:25\):1: ssl session store by lua is runnin server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -190,6 +192,7 @@ API disabled in the context of ssl_session_store_by_lua* server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -282,6 +285,7 @@ my timer run! server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -351,6 +355,7 @@ API disabled in the context of ssl_session_store_by_lua* resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -423,6 +428,7 @@ ngx.exit does not yield and the error code is eaten. resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -496,6 +502,7 @@ ssl_session_store_by_lua*: handler return value: 0, sess new cb exit code: 0 resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -564,6 +571,7 @@ should never reached here resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -634,6 +642,7 @@ get_phase: ssl_session_store server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -703,6 +712,7 @@ qr/elapsed in ssl cert by lua: 0.(?:09|1[01])\d+,/, server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -784,6 +794,7 @@ a.lua:1: ssl store session by lua is running! resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -854,6 +865,7 @@ qr/\[emerg\] .*? "ssl_session_store_by_lua_block" directive is not allowed here server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -963,3 +975,4 @@ qr/ssl_session_store_by_lua\*: skipped since TLS version >= 1\.3 \(\d+\)/ [error] [alert] [emerg] +--- skip_eval: 6:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/143-ssl-session-fetch.t b/src/deps/src/lua-nginx-module/t/143-ssl-session-fetch.t index 8c5174dd9..2f988ded9 100644 --- a/src/deps/src/lua-nginx-module/t/143-ssl-session-fetch.t +++ b/src/deps/src/lua-nginx-module/t/143-ssl-session-fetch.t @@ -41,6 +41,7 @@ __DATA__ server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -141,6 +142,7 @@ ssl_session_fetch_by_lua\(nginx\.conf:25\):1: ssl fetch sess by lua is running!, server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -225,6 +227,7 @@ qr/elapsed in ssl fetch session by lua: 0.(?:09|1[01])\d+,/, server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -326,6 +329,7 @@ qr/my timer run!/s server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -407,6 +411,7 @@ qr/received memc reply: OK/s resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -488,6 +493,7 @@ should never reached here resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -570,6 +576,7 @@ should never reached here resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -650,6 +657,7 @@ should never reached here server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; lua_ssl_verify_depth 3; location /t { @@ -733,6 +741,7 @@ should never reached here server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; lua_ssl_verify_depth 3; location /t { @@ -814,6 +823,7 @@ should never reached here server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -900,6 +910,7 @@ qr/get_phase: ssl_session_fetch/s server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -946,6 +957,21 @@ close: 1 nil qr/ssl ((fetch|store) session|cert) by lua is running!/s --- grep_error_log_out eval +if ($ENV{TEST_NGINX_USE_HTTP3}) { +[ +'ssl cert by lua is running! +ssl store session by lua is running! +', +'ssl cert by lua is running! +ssl fetch session by lua is running! +ssl store session by lua is running! +', +'ssl cert by lua is running! +ssl fetch session by lua is running! +ssl store session by lua is running! +', +] +} else { [ 'ssl cert by lua is running! ssl store session by lua is running! @@ -959,6 +985,7 @@ ssl cert by lua is running! ssl store session by lua is running! ', ] +} --- no_error_log [error] @@ -982,6 +1009,7 @@ ssl store session by lua is running! --- config server_tokens off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -1070,6 +1098,7 @@ qr/\S+:\d+: ssl fetch sess by lua is running!/s server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -1170,6 +1199,7 @@ qr/ssl_session_fetch_by_lua\(nginx.conf:\d+\):1: ssl fetch sess by lua is runnin --- config server_tokens off; lua_ssl_trusted_certificate ../../cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { content_by_lua_block { @@ -1249,6 +1279,7 @@ GET /t --- config server_tokens off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { content_by_lua_block { @@ -1382,6 +1413,7 @@ ssl_session_fetch_by_lua\(nginx\.conf:\d+\):1: ssl_session_fetch_by_lua\* is run [error] [alert] [emerg] +--- skip_eval: 6:$ENV{TEST_NGINX_USE_HTTP3} @@ -1406,6 +1438,7 @@ ssl_session_fetch_by_lua\(nginx\.conf:\d+\):1: ssl_session_fetch_by_lua\* is run --- config server_tokens off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -1501,6 +1534,7 @@ qr/elapsed in ssl_session_fetch_by_lua\*: 0\.(?:09|1[01])\d+,/, --- config server_tokens off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { content_by_lua_block { @@ -1596,6 +1630,7 @@ close: 1 nil --- config server_tokens off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { content_by_lua_block { @@ -1696,6 +1731,7 @@ uthread: failed to kill: already waited or killed --- config server_tokens off; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; + lua_ssl_protocols TLSv1 TLSv1.1 TLSV1.2; location /t { content_by_lua_block { diff --git a/src/deps/src/lua-nginx-module/t/147-tcp-socket-timeouts.t b/src/deps/src/lua-nginx-module/t/147-tcp-socket-timeouts.t index 8566c0ba6..ceddb61dc 100644 --- a/src/deps/src/lua-nginx-module/t/147-tcp-socket-timeouts.t +++ b/src/deps/src/lua-nginx-module/t/147-tcp-socket-timeouts.t @@ -17,6 +17,7 @@ BEGIN { } $ENV{TEST_NGINX_EVENT_TYPE} = 'poll'; + delete($ENV{TEST_NGINX_USE_HTTP2}); $ENV{MOCKEAGAIN_WRITE_TIMEOUT_PATTERN} = 'slowdata'; } diff --git a/src/deps/src/lua-nginx-module/t/151-initby-hup.t b/src/deps/src/lua-nginx-module/t/151-initby-hup.t index f2788670d..a37db9fe4 100644 --- a/src/deps/src/lua-nginx-module/t/151-initby-hup.t +++ b/src/deps/src/lua-nginx-module/t/151-initby-hup.t @@ -12,7 +12,7 @@ BEGIN { } } -use Test::Nginx::Socket::Lua 'no_plan'; +use Test::Nginx::Socket::Lua $SkipReason ? (skip_all => $SkipReason) : (); #worker_connections(1014); #master_on(); @@ -21,7 +21,7 @@ use Test::Nginx::Socket::Lua 'no_plan'; repeat_each(1); -#plan tests => repeat_each() * (blocks() * 3 + 3); +plan tests => repeat_each() * (blocks() * 3); #no_diff(); #no_long_string(); diff --git a/src/deps/src/lua-nginx-module/t/152-timer-every.t b/src/deps/src/lua-nginx-module/t/152-timer-every.t index 7b42d2d72..374e80e04 100644 --- a/src/deps/src/lua-nginx-module/t/152-timer-every.t +++ b/src/deps/src/lua-nginx-module/t/152-timer-every.t @@ -224,6 +224,7 @@ registered timer === TEST 6: memory leak check +--- quic_max_idle_timeout: 8 --- config location /t { content_by_lua_block { diff --git a/src/deps/src/lua-nginx-module/t/153-semaphore-hup.t b/src/deps/src/lua-nginx-module/t/153-semaphore-hup.t index 5c271a48e..496db6862 100644 --- a/src/deps/src/lua-nginx-module/t/153-semaphore-hup.t +++ b/src/deps/src/lua-nginx-module/t/153-semaphore-hup.t @@ -104,6 +104,7 @@ run_tests(); __DATA__ === TEST 1: timer + reload +--- quic_max_idle_timeout: 1.1 --- config location /test { content_by_lua_block { @@ -129,6 +130,7 @@ created semaphore object === TEST 2: timer + reload (lua code cache off) +--- quic_max_idle_timeout: 1.1 --- http_config lua_code_cache off; --- config diff --git a/src/deps/src/lua-nginx-module/t/156-slow-network.t b/src/deps/src/lua-nginx-module/t/156-slow-network.t index 2d8050608..d5897fb33 100644 --- a/src/deps/src/lua-nginx-module/t/156-slow-network.t +++ b/src/deps/src/lua-nginx-module/t/156-slow-network.t @@ -15,6 +15,7 @@ BEGIN { } $ENV{TEST_NGINX_EVENT_TYPE} = 'poll'; + delete($ENV{TEST_NGINX_USE_HTTP2}); } use Test::Nginx::Socket::Lua; diff --git a/src/deps/src/lua-nginx-module/t/157-socket-keepalive-hup.t b/src/deps/src/lua-nginx-module/t/157-socket-keepalive-hup.t index d9436b3b7..4ebf637a3 100644 --- a/src/deps/src/lua-nginx-module/t/157-socket-keepalive-hup.t +++ b/src/deps/src/lua-nginx-module/t/157-socket-keepalive-hup.t @@ -6,6 +6,10 @@ BEGIN { if ($ENV{TEST_NGINX_CHECK_LEAK}) { $SkipReason = "unavailable for the hup tests"; + } elsif (defined $ENV{TEST_NGINX_USE_HTTP3}) { + #os.execute("kill -HUP " .. pid) + $SkipReason = "send HUP relaod signal by self make two workers with same id"; + } else { $ENV{TEST_NGINX_USE_HUP} = 1; undef $ENV{TEST_NGINX_USE_STAP}; diff --git a/src/deps/src/lua-nginx-module/t/162-socket-tls-handshake.t b/src/deps/src/lua-nginx-module/t/162-socket-tls-handshake.t index 80fb2f982..19ad67a74 100644 --- a/src/deps/src/lua-nginx-module/t/162-socket-tls-handshake.t +++ b/src/deps/src/lua-nginx-module/t/162-socket-tls-handshake.t @@ -63,7 +63,7 @@ run_tests(); __DATA__ -=== TEST 1: sanity: www.bing.com +=== TEST 1: sanity: www.google.com --- config server_tokens off; resolver $TEST_NGINX_RESOLVER ipv6=off; @@ -86,7 +86,7 @@ __DATA__ local sock = ngx.socket.tcp() sock:settimeout(2000) - local ok, err = sock:connect("www.bing.com", 443) + local ok, err = sock:connect("www.google.com", 443) if not ok then ngx.say("failed to connect: ", err) return @@ -102,7 +102,7 @@ __DATA__ ngx.say("ssl handshake: ", type(sess)) - local req = "GET / HTTP/1.1\r\nHost: www.bing.com\r\nConnection: close\r\n\r\n" + local req = "GET / HTTP/1.1\r\nHost: www.google.com\r\nConnection: close\r\n\r\n" local bytes, err = sock:send(req) if not bytes then ngx.say("failed to send http request: ", err) @@ -131,7 +131,7 @@ GET /t --- response_body_like chop \Aconnected: 1 ssl handshake: cdata -sent http request: 57 bytes. +sent http request: 59 bytes. received: HTTP/1.1 (?:200 OK|302 Found) close: 1 nil \z diff --git a/src/deps/src/lua-nginx-module/t/162-static-module-location.t b/src/deps/src/lua-nginx-module/t/162-static-module-location.t index fde93c71b..9f09dbe63 100644 --- a/src/deps/src/lua-nginx-module/t/162-static-module-location.t +++ b/src/deps/src/lua-nginx-module/t/162-static-module-location.t @@ -40,9 +40,11 @@ Location: %00%0A%0Dset-cookie:1234567/ Hello, world --- request GET /t/中文 +--- more_headers +host: localhost --- error_code: 301 --- response_headers_like -Location: http:\/\/localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/ +Location: https?:\/\/localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/ --- response_body_like .*301 Moved Permanently.* @@ -56,9 +58,11 @@ Location: http:\/\/localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/ Hello, world --- request GET /t/中文?q=name +--- more_headers +host: localhost --- error_code: 301 --- response_headers_like -Location: http:\/\/localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/\?q=name +Location: https?:\/\/localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/\?q=name --- response_body_like .*301 Moved Permanently.* @@ -72,9 +76,11 @@ Location: http:\/\/localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/\?q=name Hello, world --- request GET /t/%E4%B8%AD%E6%96%87 +--- more_headers +host: localhost --- error_code: 301 --- response_headers_like -Location: http:\/\/localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/ +Location: https?:\/\/localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/ --- response_body_like .*301 Moved Permanently.* @@ -88,8 +94,10 @@ Location: http:\/\/localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/ Hello, world --- request GET /t/%E4%B8%AD%E6%96%87?q=name +--- more_headers +host: localhost --- error_code: 301 --- response_headers_like -Location: http://localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/\?q=name +Location: https?://localhost:\d+\/t\/%E4%B8%AD%E6%96%87\/\?q=name --- response_body_like .*301 Moved Permanently.* diff --git a/src/deps/src/lua-nginx-module/t/163-exit-worker-hup.t b/src/deps/src/lua-nginx-module/t/163-exit-worker-hup.t index a54d81db1..136efdc7f 100644 --- a/src/deps/src/lua-nginx-module/t/163-exit-worker-hup.t +++ b/src/deps/src/lua-nginx-module/t/163-exit-worker-hup.t @@ -6,6 +6,9 @@ BEGIN { if ($ENV{TEST_NGINX_CHECK_LEAK}) { $SkipReason = "unavailable for the hup tests"; + } elsif ($ENV{TEST_NGINX_USE_HTTP3}) { + $SkipReason = "http3 does not support hub reload"; + } else { $ENV{TEST_NGINX_USE_HUP} = 1; undef $ENV{TEST_NGINX_USE_STAP}; @@ -54,7 +57,7 @@ log from exit_worker_by_lua_block } server { - listen 12345; + listen $TEST_NGINX_RAND_PORT_1; location = /t { echo 'hello world'; @@ -65,7 +68,7 @@ log from exit_worker_by_lua_block content_by_lua_block { ngx.timer.at(0, function () local sock = ngx.socket.tcp() - sock:connect("127.0.0.1", 12345) + sock:connect("127.0.0.1", $TEST_NGINX_RAND_PORT_1) local reader = sock:receiveuntil("unknow") ngx.log(ngx.NOTICE, "reading to block the exiting") reader() diff --git a/src/deps/src/lua-nginx-module/t/163-signal.t b/src/deps/src/lua-nginx-module/t/163-signal.t index 5a6b880b0..15f41e220 100644 --- a/src/deps/src/lua-nginx-module/t/163-signal.t +++ b/src/deps/src/lua-nginx-module/t/163-signal.t @@ -38,6 +38,8 @@ GET /t qr/\[notice\] \d+#\d+: exit$/ --- no_error_log eval qr/\[notice\] \d+#\d+: reconfiguring/ +--- curl_error eval +qr/curl: \(28\) Operation timed out after \d+ milliseconds with 0 bytes received|curl: \(56\) Recv failure: Connection reset by peer|curl: \(55\) sendmsg\(\) returned -1 \(errno 111\)/ diff --git a/src/deps/src/lua-nginx-module/t/166-ssl-client-hello.t b/src/deps/src/lua-nginx-module/t/166-ssl-client-hello.t index 850a0d655..a356b6eea 100644 --- a/src/deps/src/lua-nginx-module/t/166-ssl-client-hello.t +++ b/src/deps/src/lua-nginx-module/t/166-ssl-client-hello.t @@ -10,8 +10,10 @@ my $openssl_version = eval { `$NginxBinary -V 2>&1` }; if ($openssl_version =~ m/built with OpenSSL (0\S*|1\.0\S*|1\.1\.0\S*)/) { plan(skip_all => "too old OpenSSL, need 1.1.1, was $1"); +} elsif ($openssl_version =~ m/running with BoringSSL/) { + plan(skip_all => "does not support BoringSSL"); } else { - plan tests => repeat_each() * (blocks() * 6 + 6); + plan tests => repeat_each() * (blocks() * 6 + 8); } $ENV{TEST_NGINX_HTML_DIR} ||= html_dir(); @@ -456,7 +458,7 @@ received memc reply: OK === TEST 5: ngx.exit(0) - no yield --- http_config server { - listen 127.0.0.2:8080 ssl; + listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl; server_name test.com; ssl_client_hello_by_lua_block { ngx.exit(0) @@ -484,7 +486,7 @@ received memc reply: OK sock:settimeout(2000) - local ok, err = sock:connect("127.0.0.2", 8080) + local ok, err = sock:connect("unix:$TEST_NGINX_HTML_DIR/nginx.sock") if not ok then ngx.say("failed to connect: ", err) return @@ -523,7 +525,7 @@ should never reached here === TEST 6: ngx.exit(ngx.ERROR) - no yield --- http_config server { - listen 127.0.0.2:8080 ssl; + listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl; server_name test.com; ssl_client_hello_by_lua_block { ngx.exit(ngx.ERROR) @@ -551,7 +553,7 @@ should never reached here sock:settimeout(2000) - local ok, err = sock:connect("127.0.0.2", 8080) + local ok, err = sock:connect("unix:$TEST_NGINX_HTML_DIR/nginx.sock") if not ok then ngx.say("failed to connect: ", err) return @@ -593,7 +595,7 @@ should never reached here === TEST 7: ngx.exit(0) - yield --- http_config server { - listen 127.0.0.2:8080 ssl; + listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl; server_name test.com; ssl_client_hello_by_lua_block { ngx.sleep(0.001) @@ -623,7 +625,7 @@ should never reached here sock:settimeout(2000) - local ok, err = sock:connect("127.0.0.2", 8080) + local ok, err = sock:connect("unix:$TEST_NGINX_HTML_DIR/nginx.sock") if not ok then ngx.say("failed to connect: ", err) return @@ -662,7 +664,7 @@ should never reached here === TEST 8: ngx.exit(ngx.ERROR) - yield --- http_config server { - listen 127.0.0.2:8080 ssl; + listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl; server_name test.com; ssl_client_hello_by_lua_block { ngx.sleep(0.001) @@ -692,7 +694,7 @@ should never reached here sock:settimeout(2000) - local ok, err = sock:connect("127.0.0.2", 8080) + local ok, err = sock:connect("unix:$TEST_NGINX_HTML_DIR/nginx.sock") if not ok then ngx.say("failed to connect: ", err) return @@ -734,7 +736,7 @@ should never reached here === TEST 9: lua exception - no yield --- http_config server { - listen 127.0.0.2:8080 ssl; + listen 127.0.0.2:$TEST_NGINX_RAND_PORT_2 ssl; server_name test.com; ssl_client_hello_by_lua_block { error("bad bad bad") @@ -762,7 +764,7 @@ should never reached here sock:settimeout(2000) - local ok, err = sock:connect("127.0.0.2", 8080) + local ok, err = sock:connect("127.0.0.2", $TEST_NGINX_RAND_PORT_2) if not ok then ngx.say("failed to connect: ", err) return @@ -805,7 +807,7 @@ should never reached here === TEST 10: lua exception - yield --- http_config server { - listen 127.0.0.2:8080 ssl; + listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl; server_name test.com; ssl_client_hello_by_lua_block { ngx.sleep(0.001) @@ -834,7 +836,7 @@ should never reached here sock:settimeout(2000) - local ok, err = sock:connect("127.0.0.2", 8080) + local ok, err = sock:connect("unix:$TEST_NGINX_HTML_DIR/nginx.sock") if not ok then ngx.say("failed to connect: ", err) return @@ -1741,6 +1743,7 @@ close: 1 nil ssl client hello by lua is running! [error] [alert] +--- skip_eval: 5:$ENV{TEST_NGINX_USE_HTTP3} @@ -2130,7 +2133,7 @@ ssl client hello by lua is running! lua_package_path "../lua-resty-core/lib/?.lua;;"; server { - listen 127.0.0.1:12345 ssl; + listen 127.0.0.1:$TEST_NGINX_RAND_PORT_1 ssl; server_name test.com; ssl_client_hello_by_lua_block { @@ -2162,7 +2165,7 @@ ssl client hello by lua is running! sock:settimeout(2000) - local ok, err = sock:connect("127.0.0.1", 12345) + local ok, err = sock:connect("127.0.0.1", $TEST_NGINX_RAND_PORT_1) if not ok then ngx.say("failed to connect: ", err) return @@ -2565,3 +2568,72 @@ ssl handshake: cdata uthread: hello from f() uthread: killed uthread: failed to kill: already waited or killed + + + +=== TEST 30: ngx.exit(ngx.OK) - no yield +--- http_config + server { + listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl; + server_name test.com; + ssl_client_hello_by_lua_block { + ngx.exit(ngx.OK) + ngx.log(ngx.ERR, "should never reached here...") + } + ssl_certificate ../../cert/test.crt; + ssl_certificate_key ../../cert/test.key; + + server_tokens off; + location /foo { + default_type 'text/plain'; + content_by_lua_block {ngx.status = 201 ngx.say("foo") ngx.exit(201)} + more_clear_headers Date; + } + } +--- config + server_tokens off; + lua_ssl_trusted_certificate ../../cert/test.crt; + lua_ssl_verify_depth 3; + + location /t { + content_by_lua_block { + do + local sock = ngx.socket.tcp() + + sock:settimeout(2000) + + local ok, err = sock:connect("unix:$TEST_NGINX_HTML_DIR/nginx.sock") + if not ok then + ngx.say("failed to connect: ", err) + return + end + + ngx.say("connected: ", ok) + + local sess, err = sock:sslhandshake(false, nil, true, false) + if not sess then + ngx.say("failed to do SSL handshake: ", err) + return + end + + ngx.say("ssl handshake: ", type(sess)) + end -- do + } + } + +--- request +GET /t +--- response_body +connected: 1 +ssl handshake: boolean + +--- error_log eval +[ +'lua_client_hello_by_lua: handler return value: 0, client hello cb exit code: 1', +qr/\[debug\] .*? SSL_do_handshake: 1/, +'lua exit with code 0', +] +--- no_error_log +should never reached here +[alert] +[emerg] diff --git a/src/deps/src/lua-nginx-module/t/166-worker-thread.t b/src/deps/src/lua-nginx-module/t/166-worker-thread.t index fd7fdd756..925a06094 100644 --- a/src/deps/src/lua-nginx-module/t/166-worker-thread.t +++ b/src/deps/src/lua-nginx-module/t/166-worker-thread.t @@ -282,6 +282,8 @@ false : module 'hello' not found.* === TEST 10: the number of Lua VM exceeds the pool size +--- no_http2 +--- quic_max_idle_timeout: 5 --- main_config thread_pool testpool threads=100; --- http_config eval: $::HttpConfig @@ -359,6 +361,8 @@ GET /t === TEST 11: kill uthread before worker thread callback +--- no_http2 +--- quic_max_idle_timeout: 10 --- main_config thread_pool testpool threads=100; --- http_config eval: $::HttpConfig @@ -777,167 +781,7 @@ true : 'a\Zb\Z' -=== TEST 24: ngx.re.match ---- main_config - thread_pool testpool threads=100; ---- http_config eval - "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" ---- config -location /hello { - default_type 'text/plain'; - - content_by_lua_block { - local ok, a, b = ngx.run_worker_thread("testpool", "hello", "hello") - ngx.say(ok, " : ", a, " : ", b) - } -} ---- user_files ->>> hello.lua -local function hello() - local m, err = ngx.re.match("hello, 1234", "([0-9])[0-9]+") - return m[0], m[1] -end -return {hello=hello} ---- request -GET /hello ---- response_body -true : 1234 : 1 - - - -=== TEST 25: ngx.re.find ---- main_config - thread_pool testpool threads=100; ---- http_config eval - "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" ---- config -location /hello { - default_type 'text/plain'; - - content_by_lua_block { - local ok, a = ngx.run_worker_thread("testpool", "hello", "hello") - ngx.say(ok, " : ", a) - } -} ---- user_files ->>> hello.lua -local function hello() - local str = "hello, 1234" - local from, to = ngx.re.find(str, "([0-9])([0-9]+)", "jo", nil, 2) - if from then - return string.sub(str, from, to) - end -end -return {hello=hello} ---- request -GET /hello ---- response_body -true : 234 - - - -=== TEST 26: ngx.re.gmatch ---- main_config - thread_pool testpool threads=100; ---- http_config eval - "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" ---- config -location /hello { - default_type 'text/plain'; - - content_by_lua_block { - local ok, ret = ngx.run_worker_thread("testpool", "hello", "hello") - ngx.say(ok) - ngx.say(ret[1]) - ngx.say(ret[2]) - } -} ---- user_files ->>> hello.lua -local function hello() - local ret = {} - for m in ngx.re.gmatch("hello, world", "[a-z]+", "j") do - if m then - table.insert(ret, m[0]) - end - end - return ret -end -return {hello=hello} ---- request -GET /hello ---- response_body -true -hello -world - - - -=== TEST 27: ngx.re.sub ---- main_config - thread_pool testpool threads=100; ---- http_config eval - "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" ---- config -location /hello { - default_type 'text/plain'; - - content_by_lua_block { - local ok, a, b = ngx.run_worker_thread("testpool", "hello", "hello") - ngx.say(ok) - ngx.say(a) - ngx.say(b) - } -} ---- user_files ->>> hello.lua -local function hello() - local newstr, n = ngx.re.sub("hello, 1234", "[0-9]", "$$") - return newstr, n -end -return {hello=hello} ---- request -GET /hello ---- response_body -true -hello, $234 -1 - - - -=== TEST 28: ngx.re.gsub ---- main_config - thread_pool testpool threads=100; ---- http_config eval - "lua_package_path '$::HtmlDir/?.lua;./?.lua;;';" ---- config -location /hello { - default_type 'text/plain'; - - content_by_lua_block { - local ok, a, b = ngx.run_worker_thread("testpool", "hello", "hello") - ngx.say(ok) - ngx.say(a) - ngx.say(b) - } -} ---- user_files ->>> hello.lua -local function hello() - local newstr, n, err = ngx.re.gsub("hello, world", "([a-z])[a-z]+", "[$0,$1]", "i") - return newstr, n -end -return {hello=hello} ---- request -GET /hello ---- response_body -true -[hello,h], [world,w] -2 - - - -=== TEST 29: ngx.decode_base64 +=== TEST 24: ngx.decode_base64 --- main_config thread_pool testpool threads=100; --- http_config eval @@ -964,7 +808,7 @@ true : hello -=== TEST 30: ngx.crc32_short +=== TEST 25: ngx.crc32_short --- main_config thread_pool testpool threads=100; --- http_config eval @@ -991,7 +835,7 @@ true : 4289425978 -=== TEST 31: ngx.crc32_long +=== TEST 26: ngx.crc32_long --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1018,7 +862,7 @@ true : 4289425978 -=== TEST 32: ngx.md5_bin +=== TEST 27: ngx.md5_bin --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1049,7 +893,7 @@ true : 6c8349cc7260ae62e3b1396831a8398f -=== TEST 33: ngx.md5 +=== TEST 28: ngx.md5 --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1076,7 +920,7 @@ true : 5d41402abc4b2a76b9719d911017c592 -=== TEST 34: ngx.config.debug +=== TEST 29: ngx.config.debug --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1103,7 +947,7 @@ GET /hello -=== TEST 35: ngx.config.prefix +=== TEST 30: ngx.config.prefix --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1130,7 +974,7 @@ GET /hello -=== TEST 36: ngx.config.nginx_version +=== TEST 31: ngx.config.nginx_version --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1157,7 +1001,7 @@ GET /hello -=== TEST 37: ngx.config.nginx_configure +=== TEST 32: ngx.config.nginx_configure --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1184,7 +1028,7 @@ GET /hello -=== TEST 38: ngx.config.ngx_lua_version +=== TEST 33: ngx.config.ngx_lua_version --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1211,7 +1055,7 @@ GET /hello -=== TEST 39: write_log_file +=== TEST 34: write_log_file --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1249,7 +1093,7 @@ true -=== TEST 40: shdict get, int value +=== TEST 35: shdict get, int value --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1282,7 +1126,7 @@ true,8 -=== TEST 41: shdict set nil in main thread +=== TEST 36: shdict set nil in main thread --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1319,7 +1163,7 @@ true,nil -=== TEST 42: shdict set nil in worker thread +=== TEST 37: shdict set nil in worker thread --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1354,7 +1198,9 @@ true,nil -=== TEST 43: shdict get_stale +=== TEST 38: shdict get_stale +For http3: curl: (55) ngtcp2_conn_handle_expiry returned error: ERR_IDLE_CLOSE +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1388,7 +1234,7 @@ true,8 -=== TEST 44: shdict add failed +=== TEST 39: shdict add failed --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1422,7 +1268,7 @@ true,false,exists -=== TEST 45: shdict force add +=== TEST 40: shdict force add --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1458,7 +1304,7 @@ true,true,true,nil -=== TEST 46: shdict replace +=== TEST 41: shdict replace --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1493,7 +1339,7 @@ true,true,nil,8 -=== TEST 47: shdict replace not found +=== TEST 42: shdict replace not found --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1526,7 +1372,7 @@ true,false,not found -=== TEST 48: shdict incr +=== TEST 43: shdict incr --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1560,7 +1406,7 @@ true,9,nil,9 -=== TEST 49: shdict lpush lpop +=== TEST 44: shdict lpush lpop --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1596,7 +1442,7 @@ true,9,2,nil,7 -=== TEST 50: shdict expire ttl +=== TEST 45: shdict expire ttl --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1630,7 +1476,7 @@ true,true,nil,true -=== TEST 51: shdict flush_all +=== TEST 46: shdict flush_all --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1664,7 +1510,7 @@ true,nil,nil -=== TEST 52: shdict get_keys +=== TEST 47: shdict get_keys --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1698,7 +1544,7 @@ true,Jim:King -=== TEST 53: unsupported argument type in self-reference table +=== TEST 48: unsupported argument type in self-reference table --- main_config thread_pool testpool threads=100; --- http_config eval @@ -1727,7 +1573,7 @@ false , suspicious circular references, table depth exceed max depth: 100 in the -=== TEST 54: unsupported argument type in circular-reference table +=== TEST 49: unsupported argument type in circular-reference table --- main_config thread_pool testpool threads=100; --- http_config eval diff --git a/src/deps/src/lua-nginx-module/t/167-server-rewrite.t b/src/deps/src/lua-nginx-module/t/167-server-rewrite.t index 152c5ce35..6aea288ef 100644 --- a/src/deps/src/lua-nginx-module/t/167-server-rewrite.t +++ b/src/deps/src/lua-nginx-module/t/167-server-rewrite.t @@ -79,7 +79,8 @@ server_rewrite_by_lua_block in server } --- request GET /lua ---- raw_response_headers_like: Location: /foo\r\n +--- raw_response_headers_like eval +qr{[Ll]ocation: /foo\r\n} --- response_body_like: 302 Found --- error_code: 302 --- no_error_log @@ -198,6 +199,7 @@ delete thread 1 --- ignore_response --- no_error_log [error] +--- skip_eval: 2:$ENV{TEST_NGINX_USE_HTTP3} diff --git a/src/deps/src/lua-nginx-module/t/186-cosocket-busy-bufs.t b/src/deps/src/lua-nginx-module/t/186-cosocket-busy-bufs.t index e50f62d9e..743944376 100644 --- a/src/deps/src/lua-nginx-module/t/186-cosocket-busy-bufs.t +++ b/src/deps/src/lua-nginx-module/t/186-cosocket-busy-bufs.t @@ -1,10 +1,20 @@ # vim:set ft= ts=4 sw=4 et fdm=marker: -use Test::Nginx::Socket 'no_plan'; + +use Test::Nginx::Socket; use Test::Nginx::Socket::Lua::Stream; log_level('warn'); repeat_each(2); + +if (defined $ENV{TEST_NGINX_USE_HTTP3}) { + plan(skip_all => "HTTP3 does not support client abort"); +} elsif (defined $ENV{TEST_NGINX_USE_HTTP2}) { + plan(skip_all => "HTTP2 does not support client abort"); +} else { + plan tests => repeat_each() * (blocks() * 2); +} + run_tests(); __DATA__ diff --git a/src/deps/src/lua-nginx-module/t/187-ssl-two-verification.t b/src/deps/src/lua-nginx-module/t/187-ssl-two-verification.t new file mode 100644 index 000000000..312847252 --- /dev/null +++ b/src/deps/src/lua-nginx-module/t/187-ssl-two-verification.t @@ -0,0 +1,145 @@ +# vim:set ft= ts=4 sw=4 et fdm=marker: + +use Test::Nginx::Socket::Lua; + +repeat_each(3); + +# All these tests need to have new openssl +my $NginxBinary = $ENV{'TEST_NGINX_BINARY'} || 'nginx'; +my $openssl_version = eval { `$NginxBinary -V 2>&1` }; + +if ($openssl_version =~ m/built with OpenSSL (0\S*|1\.0\S*|1\.1\.0\S*)/) { + plan(skip_all => "too old OpenSSL, need 1.1.1, was $1"); +} elsif ($openssl_version =~ m/running with BoringSSL/) { + plan(skip_all => "does not support BoringSSL"); +} else { + plan tests => repeat_each() * (blocks() * 7); +} + +$ENV{TEST_NGINX_HTML_DIR} ||= html_dir(); +$ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211; + +#log_level 'warn'; +log_level 'debug'; + +no_long_string(); +#no_diff(); + +run_tests(); + +__DATA__ + +=== TEST 1: simple logging +--- http_config + server { + listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl; + #listen 127.0.0.1:4433 ssl; + server_name test.com; + ssl_client_hello_by_lua_block { print("ssl client hello by lua is running!") } + ssl_certificate ../../cert/test.crt; + ssl_certificate_key ../../cert/test.key; + #ssl_trusted_certificate ../../cert/test.crt; + ssl_client_certificate ../../cert/test.crt; + ssl_verify_client on; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + + server_tokens off; + location /foo { + default_type 'text/plain'; + content_by_lua_block { ngx.status = 201 ngx.say("foo") ngx.exit(201) } + log_by_lua_block { + ngx.log(ngx.INFO, "ssl_client_s_dn: ", ngx.var.ssl_client_s_dn) + } + more_clear_headers Date; + } + } +--- config + server_tokens off; + lua_ssl_certificate ../../cert/test.crt; + lua_ssl_certificate_key ../../cert/test.key; + lua_ssl_trusted_certificate ../../cert/test.crt; + + location /t { + content_by_lua_block { + do + local sock = ngx.socket.tcp() + + sock:settimeout(2000) + + local ok, err = sock:connect("unix:$TEST_NGINX_HTML_DIR/nginx.sock") + -- local ok, err = sock:connect("127.0.0.1", 4433) + if not ok then + ngx.say("failed to connect: ", err) + return + end + + ngx.say("connected: ", ok) + + local sess, err = sock:sslhandshake(nil, "test.com", true) + if not sess then + ngx.say("failed to do SSL handshake: ", err) + return + end + + ngx.say("ssl handshake: ", type(sess)) + + local req = "GET /foo HTTP/1.0\r\nHost: test.com\r\nConnection: close\r\n\r\n" + local bytes, err = sock:send(req) + if not bytes then + ngx.say("failed to send http request: ", err) + return + end + + ngx.say("sent http request: ", bytes, " bytes.") + + while true do + local line, err = sock:receive() + if not line then + -- ngx.say("failed to receive response status line: ", err) + break + end + + ngx.say("received: ", line) + end + + local ok, err = sock:close() + ngx.say("close: ", ok, " ", err) + end -- do + -- collectgarbage() + } + } + +--- request +GET /t +--- response_body +connected: 1 +ssl handshake: cdata +sent http request: 56 bytes. +received: HTTP/1.1 201 Created +received: Server: nginx +received: Content-Type: text/plain +received: Content-Length: 4 +received: Connection: close +received: +received: foo +close: 1 nil + +--- error_log +lua ssl server name: "test.com" +ssl_client_s_dn: emailAddress=agentzh@gmail.com,CN=test.com,OU=OpenResty,O=OpenResty,L=San Francisco,ST=California,C=US + +--- no_error_log +[error] +[alert] +--- grep_error_log eval: qr/ssl_client_hello_by_lua\(.*?,|\bssl client hello: connection reusable: \d+|\breusable connection: \d+/ +--- grep_error_log_out eval +# Since nginx version 1.17.9, nginx call ngx_reusable_connection(c, 0) +# before call ssl callback function +$Test::Nginx::Util::NginxVersion >= 1.017009 ? +qr/reusable connection: 0 +ssl client hello: connection reusable: 0 +ssl_client_hello_by_lua\(nginx.conf:\d+\):1: ssl client hello by lua is running!,/ +: qr /reusable connection: 1 +ssl client hello: connection reusable: 1 +reusable connection: 0 +ssl_client_hello_by_lua\(nginx.conf:\d+\):1: ssl client hello by lua is running!,/ diff --git a/src/deps/src/lua-nginx-module/t/cert/http3/http3.crt b/src/deps/src/lua-nginx-module/t/cert/http3/http3.crt new file mode 100644 index 000000000..8683f41ad --- /dev/null +++ b/src/deps/src/lua-nginx-module/t/cert/http3/http3.crt @@ -0,0 +1,29 @@ +-----BEGIN CERTIFICATE----- +MIIFCTCCAvGgAwIBAgIUHLeNm7JwH368JWXBYJ1Dv+xcL6kwDQYJKoZIhvcNAQEL +BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIxMTEwNTA2NTQxNVoXDTQxMDEw +NDA2NTQxNVowFDESMBAGA1UEAwwJbG9jYWxob3N0MIICIjANBgkqhkiG9w0BAQEF +AAOCAg8AMIICCgKCAgEAx5/M18tKWKfacgldf9gBguTdLA3JWiblRWM/38fSZGKL +Mcb1vLErY/qQyLYxoLKBht0FUZAEZ08y/iheYFZT7H082b8bNvwY+v6bScOQOvcX +hkTWNlSQORDH4qIFxVXq0soXga+0ukSZ2RQRcCUWeKUaZwhGCYNIj04/FB9Lef95 +Ku7LkNauTBmRGIwXgQWhfnoPM21o9D9i54R9L2RHU7fGeTGhiS0nCe1nPPB7KBgO +s9rBHMXV9qHxCNMWWiVNsMX049S7aD9yvRrV7NAHssVQdaRR234IPJxb7BYSUPi8 +5U+8l43Ornd+cY/R/sXDQluFidlnZvHT+akdy0ObWDK0lMUweDWvFVLY3ZvMvsGR +rQE8RR5/fy83y7w//0734EBk4ttEzlilmjA8UvnumOpK0UYaW8LkikvxB+48e89s +NOEKZf3Mfw/fDRz0tO+cr4cIgUPQ4ru6KNVnGH/ZiD97AVMPXJO9nPOUIRVH9aXM +wC74CSt5idWOwpTKy+sLg7anM235NvZ9bTiS+V5CTzBlqL/wKzEI0Injds3kBc1a +Y8Lk/cIdNhuwlN01fYluA8XyB3DWoeQYbySEoHC5ksvaFLBM3yPomWrmyM5lJrj5 +QbWa46b0bONJQ2qmrQa5KREVvDthHQvKELsabHX1qbCShSxoG45aclqpmKy2AjcC +AwEAAaNTMFEwHQYDVR0OBBYEFA2T9Sgv31hCl3INL5MB++NrMu0iMB8GA1UdIwQY +MBaAFA2T9Sgv31hCl3INL5MB++NrMu0iMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI +hvcNAQELBQADggIBAJdxtUq4T/sh5Ww7pMOB4+JF5zsxEBpZiFMzT2hYZ+6a2mYh +UTy7ff1lNfNl0BfslaOD404Qt0SSgI2TByLs838/sKpVk+QePcw6kl6IFIPERUBO +uxq/+QXqsDHOXb6m4qpEBmrknUa65dThdUw5r4sHo0XD2l/y2/zEZtd4e3ZGAWts +spdjPBk4UHPtG3p29eY/8ehw+zDXuWG4nlJYjn+6PRnLhvpgt2/E/Wr9PeYcv3IC +UgavxXVtk9fnclg8BuKlnZYki7txn8+F9Rh03CVVZ9R16Q/aVALI2iTs8T4gCt7Z +eexfLGfBkLBkLvpL7wpzxNsvOC2b5bJZCDUTprLVmdpmMQu75qLg1mOfubMo983H +8G91V4XOokRoCRub/SLKA16/gpEwnE2aDsVMUVSxwpRu2Rjw4GpzbCNAHUzmblrh +zYMSAsEuTcsZEAdZQrzmhGc1Yg5Q88V4o+qyywzkgd86O65QUozhnkCs+eS9ikMV +cPLXoW5SDIsrrcoTR6bH5MdDjS7ILKUUC5+x0qo6EhK94Fx49TkRBNIYk3o0fG7j +o/0YvozXjqTRnodYegL4LKoGZyfL4qbuh3t8ZGQ/Z0ECmvjcmJzPyObIiMe2InT3 +GRY+ypPTyeiumjHFFVO0zx+DAv+HFPtq1XaygWvxKY1DTP6FNN0BzQdzAgKm +-----END CERTIFICATE----- diff --git a/src/deps/src/lua-nginx-module/t/cert/http3/http3.key b/src/deps/src/lua-nginx-module/t/cert/http3/http3.key new file mode 100644 index 000000000..5825540f5 --- /dev/null +++ b/src/deps/src/lua-nginx-module/t/cert/http3/http3.key @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDHn8zXy0pYp9py +CV1/2AGC5N0sDclaJuVFYz/fx9JkYosxxvW8sStj+pDItjGgsoGG3QVRkARnTzL+ +KF5gVlPsfTzZvxs2/Bj6/ptJw5A69xeGRNY2VJA5EMfiogXFVerSyheBr7S6RJnZ +FBFwJRZ4pRpnCEYJg0iPTj8UH0t5/3kq7suQ1q5MGZEYjBeBBaF+eg8zbWj0P2Ln +hH0vZEdTt8Z5MaGJLScJ7Wc88HsoGA6z2sEcxdX2ofEI0xZaJU2wxfTj1LtoP3K9 +GtXs0AeyxVB1pFHbfgg8nFvsFhJQ+LzlT7yXjc6ud35xj9H+xcNCW4WJ2Wdm8dP5 +qR3LQ5tYMrSUxTB4Na8VUtjdm8y+wZGtATxFHn9/LzfLvD//TvfgQGTi20TOWKWa +MDxS+e6Y6krRRhpbwuSKS/EH7jx7z2w04Qpl/cx/D98NHPS075yvhwiBQ9Diu7oo +1WcYf9mIP3sBUw9ck72c85QhFUf1pczALvgJK3mJ1Y7ClMrL6wuDtqczbfk29n1t +OJL5XkJPMGWov/ArMQjQieN2zeQFzVpjwuT9wh02G7CU3TV9iW4DxfIHcNah5Bhv +JISgcLmSy9oUsEzfI+iZaubIzmUmuPlBtZrjpvRs40lDaqatBrkpERW8O2EdC8oQ +uxpsdfWpsJKFLGgbjlpyWqmYrLYCNwIDAQABAoICAENb1qESRbn4matVIamb15a1 +ZzQQStsSuNZbERiPspyQ6+sV+aF8HuoTiHtRjxlsYmyBc+P7tqCthsVgFchoGNV5 +xOispaA+HKfE9d1EEgzzh4qU+7tFeYzn7qq4hT37KcuKybfG9DLOJyOqs9+lhBmd +jHUrw4Y+OGOywXImxS8bV2V3QlVTO2kOT3l6/AtbPQ0SXsK5rmqMYPFCMYOmULMd +FembJ6jEBaJB604Sz1vOElf5/qOY1gPszQpvP+GXKMn3YhTmmX4puqu4vGq2H4Lh +Na8cjUqFEn5xPEtDf1a3N/Ygm8B/5zfTtmTXZMKVNLfVbg//vfZsr1xVBmqqG2Zk +PUxZ9pyRn25zAYIgIC6DBgmM32S5Zl0axeoWIHdgOTAOwqLLF/ZFozdVSN+skJhl +q1ndTw+MmVHi19HDUt8YfIICn8g+Dw9NRdX+VjXrRMBweCL41JzHzP6YKo73VJty +WIVt/LwH2sxdGH0QeP6+Dajel3/ouXAcS31ZpeWZ0QUfa5I0DOn50mvZSuaC0m7Z +baHBGqawq9EKdjbU5WN6popOCWCx23BZDorKmPGBQ4x54LxfUeet0HAYjsvzUZ0q +a/AC6pMMHUjG4i5dPhOAhjxkpwfhLjIBTC8VrelGfap50Mlst5InCjClUsSKg43w +tsRg0HQflxYsPXUGtBqxAoIBAQD29Q6gPNsd7JMzmVzK7fy5YaKq7aI/vOU/tp7U +LQqhBfsy70U3UNsclsQQ/1RG2cgpFVctlpE8ITpFqSlUDRtlvrK9NaIPEYBV84Xn +bWPqFjGiRowuXiCR8axbPnsEquO2+VHNuVD/PsCocvbpqtpbfEGmcuyWiO4uFMyW +beOcRxEsn3U7ABZGDIhxYjpmkiVMu1pRjj+ddqtNMia398K86c3ETRg+zrHnpzio +kuhxv6TjtnXT1ibI0yKzdQ5sKpa3DYUN/wJgeFVHsSuCZjCzufcMdjCjG3kTTljT +FrMbweISSTJNs6KsbCqzmc6dmpwuU1ySX07F9sgdJ/7lBCXTAoIBAQDO7wy9Zr8C +Ridte1EaMP04OSfqc2Jha/U2te47R1VDyHKzpFHvHwWHqFng6J181M9iubUsh/63 +d12uyjZoToMgT7AJ7PMwbEKJbMxpIjqF7Dp1aM11TjRq0mQbZ3wkeuYdK7jYc92j +X4hF+tJpCYo/0lMA0UFYhMyUPbi33xqlJKLghVncBYmKHluf3k0g73eRg4MGlYHG +tZ5qVdgwFTztpBb4ySJMOYmjb/OoYPdfoLC8P4ZoHiax4MU30R8b/oGCmYzwOsMC +dNz9dZgeCFo3+lrzMUnIh3y+YcGo2JJ9ZW1LxGvEIU0aEQ7mSPV8k7m3QiH2MiPQ +P0t17w1hQP+NAoIBAHJch1pi9CGGZaB2e8cpsGf0s8yt4P3dLthzbFfbR9nLmEk9 +DnOQSPeTRdaNNuzce1mzHTzqRfVvebm6nX3j1/Uk+0atqI+Lzj9/V1oViThk8LUy +MEZkpnaPUP6sD3HY5TzddilrkPuyhqs7GeaZjSbigtBe1frcDFhgn2FmIApFysk8 +SqB46NelhCXllB/du9ItzKSJ2CHGS4ujFtUIsjCjoPsvrHOhajdZc950sZnDYstk +umnP+QP06lPqeDRVAJhidWRG3EXqU6uwevKW+iSwkJw/u0Q9O7NaC74s++J1xYgs +R1Q+RK3OJXQoXMsVRxAY4HyUEDmSj5cY52wMoKsCggEAQMXu9PJOY8XV3Z02G76t +5IVviyGm79u9G+0Cryd69watcLHEu9a4AmieCZqGgWaTq9F5doDzKDaC6o19TlUV +Em4fKlwzGzsn8KBPs7D1JKp2+f1eIpPiMHW+xB02bKzTjtn6uDY8cEEdBNqoNhy4 +W5XYSW82xyB6cQSI53U8f+jh2umi4Q4SqVsrTvVkqySKBtBlmQ//WVXMSniofRSI +x9IPJry+saFpBfGrEU+Y3yQLbkFsLvcRIai70ubwl/CoVVr/FMsv83rlGalPfkcb +Bl6lTW5mLBDM6ULsPY/c+sde2NKY8QGDgt9IDKlVvjL3dPeMbeXv8+V8F2RGieSw +mQKCAQEA1n4t4CLKZMWZ4oonBEp8u9rjK23ObCSxANsfoIw94v2zHTFqLraFg9aH +s+DIc6M/XWX+Ie55v1QuYt8LrMtc9/rtOJdISybAtnheSqjQ+IkTEvBab/8pqhYg +Jhv/RxmBnCLwiIzRGVpxv9/5bbKXq1JKgdQKO3RBG53lcFFMO1O5srhKqj2KgAHv +XCQxBmtj83e6gp6hvUOU4YC2aKyL9QqNVndGzPJikEguyvJPUFw6RoB0StVQnzLY +UOgIH+8VTjzL90nQ/JitVT8uGdw1Ge5xJfCXDe/PEYpDsY65DKPrIMWFeQs6T/Mb +nvNeBReQOuYYpcCc2GM96RMUz3iyoA== +-----END PRIVATE KEY----- diff --git a/src/deps/src/lua-nginx-module/t/cert/test.crl b/src/deps/src/lua-nginx-module/t/cert/test.crl index 098fd54bf..0abfa77ac 100644 --- a/src/deps/src/lua-nginx-module/t/cert/test.crl +++ b/src/deps/src/lua-nginx-module/t/cert/test.crl @@ -1,11 +1,14 @@ -----BEGIN X509 CRL----- -MIIBjzCB+QIBATANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UEBhMCVVMxEzARBgNV -BAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEjAQBgNVBAoM -CU9wZW5SZXN0eTESMBAGA1UECwwJT3BlblJlc3R5MREwDwYDVQQDDAh0ZXN0LmNv -bTEgMB4GCSqGSIb3DQEJARYRYWdlbnR6aEBnbWFpbC5jb20XDTE0MDcyMTIxNDEy -MloXDTE0MDgyMDIxNDEyMlowHDAaAgkApQ5tVpK3luIXDTE0MDcyMTIxNDEwMlqg -DzANMAsGA1UdFAQEAgIQATANBgkqhkiG9w0BAQUFAAOBgQBDZ6UY0Qg7qDoLrXXl -gJElFilZ7LiKPqjE3+Rfx7XkgdbPxjGCr77TfMm+smdvawk7WHv1AOvRH7kGrgGT -kGJZwqJ4vKa/NpEWJIMAZ1Gq9BIH/Ig6ffmPk+S9ozcVHKJDW7x4nMuotyj1hILN -EePv78DZCYMZgf8WwMElNgz6Hw== +MIICGzCCAQMCAQEwDQYJKoZIhvcNAQELBQAwgZcxCzAJBgNVBAYTAlVTMRMwEQYD +VQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMRIwEAYDVQQK +DAlPcGVuUmVzdHkxEjAQBgNVBAsMCU9wZW5SZXN0eTERMA8GA1UEAwwIdGVzdC5j +b20xIDAeBgkqhkiG9w0BCQEWEWFnZW50emhAZ21haWwuY29tFw0yMzEwMDYwNjM4 +MzlaFw0zMTEyMjMwNjM4MzlaMCcwJQIUImcuJ8MJpeNhvYBEoEGGz5oCBg4XDTIz +MTAwNjA2MjkyNVqgDjAMMAoGA1UdFAQDAgEEMA0GCSqGSIb3DQEBCwUAA4IBAQBj +FciorrAuXxn1ULW0XJ7PElwTxZtBrb838EHYvkZ5OdT5tZcucYR6XTZpfT1Up/Px +rC9EZ1/aZ0wSQfYEQuctafyVCJoPN71IV9IWpPTWm8JyEvnE1W3SgHJujItanyZ3 +aMDihljxV9eKyEQnZPQZkaOjAKhj8d2/XZLQ3uIrjWy+/OxcaBQK4a8bDoSM3GZT +J6YCD2UBVYKSiROMZZAj3m1thLAGm1RM7A6vjEcH7rPyoxhok5SdxXH5ERY94/ro +McjNCv6zV8/Ue5/+ajz5pu/48T901mlIicHry8uImJvlnqAXlH8ReJ+hiSfGhbZ5 +WYNf0wN81NXwTxPIb+v2 -----END X509 CRL----- diff --git a/src/deps/src/lua-nginx-module/t/cert/test.crt b/src/deps/src/lua-nginx-module/t/cert/test.crt index a69a01141..9fed1bc3b 100644 --- a/src/deps/src/lua-nginx-module/t/cert/test.crt +++ b/src/deps/src/lua-nginx-module/t/cert/test.crt @@ -1,17 +1,22 @@ -----BEGIN CERTIFICATE----- -MIICqTCCAhICCQClDm1WkreW4jANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UEBhMC -VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28x -EjAQBgNVBAoMCU9wZW5SZXN0eTESMBAGA1UECwwJT3BlblJlc3R5MREwDwYDVQQD -DAh0ZXN0LmNvbTEgMB4GCSqGSIb3DQEJARYRYWdlbnR6aEBnbWFpbC5jb20wIBcN -MTQwNzIxMDMyMzQ3WhgPMjE1MTA2MTMwMzIzNDdaMIGXMQswCQYDVQQGEwJVUzET -MBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzESMBAG -A1UECgwJT3BlblJlc3R5MRIwEAYDVQQLDAlPcGVuUmVzdHkxETAPBgNVBAMMCHRl -c3QuY29tMSAwHgYJKoZIhvcNAQkBFhFhZ2VudHpoQGdtYWlsLmNvbTCBnzANBgkq -hkiG9w0BAQEFAAOBjQAwgYkCgYEA6P18zUvtmaKQK2xePy8ZbFwSyTLw+jW6t9eZ -aiTec8X3ibN9WemrxHzkTRikxP3cAQoITRuZiQvF4Q7DO6wMkz/b0zwfgX5uedGq -047AJP6n/mwlDOjGSNomBLoXQzo7tVe60ikEm3ZyDUqnJPJMt3hImO5XSop4MPMu -Za9WhFcCAwEAATANBgkqhkiG9w0BAQUFAAOBgQA4OBb9bOyWB1//93nSXX1mdENZ -IQeyTK0Dd6My76lnZxnZ4hTWrvvd0b17KLDU6JnS2N5ee3ATVkojPidRLWLIhnh5 -0eXrcKalbO2Ce6nShoFvQCQKXN2Txmq2vO/Mud2bHAWwJALg+qi1Iih/gVYB9sct -FLg8zFOzRlYiU+6Mmw== +MIIDtzCCAp8CFCJnLifDCaXjYb2ARKBBhs+aAgYOMA0GCSqGSIb3DQEBCwUAMIGX +MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2Fu +IEZyYW5jaXNjbzESMBAGA1UECgwJT3BlblJlc3R5MRIwEAYDVQQLDAlPcGVuUmVz +dHkxETAPBgNVBAMMCHRlc3QuY29tMSAwHgYJKoZIhvcNAQkBFhFhZ2VudHpoQGdt +YWlsLmNvbTAeFw0yMzA5MDUwNDE5MjhaFw0zMzA5MDIwNDE5MjhaMIGXMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5j +aXNjbzESMBAGA1UECgwJT3BlblJlc3R5MRIwEAYDVQQLDAlPcGVuUmVzdHkxETAP +BgNVBAMMCHRlc3QuY29tMSAwHgYJKoZIhvcNAQkBFhFhZ2VudHpoQGdtYWlsLmNv +bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJzRMFoLDuYOwJ8szrS4 +nOibtiimiXZJGx3I/RcFZxaH4nL/WcEb1fwftMQxx73IBJnqnDYkDOzUmzItPMn0 +t2WrNYesC5GqLNRm87m6PVt010tZvq/WxTn6+9qruiGm1PhFxzLQfrClpEeOshlG +UeoQjPOMrhCmofDM2NQo3D4wIQT0kCJxIPq6wCZt22/Yqz1EmR0UnF/R3ZtiB8O+ +SQGcsUKy4se3919xq+ZkzBdMxLneO5sofUiDC9MgRfiU960tbHPGX9I9P+kLK89S +yajPEYaRUkSBFjV5kdDK3+L6XckdMbY2pvwhAnVXSmd13Bf2V9XisUrX2Mr4YlnS +sy0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAVPY/z6Mvjg5EGHzU8bXyuXqxrx8Q +GBwf3PY25aDF6ofRrTCzMdIhthv8eRtGwHinkpgaK34D7hI/dPB7aswQTzED5c+l +S2au5OzzCj454oXdhSRA5Rt0mu/+pxmQ+iNk+7XJxgTN0mk1dYQqodyZ+vC4NIYb +javMlU4zDm4JPtwDs0Mz/d7gf14MU60jppF2vl6AYFHKYBLMHBmqxjy6H9YHjRjQ +oe4TNpn0zxJAPu5LqMkfB2+eLOe6ced7DcLLbbeVJ4Xtqj6Y5KsAyVojWQxrk4vW +3WO/953pHofO5F2ricS/rsf+5ivTmfiP8mQYTtp7k3T11sIZ4DOmtNwO4A== -----END CERTIFICATE----- diff --git a/src/deps/src/lua-nginx-module/t/cert/test.key b/src/deps/src/lua-nginx-module/t/cert/test.key index 6c1352711..4c8c905b2 100644 --- a/src/deps/src/lua-nginx-module/t/cert/test.key +++ b/src/deps/src/lua-nginx-module/t/cert/test.key @@ -1,15 +1,28 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXgIBAAKBgQDo/XzNS+2ZopArbF4/LxlsXBLJMvD6Nbq315lqJN5zxfeJs31Z -6avEfORNGKTE/dwBCghNG5mJC8XhDsM7rAyTP9vTPB+Bfm550arTjsAk/qf+bCUM -6MZI2iYEuhdDOju1V7rSKQSbdnINSqck8ky3eEiY7ldKingw8y5lr1aEVwIDAQAB -AoGBANgB66sKMga2SKN5nQdHS3LDCkevCutu1OWM5ZcbB4Kej5kC57xsf+tzPtab -emeIVGhCPOAALqB4YcT+QtMX967oM1MjcFbtH7si5oq6UYyp3i0G9Si6jIoVHz3+ -8yOUaqwKbK+bRX8VS0YsHZmBsPK5ryN50iUwsU08nemoA94BAkEA9GS9Q5OPeFkM -tFxsIQ1f2FSsZAuN/1cpZgJqY+YaAN7MSPGTWyfd7nWG/Zgk3GO9/2ihh4gww+7B -To09GkmW4QJBAPQOHC2V+t2TA98+6Lj6+TYwcGEkhOENfVpH25mQ+kXgF/1Bd6rA -nosT1bdAY+SnmWXbSw6Kv5C20Em+bEX8WjcCQCSRRjhsRdVODbaW9Z7kb2jhEoJN -sEt6cTlQNzcHYPCsZYisjM3g4zYg47fiIfHQAsfKkhDDcfh/KvFj9LaQOEECQQCH -eBWYEDpSJ7rsfqT7mQQgWj7nDThdG/nK1TxGP71McBmg0Gg2dfkLRhVJRQqt74Is -kc9V4Rp4n6F6baL4Lh19AkEA6pZZer0kg3Kv9hjhaITIKUYdfIp9vYnDRWbQlBmR -atV8V9u9q2ETZvqfHpN+9Lu6NYR4yXIEIRf1bnIZ/mr9eQ== ------END RSA PRIVATE KEY----- +-----BEGIN PRIVATE KEY----- +MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCc0TBaCw7mDsCf +LM60uJzom7Yopol2SRsdyP0XBWcWh+Jy/1nBG9X8H7TEMce9yASZ6pw2JAzs1Jsy +LTzJ9LdlqzWHrAuRqizUZvO5uj1bdNdLWb6v1sU5+vvaq7ohptT4Rccy0H6wpaRH +jrIZRlHqEIzzjK4QpqHwzNjUKNw+MCEE9JAicSD6usAmbdtv2Ks9RJkdFJxf0d2b +YgfDvkkBnLFCsuLHt/dfcavmZMwXTMS53jubKH1IgwvTIEX4lPetLWxzxl/SPT/p +CyvPUsmozxGGkVJEgRY1eZHQyt/i+l3JHTG2Nqb8IQJ1V0pnddwX9lfV4rFK19jK ++GJZ0rMtAgMBAAECggEABjaOkcllis1o/yrVZMPPabLpAHV6tZ5MuKfNiUOMSPr+ +HfF1OFQL7MxCdfyFQ1prqOp/9nAut+puMgp99wAfDQ7qanNGq7vgQKkfPSD+dy4V +rUquELBJH6nh9SZqfpSqKaJgHlNe6vehHuRYikJRkrJwVzegGjuekm3B+y6Zl/gc +e0p5Ha3MTLTFjocwYzgTjJlxD40wlbjpuVnmzKjo8AKNv1F1azMaqBmt1VfPiDn0 +Xyq4SPEsWKnEAl2kZdaIBR6zIx7Z3zNUwkfb32QwNoSyo8wS7lCgf2GVS7r1Eul6 +iiCE/Gd7w10alW4Pu96shVqkvKn7ROF2nBP9xOSPwQKBgQDCuD6mlNpA07iOX364 +aAzIAYookceVA0I9L/fbOQW7RgpvYpM8lxr31TQ3fBDkXSgjzMMYjnk4kz+xN+BB +WFdjb4raUBtrvip8Q8QZ53DVQK/LodHh0XhipbOxZrDm+6o5nQD0fTqHCBIHSVFF +tXX2Y90t1cxWMMleRhfNEuzkQQKBgQDOK0rs7mf04Xhc4ZIRIxOtNFnthGp4Kqp7 +SD8VQpbPOLV8iqZEtXIy/hvoTpfQW30c1931KgDQ3Pv5MZYpI7PLqrqkj4tGCQ91 +DJ03GWkSXcMwlPmJRbvgWIeCLgShU5PLxmQu3mH2DP+uGFUBq5/6miDDVjF9z6vb +BwYlG66j7QKBgA0n/bOrowN2SqXz9c/n19U7pWYQU3fR/Iu9zfVV6Pk6RkI4WtJh +M0VDdn+5Njr3wFqK3zOtjKsx57/FkrVXjq/9PVh6yR+CfcRfn8RQSuNdt4L+r/ud +95BSuc1mrtUsc9for8PVIjs1ZGJxpbgcBphbLvqF04SPT0u7WKhWewMBAoGAcJO/ +RAUiitsbaExcADORKQDvIf0uThOuJ8dZevhzdQ/YOftTsy0JAMM05fMUfteWR8uw +DZE0BNjGVlo3TpuKL+o4JGele0azRAzxRAcCEt9UGBEg+U40utpclD8glB8ZEypv +xg/0mfCbJKtwr4rRvnuu7DsCp1pg0ybQui6VfDkCgYBXHwcrZwmv7kgr4pUG6oZj +fzjFenQFqibvb2h7QESyCW13O885GxU13DKv4zg1yi6EqPIopz16qCiUNCvWr5Us +6sI74wEVI3MzmzG0Htgl29q5yWpeY+7libC/fbZYG8GFgdINq58ko9be1u/8644S +t2hoKM9/vrVFh9p9qGzckg== +-----END PRIVATE KEY----- diff --git a/src/deps/src/lua-nginx-module/util/build-with-dd.sh b/src/deps/src/lua-nginx-module/util/build-with-dd.sh index 41ecc7268..a56a89119 100755 --- a/src/deps/src/lua-nginx-module/util/build-with-dd.sh +++ b/src/deps/src/lua-nginx-module/util/build-with-dd.sh @@ -12,12 +12,30 @@ force=$2 add_fake_shm_module="--add-module=$root/t/data/fake-shm-module" +add_http3_module=--with-http_v3_module +answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1` +if [ "$OPENSSL_VER" = "1.1.0l" ] || [ "$answer" = "N" ]; then + add_http3_module="" +fi + +disable_pcre2=--without-pcre2 +answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1` +if [ "$answer" = "N" ] || [ "$USE_PCRE2" = "Y" ]; then + disable_pcre2="" +fi +if [ "$USE_PCRE2" = "Y" ]; then + PCRE_INC=$PCRE2_INC + PCRE_LIB=$PCRE2_LIB +fi + time ngx-build $force $version \ --with-threads \ --with-pcre-jit \ + $disable_pcre2 \ --with-ipv6 \ --with-cc-opt="-DNGX_LUA_USE_ASSERT -I$PCRE_INC -I$OPENSSL_INC -DDDEBUG=1" \ --with-http_v2_module \ + $add_http3_module \ --with-http_realip_module \ --with-http_ssl_module \ --add-module=$root/../ndk-nginx-module \ diff --git a/src/deps/src/lua-nginx-module/util/build-without-ssl.sh b/src/deps/src/lua-nginx-module/util/build-without-ssl.sh index 906be7570..c52d5873f 100755 --- a/src/deps/src/lua-nginx-module/util/build-without-ssl.sh +++ b/src/deps/src/lua-nginx-module/util/build-without-ssl.sh @@ -24,9 +24,20 @@ force=$2 add_fake_shm_module="--add-module=$root/t/data/fake-shm-module" +disable_pcre2=--without-pcre2 +answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1` +if [ "$answer" = "N" ] || [ "$USE_PCRE2" = "Y" ]; then + disable_pcre2="" +fi +if [ "$USE_PCRE2" = "Y" ]; then + PCRE_INC=$PCRE2_INC + PCRE_LIB=$PCRE2_LIB +fi + time ngx-build $force $version \ --with-threads \ --with-pcre-jit \ + $disable_pcre2 \ --with-ipv6 \ --with-cc-opt="-DNGX_LUA_USE_ASSERT -I$PCRE_INC" \ --with-http_v2_module \ diff --git a/src/deps/src/lua-nginx-module/util/build.sh b/src/deps/src/lua-nginx-module/util/build.sh index 713b8482d..41896f2c7 100755 --- a/src/deps/src/lua-nginx-module/util/build.sh +++ b/src/deps/src/lua-nginx-module/util/build.sh @@ -24,12 +24,30 @@ force=$2 add_fake_shm_module="--add-module=$root/t/data/fake-shm-module" +add_http3_module=--with-http_v3_module +answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1` +if [ "$OPENSSL_VER" = "1.1.0l" ] || [ "$answer" = "N" ]; then + add_http3_module="" +fi + +disable_pcre2=--without-pcre2 +answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1` +if [ "$answer" = "N" ] || [ "$USE_PCRE2" = "Y" ]; then + disable_pcre2="" +fi +if [ "$USE_PCRE2" = "Y" ]; then + PCRE_INC=$PCRE2_INC + PCRE_LIB=$PCRE2_LIB +fi + time ngx-build $force $version \ --with-threads \ --with-pcre-jit \ + $disable_pcre2 \ --with-ipv6 \ --with-cc-opt="-DNGX_LUA_USE_ASSERT -I$PCRE_INC -I$OPENSSL_INC" \ --with-http_v2_module \ + $add_http3_module \ --with-http_realip_module \ --with-http_ssl_module \ --add-module=$root/../ndk-nginx-module \ diff --git a/src/deps/src/lua-nginx-module/util/ver-ge b/src/deps/src/lua-nginx-module/util/ver-ge new file mode 100755 index 000000000..8d7a401e9 --- /dev/null +++ b/src/deps/src/lua-nginx-module/util/ver-ge @@ -0,0 +1,41 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +sub usage { + die "Usage: $0 \n"; +} + +my $a = shift or usage(); +my $b = shift or usage(); + +my @as = split /\./, $a; +my @bs = split /\./, $b; + +my $n = @as > @bs ? scalar(@as) : scalar(@bs); + +for (my $i = 0; $i < $n; $i++) { + my $x = $as[$i]; + my $y = $bs[$i]; + + if (!defined $x) { + $x = 0; + } + + if (!defined $y) { + $y = 0; + } + + if ($x > $y) { + print "Y\n"; + exit; + + } elsif ($x < $y) { + print "N\n"; + exit; + } +} + +print "Y\n"; + diff --git a/src/deps/src/lua-nginx-module/valgrind.suppress b/src/deps/src/lua-nginx-module/valgrind.suppress index 8761fb350..743fb67d7 100644 --- a/src/deps/src/lua-nginx-module/valgrind.suppress +++ b/src/deps/src/lua-nginx-module/valgrind.suppress @@ -234,3 +234,73 @@ fun:ngx_pass_open_channel fun:ngx_start_privileged_agent_processes } +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:ngx_alloc + fun:ngx_regex_malloc + fun:pcre2_compile_context_create_8 + fun:ngx_regex_compile + fun:ngx_http_regex_compile + fun:ngx_http_core_regex_location + fun:ngx_http_core_location + fun:ngx_conf_handler + fun:ngx_conf_parse + fun:ngx_http_core_server + fun:ngx_conf_handler + fun:ngx_conf_parse + fun:ngx_http_block + fun:ngx_conf_handler + fun:ngx_conf_parse + fun:ngx_init_cycle + fun:main +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:ngx_alloc + fun:ngx_regex_malloc + fun:pcre2_compile_context_create_8 + fun:ngx_regex_compile + fun:ngx_http_regex_compile + fun:ngx_http_rewrite + fun:ngx_conf_handler + fun:ngx_conf_parse + fun:ngx_http_core_location + fun:ngx_conf_handler + fun:ngx_conf_parse + fun:ngx_http_core_server + fun:ngx_conf_handler + fun:ngx_conf_parse + fun:ngx_http_block + fun:ngx_conf_handler + fun:ngx_conf_parse + fun:ngx_init_cycle + fun:main +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:ngx_alloc + fun:ngx_regex_malloc + fun:pcre2_compile_context_create_8 + fun:ngx_regex_compile + fun:ngx_http_regex_compile + fun:ngx_http_rewrite + fun:ngx_conf_handler + fun:ngx_conf_parse + fun:ngx_http_core_server + fun:ngx_conf_handler + fun:ngx_conf_parse + fun:ngx_http_block + fun:ngx_conf_handler + fun:ngx_conf_parse + fun:ngx_init_cycle + fun:main +} diff --git a/src/deps/src/lua-resty-core/.travis.yml b/src/deps/src/lua-resty-core/.travis.yml index 2223d31ba..3aadce918 100644 --- a/src/deps/src/lua-resty-core/.travis.yml +++ b/src/deps/src/lua-resty-core/.travis.yml @@ -34,9 +34,13 @@ env: - LUA_INCLUDE_DIR=$LUAJIT_INC - LUA_CMODULE_DIR=/lib - PCRE_VER=8.45 + - PCRE2_VER=10.37 - PCRE_PREFIX=/opt/pcre + - PCRE2_PREFIX=/opt/pcre2 - PCRE_LIB=$PCRE_PREFIX/lib + - PCRE2_LIB=$PCRE2_PREFIX/lib - PCRE_INC=$PCRE_PREFIX/include + - PCRE2_INC=$PCRE2_PREFIX/include - OPENSSL_PREFIX=/opt/ssl - OPENSSL_LIB=$OPENSSL_PREFIX/lib - OPENSSL_INC=$OPENSSL_PREFIX/include @@ -45,7 +49,8 @@ env: - TEST_NGINX_RANDOMIZE=1 - LUACHECK_VER=0.21.1 matrix: - - NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.1u OPENSSL_PATCH_VER=1.1.1f + - NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w OPENSSL_PATCH_VER=1.1.1f USE_PCRE2=Y + - NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.1w OPENSSL_PATCH_VER=1.1.1f services: - memcache @@ -60,7 +65,8 @@ before_install: install: - if [ ! -d download-cache ]; then mkdir download-cache; fi - if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/old/${OPENSSL_VER//[a-z]/}/openssl-$OPENSSL_VER.tar.gz; fi - - if [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -P download-cache http://ftp.cs.stanford.edu/pub/exim/pcre/pcre-$PCRE_VER.tar.gz; fi + - if [ "$USE_PCRE2" != "Y" ] && [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -P download-cache http://ftp.cs.stanford.edu/pub/exim/pcre/pcre-$PCRE_VER.tar.gz; fi + - if [ "$USE_PCRE2" = "Y" ] && [ ! -f download-cache/pcre2-$PCRE2_VER.tar.gz ]; then wget -P download-cache https://downloads.sourceforge.net/project/pcre/pcre2/${PCRE2_VER}/pcre2-${PCRE2_VER}.tar.gz; fi - git clone https://github.com/openresty/openresty.git ../openresty - git clone https://github.com/openresty/openresty-devel-utils.git - git clone https://github.com/simpl/ngx_devel_kit.git ../ndk-nginx-module @@ -88,18 +94,20 @@ script: - make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - sudo make PATH=$PATH install_sw > build.log 2>&1 || (cat build.log && exit 1) - cd ../mockeagain/ && make CC=$CC -j$JOBS && cd .. - - tar zxf download-cache/pcre-$PCRE_VER.tar.gz - - cd pcre-$PCRE_VER/ - - ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > build.log 2>&1 || (cat build.log && exit 1) - - make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - - sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1) - - cd .. + - if [ "$USE_PCRE2" != "Y" ]; then tar zxf download-cache/pcre-$PCRE_VER.tar.gz; cd pcre-$PCRE_VER/; ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi + - if [ "$USE_PCRE2" = "Y" ]; then tar zxf download-cache/pcre2-$PCRE2_VER.tar.gz; cd pcre2-$PCRE2_VER/; ./configure --prefix=$PCRE2_PREFIX --enable-jit --enable-utf > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi - export PATH=$PWD/work/nginx/sbin:$PWD/openresty-devel-utils:$PATH - export LD_PRELOAD=$PWD/mockeagain/mockeagain.so - export LD_LIBRARY_PATH=$PWD/mockeagain:$LD_LIBRARY_PATH - export TEST_NGINX_RESOLVER=8.8.4.4 - export NGX_BUILD_CC=$CC - - ngx-build $NGINX_VERSION --with-ipv6 --with-http_realip_module --with-http_ssl_module --with-pcre-jit --with-cc-opt="-I$OPENSSL_INC -I$PCRE_INC" --with-ld-opt="-L$OPENSSL_LIB -Wl,-rpath,$OPENSSL_LIB -L$PCRE_LIB -Wl,-rpath,$PCRE_LIB" --add-module=../ndk-nginx-module --add-module=../echo-nginx-module --add-module=../set-misc-nginx-module --add-module=../headers-more-nginx-module --add-module=../lua-nginx-module --with-debug --with-stream_ssl_module --with-stream --with-ipv6 --add-module=../stream-lua-nginx-module > build.log 2>&1 || (cat build.log && exit 1) + - export add_http3_module=--with-http_v3_module + - export disable_pcre2=--without-pcre2 + - answer=`util/ver-ge "$NGINX_VERSION" 1.25.1` + - if [ "$OPENSSL_VER" = "1.1.0l" ] || [ "$answer" = "N" ]; then add_http3_module=""; fi + - if [ "$answer" = "N" ] || [ "$USE_PCRE2" = "Y" ]; then disable_pcre2=""; fi + - if [ "$USE_PCRE2" = "Y" ]; then PCRE_INC=$PCRE2_INC; PCRE_LIB=$PCRE2_LIB; fi + - ngx-build $NGINX_VERSION --with-ipv6 $disable_pcre2 $add_http3_module --with-http_realip_module --with-http_ssl_module --with-pcre-jit --with-cc-opt="-I$OPENSSL_INC -I$PCRE_INC" --with-ld-opt="-L$OPENSSL_LIB -Wl,-rpath,$OPENSSL_LIB -L$PCRE_LIB -Wl,-rpath,$PCRE_LIB" --add-module=../ndk-nginx-module --add-module=../echo-nginx-module --add-module=../set-misc-nginx-module --add-module=../headers-more-nginx-module --add-module=../lua-nginx-module --with-debug --with-stream_ssl_module --with-stream --with-ipv6 --add-module=../stream-lua-nginx-module > build.log 2>&1 || (cat build.log && exit 1) - nginx -V - ldd `which nginx`|grep -E 'luajit|ssl|pcre' - prove -I. -Itest-nginx/lib -j$JOBS -r t diff --git a/src/deps/src/lua-resty-core/README.markdown b/src/deps/src/lua-resty-core/README.markdown index ea5212d8f..ddf605986 100644 --- a/src/deps/src/lua-resty-core/README.markdown +++ b/src/deps/src/lua-resty-core/README.markdown @@ -55,7 +55,7 @@ This library is production ready. Synopsis ======== -This library is automatically loaded by default in OpenResty 1.15.8.1. This +This library is automatically loaded by default since OpenResty 1.15.8.1. This behavior can be disabled via the [lua_load_resty_core](https://github.com/openresty/lua-nginx-module#lua_load_resty_core) directive, but note that the use of this library is vividly recommended, as its @@ -112,8 +112,8 @@ of this library in the particular OpenResty release you are using. Otherwise you into serious compatibility issues. * LuaJIT 2.1 (for now, it is the v2.1 git branch in the official luajit-2.0 git repository: http://luajit.org/download.html ) -* [ngx_http_lua_module](https://github.com/openresty/lua-nginx-module) v0.10.21. -* [ngx_stream_lua_module](https://github.com/openresty/stream-lua-nginx-module) v0.0.11. +* [ngx_http_lua_module](https://github.com/openresty/lua-nginx-module) v0.10.25. +* [ngx_stream_lua_module](https://github.com/openresty/stream-lua-nginx-module) v0.0.13. * [lua-resty-lrucache](https://github.com/openresty/lua-resty-lrucache) [Back to TOC](#table-of-contents) diff --git a/src/deps/src/lua-resty-core/lib/ngx/balancer.md b/src/deps/src/lua-resty-core/lib/ngx/balancer.md index 9f024671e..ef2f124c4 100644 --- a/src/deps/src/lua-resty-core/lib/ngx/balancer.md +++ b/src/deps/src/lua-resty-core/lib/ngx/balancer.md @@ -29,7 +29,7 @@ Table of Contents Status ====== -This Lua module is currently considered experimental. +This Lua module is production ready. Synopsis ======== diff --git a/src/deps/src/lua-resty-core/lib/ngx/errlog.md b/src/deps/src/lua-resty-core/lib/ngx/errlog.md index 1b28fee74..fca02ed02 100644 --- a/src/deps/src/lua-resty-core/lib/ngx/errlog.md +++ b/src/deps/src/lua-resty-core/lib/ngx/errlog.md @@ -26,9 +26,7 @@ Table of Contents Status ====== -This Lua module is currently considered experimental. - -The API is still in flux and may change in the future without notice. +This Lua module is production ready. Synopsis ======== diff --git a/src/deps/src/lua-resty-core/lib/ngx/ocsp.md b/src/deps/src/lua-resty-core/lib/ngx/ocsp.md index 5c33bf258..77e4b8ad5 100644 --- a/src/deps/src/lua-resty-core/lib/ngx/ocsp.md +++ b/src/deps/src/lua-resty-core/lib/ngx/ocsp.md @@ -26,7 +26,7 @@ Table of Contents Status ====== -This Lua module is currently considered experimental. +This Lua module is production ready. Synopsis ======== diff --git a/src/deps/src/lua-resty-core/lib/ngx/pipe.md b/src/deps/src/lua-resty-core/lib/ngx/pipe.md index 131c4da3c..43569cb5d 100644 --- a/src/deps/src/lua-resty-core/lib/ngx/pipe.md +++ b/src/deps/src/lua-resty-core/lib/ngx/pipe.md @@ -37,7 +37,7 @@ Table of Contents Status ====== -This Lua module is currently considered experimental. +This Lua module is production ready. Synopsis ======== diff --git a/src/deps/src/lua-resty-core/lib/ngx/process.md b/src/deps/src/lua-resty-core/lib/ngx/process.md index 250356bc6..3dc18656b 100644 --- a/src/deps/src/lua-resty-core/lib/ngx/process.md +++ b/src/deps/src/lua-resty-core/lib/ngx/process.md @@ -25,8 +25,7 @@ Table of Contents Status ====== -This Lua module is currently considered experimental. -The API is still in flux and may change in the future without notice. +This Lua module is production ready. Synopsis ======== diff --git a/src/deps/src/lua-resty-core/lib/ngx/re.md b/src/deps/src/lua-resty-core/lib/ngx/re.md index c946bbd76..709d1d247 100644 --- a/src/deps/src/lua-resty-core/lib/ngx/re.md +++ b/src/deps/src/lua-resty-core/lib/ngx/re.md @@ -24,7 +24,7 @@ Table of Contents Status ====== -This Lua module is currently considered experimental. +This Lua module is production ready. Synopsis ======== diff --git a/src/deps/src/lua-resty-core/lib/ngx/req.md b/src/deps/src/lua-resty-core/lib/ngx/req.md index c1beedf1c..47e00461f 100644 --- a/src/deps/src/lua-resty-core/lib/ngx/req.md +++ b/src/deps/src/lua-resty-core/lib/ngx/req.md @@ -22,7 +22,7 @@ Table of Contents Status ====== -This Lua module is currently considered experimental. +This Lua module is production ready. Synopsis ======== diff --git a/src/deps/src/lua-resty-core/lib/ngx/resp.md b/src/deps/src/lua-resty-core/lib/ngx/resp.md index f8253629a..5ad8e249d 100644 --- a/src/deps/src/lua-resty-core/lib/ngx/resp.md +++ b/src/deps/src/lua-resty-core/lib/ngx/resp.md @@ -22,7 +22,7 @@ Table of Contents Status ====== -This Lua module is currently considered experimental. +This Lua module is production ready. Synopsis ======== diff --git a/src/deps/src/lua-resty-core/lib/ngx/ssl/clienthello.lua b/src/deps/src/lua-resty-core/lib/ngx/ssl/clienthello.lua index b08351813..732b74019 100644 --- a/src/deps/src/lua-resty-core/lib/ngx/ssl/clienthello.lua +++ b/src/deps/src/lua-resty-core/lib/ngx/ssl/clienthello.lua @@ -193,12 +193,12 @@ end local prot_map = { - ["SSLv2"] = 0x0002, - ["SSLv3"] = 0x0004, - ["TLSv1"] = 0x0008, - ["TLSv1.1"] = 0x0010, - ["TLSv1.2"] = 0x0020, - ["TLSv1.3"] = 0x0040 + ["SSLv2"] = 0x0002, + ["SSLv3"] = 0x0004, + ["TLSv1"] = 0x0008, + ["TLSv1.1"] = 0x0010, + ["TLSv1.2"] = 0x0020, + ["TLSv1.3"] = 0x0040 } diff --git a/src/deps/src/lua-resty-core/lib/ngx/ssl/clienthello.md b/src/deps/src/lua-resty-core/lib/ngx/ssl/clienthello.md index be4a6782a..0ebff4052 100644 --- a/src/deps/src/lua-resty-core/lib/ngx/ssl/clienthello.md +++ b/src/deps/src/lua-resty-core/lib/ngx/ssl/clienthello.md @@ -25,7 +25,7 @@ Table of Contents Status ====== -This Lua module is currently considered experimental. +This Lua module is production ready. Synopsis ======== diff --git a/src/deps/src/lua-resty-core/lib/resty/core/base.lua b/src/deps/src/lua-resty-core/lib/resty/core/base.lua index 540a4586a..3d142f564 100644 --- a/src/deps/src/lua-resty-core/lib/resty/core/base.lua +++ b/src/deps/src/lua-resty-core/lib/resty/core/base.lua @@ -19,22 +19,22 @@ local FREE_LIST_REF = 0 if subsystem == 'http' then if not ngx.config or not ngx.config.ngx_lua_version - or ngx.config.ngx_lua_version ~= 10025 + or ngx.config.ngx_lua_version ~= 10026 then - error("ngx_http_lua_module 0.10.25 required") + error("ngx_http_lua_module 0.10.26 required") end elseif subsystem == 'stream' then if not ngx.config or not ngx.config.ngx_lua_version - or ngx.config.ngx_lua_version ~= 13 + or ngx.config.ngx_lua_version ~= 14 then - error("ngx_stream_lua_module 0.0.13 required") + error("ngx_stream_lua_module 0.0.14 required") end else - error("ngx_http_lua_module 0.10.25 or " - .. "ngx_stream_lua_module 0.0.13 required") + error("ngx_http_lua_module 0.10.26 or " + .. "ngx_stream_lua_module 0.0.14 required") end @@ -141,7 +141,7 @@ local c_buf_type = ffi.typeof("char[?]") local _M = new_tab(0, 18) -_M.version = "0.1.27" +_M.version = "0.1.28" _M.new_tab = new_tab _M.clear_tab = clear_tab diff --git a/src/deps/src/lua-resty-core/lib/resty/core/regex.lua b/src/deps/src/lua-resty-core/lib/resty/core/regex.lua index 90fd835e9..fe2c811ce 100644 --- a/src/deps/src/lua-resty-core/lib/resty/core/regex.lua +++ b/src/deps/src/lua-resty-core/lib/resty/core/regex.lua @@ -82,7 +82,7 @@ if not pcall(function() pcre_ver = ffi_string(pcre_ver_fn()) end) then end -local MAX_ERR_MSG_LEN = 128 +local MAX_ERR_MSG_LEN = 256 local FLAG_COMPILE_ONCE = 0x01 @@ -102,6 +102,7 @@ local PCRE_DUPNAMES = 0x0080000 local PCRE_JAVASCRIPT_COMPAT = 0x2000000 +-- PCRE2_ERROR_NOMATCH uses the same value local PCRE_ERROR_NOMATCH = -1 @@ -135,22 +136,44 @@ local ngx_lua_ffi_script_eval_data -- TODO: improve this workaround when PCRE allows for unspecifying the MAP_JIT -- option. local no_jit_in_init +local pcre_ver_num + +local maj, min = string.match(pcre_ver, "^(%d+)%.(%d+)") +if maj and min then + pcre_ver_num = tonumber(maj .. min) +end if jit.os == "OSX" then - local maj, min = string.match(pcre_ver, "^(%d+)%.(%d+)") - if maj and min then - local pcre_ver_num = tonumber(maj .. min) - - if pcre_ver_num >= 843 then - no_jit_in_init = true - end - - else + if pcre_ver_num == nil then -- assume this version is faulty as well no_jit_in_init = true + + -- PCRE2 is also subject to this issue on macOS + elseif pcre_ver_num >= 843 then + no_jit_in_init = true end end +-- pcre2 +if pcre_ver_num > 845 then + -- option + PCRE_CASELESS = 0x00000008 + PCRE_MULTILINE = 0x00000400 + PCRE_DOTALL = 0x00000020 + PCRE_EXTENDED = 0x00000080 + PCRE_ANCHORED = 0x80000000 + PCRE_UTF8 = 0x00080000 + PCRE_DUPNAMES = 0x00000040 + -- In the pcre2, The PCRE_JAVASCRIPT_COMPAT option has been split into + -- independent functional options PCRE2_ALT_BSUX, PCRE2_ALLOW_EMPTY_CLASS, + -- and PCRE2_MATCH_UNSET_BACKREF. + local PCRE2_ALT_BSUX = 0x00000002 + local PCRE2_ALLOW_EMPTY_CLASS = 0x00000001 + local PCRE2_MATCH_UNSET_BACKREF = 0x00000200 + PCRE_JAVASCRIPT_COMPAT = bor(PCRE2_ALT_BSUX, PCRE2_ALLOW_EMPTY_CLASS) + PCRE_JAVASCRIPT_COMPAT = bor(PCRE2_MATCH_UNSET_BACKREF, + PCRE_JAVASCRIPT_COMPAT) +end if subsystem == 'http' then ffi.cdef[[ diff --git a/src/deps/src/lua-resty-core/lib/resty/core/time.md b/src/deps/src/lua-resty-core/lib/resty/core/time.md index 7fa6191f9..0cd097ec2 100644 --- a/src/deps/src/lua-resty-core/lib/resty/core/time.md +++ b/src/deps/src/lua-resty-core/lib/resty/core/time.md @@ -57,7 +57,7 @@ monotonic_msec **syntax:** *monotonic_msec()* -Returns the elapsed time in microseconds from the machine boot for the current time stamp from the Nginx cached time (no syscall involved unlike Lua's date library). +Returns the elapsed time in milliseconds from the machine boot for the current time stamp from the Nginx cached time (no syscall involved unlike Lua's date library). ```lua local cur_msec = require "resty.core.time".monotonic_msec diff --git a/src/deps/src/lua-resty-core/lib/resty/core/worker.lua b/src/deps/src/lua-resty-core/lib/resty/core/worker.lua index 934070d8b..be1d38c02 100644 --- a/src/deps/src/lua-resty-core/lib/resty/core/worker.lua +++ b/src/deps/src/lua-resty-core/lib/resty/core/worker.lua @@ -74,6 +74,8 @@ end if is_not_windows then if subsystem == "http" then + require "resty.core.phase" -- for ngx.get_phase + ffi.cdef[[ int ngx_http_lua_ffi_worker_pids(int *pids, size_t *pids_len); ]] @@ -88,16 +90,18 @@ if is_not_windows then ngx_lua_ffi_worker_pids = C.ngx_stream_lua_ffi_worker_pids end + local ngx_phase = ngx.get_phase function ngx.worker.pids() - if ngx.get_phase() == "init" or ngx.get_phase() == "init_worker" then + local phase = ngx_phase() + if phase == "init" or phase == "init_worker" then return nil, "API disabled in the current context" end local pids = {} local size_ptr = get_size_ptr() -- the old and the new workers coexist during reloading - local worker_cnt = ngx.worker.count() * 4 + local worker_cnt = ngx_lua_ffi_worker_count() * 4 if worker_cnt == 0 then return pids end @@ -117,6 +121,7 @@ if is_not_windows then end end + function ngx.worker.id() local id = ngx_lua_ffi_worker_id() if id < 0 then diff --git a/src/deps/src/lua-resty-core/t/ctx.t b/src/deps/src/lua-resty-core/t/ctx.t index 9a00a8265..99f19169a 100644 --- a/src/deps/src/lua-resty-core/t/ctx.t +++ b/src/deps/src/lua-resty-core/t/ctx.t @@ -379,6 +379,7 @@ lua release ngx.ctx at ref 1 } --- config lua_ssl_trusted_certificate ../../cert/test.crt; + lua_ssl_protocols TLSv1.2; location /t { content_by_lua_block { @@ -481,6 +482,7 @@ lua release ngx.ctx at ref 1 } --- config lua_ssl_trusted_certificate ../../cert/test.crt; + lua_ssl_protocols TLSv1.2; location /t { content_by_lua_block { @@ -535,6 +537,7 @@ lua release ngx.ctx at ref 1 ssl_session_tickets off; ssl_certificate ../../cert/test.crt; ssl_certificate_key ../../cert/test.key; + ssl_protocols TLSv1.2; server_tokens off; location /foo { @@ -636,6 +639,7 @@ lua release ngx.ctx at ref 1 ssl_session_tickets off; ssl_certificate ../../cert/test.crt; ssl_certificate_key ../../cert/test.key; + ssl_protocols TLSv1.2; server_tokens off; location /foo { @@ -702,6 +706,7 @@ lua release ngx.ctx at ref 1 ssl_session_tickets off; ssl_certificate ../../cert/test.crt; ssl_certificate_key ../../cert/test.key; + ssl_protocols TLSv1.2; ssl_certificate_by_lua_block { ngx.ctx.count = ngx.ctx.count and (ngx.ctx.count + 100) or 100 diff --git a/src/deps/src/lua-resty-core/t/pipe.t b/src/deps/src/lua-resty-core/t/pipe.t index 03ef9a7cf..d89df2c3d 100644 --- a/src/deps/src/lua-resty-core/t/pipe.t +++ b/src/deps/src/lua-resty-core/t/pipe.t @@ -1025,6 +1025,7 @@ MD5\([^)]+\)= 8bc944dbd052ef51652e70a5104492e3 } --- response_body closed +--- timeout: 10s diff --git a/src/deps/src/lua-resty-core/t/re-base.t b/src/deps/src/lua-resty-core/t/re-base.t index 9bf6b33af..be81e6db0 100644 --- a/src/deps/src/lua-resty-core/t/re-base.t +++ b/src/deps/src/lua-resty-core/t/re-base.t @@ -26,8 +26,11 @@ __DATA__ } --- request GET /re ---- response_body -error: pcre_compile() failed: missing ) in "(abc" +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -63,8 +66,11 @@ error: pcre_compile() failed: missing ) in "(abc" } --- request GET /t ---- response_body_like chop -error: pcre_exec\(\) failed: -10 +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] @@ -128,6 +134,7 @@ probe process("$LIBPCRE_PATH").function("pcre_exec") { printf("exec opts: %x\n", $options) } +# TODO: PCRE2 use different option values from PCRE --- stap_out compile opts: 800 exec opts: 0 @@ -172,8 +179,14 @@ end --- request GET /re ---- response_body -error: pcre_exec() failed: -8 +--- response_body eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"failed to match\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/lua-resty-core/t/re-gmatch.t b/src/deps/src/lua-resty-core/t/re-gmatch.t index 7439c5f7f..180b455ce 100644 --- a/src/deps/src/lua-resty-core/t/re-gmatch.t +++ b/src/deps/src/lua-resty-core/t/re-gmatch.t @@ -446,9 +446,13 @@ matched: nil } --- request GET /re ---- response_body -error: pcre_exec() failed: -10 -not matched +--- response_body eval +# PCRE2_ERROR_UTF8_ERR2 (-4) +# PCRE_ERROR_BADUTF8 (-10) +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\nnot matched\n" +: +"error: pcre_exec\(\) failed: -10\nnot matched\n" --- no_error_log [error] diff --git a/src/deps/src/lua-resty-core/t/re-match.t b/src/deps/src/lua-resty-core/t/re-match.t index 6ef724903..48a02ce4c 100644 --- a/src/deps/src/lua-resty-core/t/re-match.t +++ b/src/deps/src/lua-resty-core/t/re-match.t @@ -306,8 +306,11 @@ NYI } --- request GET /re ---- response_body_like chop -error: pcre_compile\(\) failed: two named subpatterns have the same name +--- response_body eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile\(\) failed: two named subpatterns have the same name \(PCRE2_DUPNAMES not set\) in \"\(\?[a-z])\(\?[a-z]+\), [0-9]+\" at \"[a-z]+\), [0-9]+\"\n" +: +"error: pcre_compile\(\) failed: two named subpatterns have the same name in \"\(\?[a-z])\(\?[a-z]+\), [0-9]+\" at \">[a-z]+\), [0-9]+\"\n" --- error_log eval qr/\[TRACE\s+\d+/ diff --git a/src/deps/src/lua-resty-core/t/re-opt.t b/src/deps/src/lua-resty-core/t/re-opt.t index 8ed907899..752415f87 100644 --- a/src/deps/src/lua-resty-core/t/re-opt.t +++ b/src/deps/src/lua-resty-core/t/re-opt.t @@ -39,8 +39,13 @@ __DATA__ } --- request GET /re ---- response_body -error: pcre_exec() failed: -27 +--- response_body eval +# PCRE2_ERROR_JIT_STACKLIMIT (-46) +# PCRE_ERROR_JIT_STACKLIMIT (-27) +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -46\n" +: +"error: pcre_exec\(\) failed: -27\n" --- no_error_log [error] --- timeout: 10 diff --git a/src/deps/src/lua-resty-core/t/ssl-session-fetch.t b/src/deps/src/lua-resty-core/t/ssl-session-fetch.t index 48878602b..801b83f24 100644 --- a/src/deps/src/lua-resty-core/t/ssl-session-fetch.t +++ b/src/deps/src/lua-resty-core/t/ssl-session-fetch.t @@ -51,6 +51,7 @@ __DATA__ resolver $TEST_NGINX_RESOLVER; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -97,7 +98,7 @@ qr/ssl_session_fetch_by_lua\(nginx.conf:\d+\):\d+: session id: [a-fA-f\d]+/s --- grep_error_log_out eval [ -qr/ssl_session_fetch_by_lua\(nginx.conf:\d+\):4: session id: [a-fA-f\d]+/s, +"", qr/ssl_session_fetch_by_lua\(nginx.conf:\d+\):4: session id: [a-fA-f\d]+/s, qr/ssl_session_fetch_by_lua\(nginx.conf:\d+\):4: session id: [a-fA-f\d]+/s, ] @@ -138,6 +139,7 @@ qr/ssl_session_fetch_by_lua\(nginx.conf:\d+\):4: session id: [a-fA-f\d]+/s, resolver $TEST_NGINX_RESOLVER; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -184,8 +186,7 @@ qr/ssl_session_fetch_by_lua:\d: session size: [a-fA-f\d]+|get session error: bad --- grep_error_log_out eval [ -'get session error: bad session in lua context -', +"", 'get session error: bad session in lua context ', 'get session error: bad session in lua context @@ -246,6 +247,7 @@ In practice, never store session in plaintext on persistent storage. resolver $TEST_NGINX_RESOLVER; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -342,6 +344,7 @@ able to carry on and negotiate a new session. resolver $TEST_NGINX_RESOLVER; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -388,10 +391,7 @@ qr/failed to resume session: failed to de-serialize session|ssl_session_(fetch|s --- grep_error_log_out eval [ -qr/^ssl_session_fetch_by_lua\(nginx.conf:\d+\):4: session id: [a-fA-F\d]+ -failed to resume session: failed to de-serialize session -ssl_session_store_by_lua\(nginx.conf:\d+\):5: session id: [a-fA-F\d]+ -$/s, +qr/^ssl_session_store_by_lua\(nginx.conf:\d+\):5: session id: [a-fA-F\d]+$/s, qr/^ssl_session_fetch_by_lua\(nginx.conf:\d+\):4: session id: [a-fA-F\d]+ failed to resume session: failed to de-serialize session ssl_session_store_by_lua\(nginx.conf:\d+\):5: session id: [a-fA-F\d]+ @@ -440,6 +440,7 @@ $/s, ssl_session_tickets off; ssl_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; ssl_certificate_key $TEST_NGINX_CERT_DIR/cert/test.key; + ssl_protocols TLSv1.2; location / { content_by_lua_block { @@ -557,6 +558,7 @@ $/s, --- config lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; diff --git a/src/deps/src/lua-resty-core/t/ssl-session-store.t b/src/deps/src/lua-resty-core/t/ssl-session-store.t index 04b9c49ba..f68e89c70 100644 --- a/src/deps/src/lua-resty-core/t/ssl-session-store.t +++ b/src/deps/src/lua-resty-core/t/ssl-session-store.t @@ -49,6 +49,7 @@ __DATA__ resolver $TEST_NGINX_RESOLVER; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -121,6 +122,7 @@ qr/ssl_session_store_by_lua\(nginx.conf:\d+\):4: session size: \d+/s resolver $TEST_NGINX_RESOLVER; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; @@ -229,6 +231,7 @@ qr/ssl_session_store_by_lua\(nginx.conf:\d+\):4: session id: [a-fA-f\d]+/s resolver $TEST_NGINX_RESOLVER; lua_ssl_trusted_certificate $TEST_NGINX_CERT_DIR/cert/test.crt; lua_ssl_verify_depth 3; + lua_ssl_protocols TLSv1.2; location /t { set $port $TEST_NGINX_MEMCACHED_PORT; diff --git a/src/deps/src/lua-resty-core/t/stream/re-base.t b/src/deps/src/lua-resty-core/t/stream/re-base.t index e82f98349..dd126ab2c 100644 --- a/src/deps/src/lua-resty-core/t/stream/re-base.t +++ b/src/deps/src/lua-resty-core/t/stream/re-base.t @@ -22,8 +22,11 @@ __DATA__ ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -55,12 +58,17 @@ error: pcre_compile() failed: missing ) in "(abc" ngx.say("not matched") end } ---- stream_response_like chop -error: pcre_exec\(\) failed: -10 +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] +--- ONLY + === TEST 3: UTF-8 mode without UTF-8 sequence checks @@ -114,6 +122,7 @@ probe process("$LIBPCRE_PATH").function("pcre_exec") { printf("exec opts: %x\n", $options) } +# TODO: PCRE2 use different option values from PCRE --- stap_out compile opts: 800 exec opts: 0 @@ -152,8 +161,14 @@ if not res then return end ---- stream_response -error: pcre_exec() failed: -8 +--- stream_response eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"failed to match\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/lua-resty-core/t/stream/re-gmatch.t b/src/deps/src/lua-resty-core/t/stream/re-gmatch.t index b9d8f3b53..b21b10a33 100644 --- a/src/deps/src/lua-resty-core/t/stream/re-gmatch.t +++ b/src/deps/src/lua-resty-core/t/stream/re-gmatch.t @@ -394,9 +394,13 @@ matched: nil ngx.say("not matched") end } ---- stream_response -error: pcre_exec() failed: -10 -not matched +--- stream_response eval +# PCRE2_ERROR_UTF8_ERR2 (-4) +# PCRE_ERROR_BADUTF8 (-10) +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\nnot matched\n" +: +"error: pcre_exec\(\) failed: -10\nnot matched\n" --- no_error_log [error] diff --git a/src/deps/src/lua-resty-core/t/stream/re-match.t b/src/deps/src/lua-resty-core/t/stream/re-match.t index 5a25b62e9..a0f3e8abb 100644 --- a/src/deps/src/lua-resty-core/t/stream/re-match.t +++ b/src/deps/src/lua-resty-core/t/stream/re-match.t @@ -268,8 +268,11 @@ NYI ngx.say("not matched!") end } ---- stream_response_like chop -error: pcre_compile\(\) failed: two named subpatterns have the same name +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile\(\) failed: two named subpatterns have the same name \(PCRE2_DUPNAMES not set\) in \"\(\?[a-z])\(\?[a-z]+\), [0-9]+\" at \"[a-z]+\), [0-9]+\"\n" +: +"error: pcre_compile\(\) failed: two named subpatterns have the same name in \"\(\?[a-z])\(\?[a-z]+\), [0-9]+\" at \">[a-z]+\), [0-9]+\"\n" --- error_log eval qr/\[TRACE\s+\d+/ diff --git a/src/deps/src/lua-resty-core/t/stream/re-opt.t b/src/deps/src/lua-resty-core/t/stream/re-opt.t index e353a3585..090c31adc 100644 --- a/src/deps/src/lua-resty-core/t/stream/re-opt.t +++ b/src/deps/src/lua-resty-core/t/stream/re-opt.t @@ -36,8 +36,13 @@ __DATA__ ngx.say("not matched!") end } ---- stream_response -error: pcre_exec() failed: -27 +--- stream_response eval +# PCRE2_ERROR_JIT_STACKLIMIT (-46) +# PCRE_ERROR_JIT_STACKLIMIT (-27) +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -46\n" +: +"error: pcre_exec\(\) failed: -27\n" --- no_error_log [error] --- timeout: 10 diff --git a/src/deps/src/lua-resty-core/util/ver-ge b/src/deps/src/lua-resty-core/util/ver-ge new file mode 100755 index 000000000..8d7a401e9 --- /dev/null +++ b/src/deps/src/lua-resty-core/util/ver-ge @@ -0,0 +1,41 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +sub usage { + die "Usage: $0 \n"; +} + +my $a = shift or usage(); +my $b = shift or usage(); + +my @as = split /\./, $a; +my @bs = split /\./, $b; + +my $n = @as > @bs ? scalar(@as) : scalar(@bs); + +for (my $i = 0; $i < $n; $i++) { + my $x = $as[$i]; + my $y = $bs[$i]; + + if (!defined $x) { + $x = 0; + } + + if (!defined $y) { + $y = 0; + } + + if ($x > $y) { + print "Y\n"; + exit; + + } elsif ($x < $y) { + print "N\n"; + exit; + } +} + +print "Y\n"; + diff --git a/src/deps/src/stream-lua-nginx-module/.travis.yml b/src/deps/src/stream-lua-nginx-module/.travis.yml index be96d17e6..a3dec3b7b 100644 --- a/src/deps/src/stream-lua-nginx-module/.travis.yml +++ b/src/deps/src/stream-lua-nginx-module/.travis.yml @@ -29,9 +29,13 @@ env: - LUAJIT_INC=$LUAJIT_PREFIX/include/luajit-2.1 - LUA_INCLUDE_DIR=$LUAJIT_INC - PCRE_VER=8.45 + - PCRE2_VER=10.37 - PCRE_PREFIX=/opt/pcre + - PCRE2_PREFIX=/opt/pcre2 - PCRE_LIB=$PCRE_PREFIX/lib + - PCRE2_LIB=$PCRE2_PREFIX/lib - PCRE_INC=$PCRE_PREFIX/include + - PCRE2_INC=$PCRE2_PREFIX/include - OPENSSL_PREFIX=/opt/ssl - OPENSSL_LIB=$OPENSSL_PREFIX/lib - OPENSSL_INC=$OPENSSL_PREFIX/include @@ -39,8 +43,9 @@ env: - NGX_BUILD_JOBS=$JOBS - TEST_NGINX_SLEEP=0.006 matrix: - - NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.0l - - NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.1s + #- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.12 + - NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w + - NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w USE_PCRE2=Y services: - memcache @@ -49,7 +54,8 @@ services: install: - sudo apt update - sudo apt install --only-upgrade ca-certificates - - if [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -P download-cache/ https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VER}/pcre-${PCRE_VER}.tar.gz; fi + - if [ "$USE_PCRE2" != "Y" ] && [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -P download-cache/ https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VER}/pcre-${PCRE_VER}.tar.gz; fi + - if [ "$USE_PCRE2" = "Y" ] && [ ! -f download-cache/pcre2-$PCRE2_VER.tar.gz ]; then wget -P download-cache https://downloads.sourceforge.net/project/pcre/pcre2/${PCRE2_VER}/pcre2-${PCRE2_VER}.tar.gz; fi - if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz || wget -P download-cache https://www.openssl.org/source/old/${OPENSSL_VER//[a-z]/}/openssl-$OPENSSL_VER.tar.gz; fi - git clone https://github.com/openresty/openresty-devel-utils.git - git clone https://github.com/openresty/lua-cjson.git @@ -73,12 +79,8 @@ script: - sudo ip addr add 10.254.254.1/24 dev lo - sudo ip addr add 10.254.254.2/24 dev lo - sudo ip route add prohibit 0.0.0.1/32 - - tar zxf download-cache/pcre-$PCRE_VER.tar.gz - - cd pcre-$PCRE_VER/ - - ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > build.log 2>&1 || (cat build.log && exit 1) - - make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1) - - sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1) - - cd .. + - if [ "$USE_PCRE2" != "Y" ]; then tar zxf download-cache/pcre-$PCRE_VER.tar.gz; cd pcre-$PCRE_VER/; ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi + - if [ "$USE_PCRE2" = "Y" ]; then tar zxf download-cache/pcre2-$PCRE2_VER.tar.gz; cd pcre2-$PCRE2_VER/; ./configure --prefix=$PCRE2_PREFIX --enable-jit --enable-utf > build.log 2>&1 || (cat build.log && exit 1); make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1); sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1); cd ..; fi - cd luajit2 - make -j$JOBS CCDEBUG=-g Q= PREFIX=$LUAJIT_PREFIX CC=$CC XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT' > build.log 2>&1 || (cat build.log && exit 1) - sudo make install PREFIX=$LUAJIT_PREFIX > build.log 2>&1 || (cat build.log && exit 1) @@ -101,4 +103,4 @@ script: - export TEST_NGINX_RESOLVER=8.8.4.4 - dig +short @$TEST_NGINX_RESOLVER openresty.org || exit 0 - dig +short @$TEST_NGINX_RESOLVER agentzh.org || exit 0 - - prove -I. -r t + - prove -I. -Itest-nginx/lib -r t diff --git a/src/deps/src/stream-lua-nginx-module/LICENSE b/src/deps/src/stream-lua-nginx-module/LICENSE new file mode 100644 index 000000000..6e15ec4db --- /dev/null +++ b/src/deps/src/stream-lua-nginx-module/LICENSE @@ -0,0 +1,24 @@ +BSD 2-Clause License + +Copyright (c) 2023, OpenResty + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/deps/src/stream-lua-nginx-module/README.md b/src/deps/src/stream-lua-nginx-module/README.md index d3f9bf0e4..97e05cfa4 100644 --- a/src/deps/src/stream-lua-nginx-module/README.md +++ b/src/deps/src/stream-lua-nginx-module/README.md @@ -41,8 +41,8 @@ Version ======= This document describes ngx_stream_lua -[v0.0.8](https://github.com/openresty/stream-lua-nginx-module/tags), which was released -on 2 July, 2020. +[v0.0.13](https://github.com/openresty/stream-lua-nginx-module/tags), which was released +on 21 May, 2023. Synopsis ======== @@ -160,6 +160,8 @@ behavior. * [lua_ssl_ciphers](https://github.com/openresty/lua-nginx-module#lua_ssl_ciphers) * [lua_ssl_crl](https://github.com/openresty/lua-nginx-module#lua_ssl_crl) * [lua_ssl_protocols](https://github.com/openresty/lua-nginx-module#lua_ssl_protocols) +* [lua_ssl_certificate](https://github.com/openresty/lua-nginx-module#lua_ssl_certificate) +* [lua_ssl_certificate_key](https://github.com/openresty/lua-nginx-module#lua_ssl_certificate_key) * [lua_ssl_trusted_certificate](https://github.com/openresty/lua-nginx-module#lua_ssl_trusted_certificate) * [lua_ssl_verify_depth](https://github.com/openresty/lua-nginx-module#lua_ssl_verify_depth) * [lua_ssl_conf_command](https://github.com/openresty/lua-nginx-module#lua_ssl_conf_command) @@ -539,6 +541,8 @@ Nginx Compatibility The latest version of this module is compatible with the following versions of Nginx: +* 1.25.x (last tested: 1.25.1) +* 1.21.x (last tested: 1.21.4) * 1.19.x (last tested: 1.19.3) * 1.17.x (last tested: 1.17.8) * 1.15.x (last tested: 1.15.8) diff --git a/src/deps/src/stream-lua-nginx-module/config b/src/deps/src/stream-lua-nginx-module/config index e984f965d..8db90628e 100644 --- a/src/deps/src/stream-lua-nginx-module/config +++ b/src/deps/src/stream-lua-nginx-module/config @@ -405,7 +405,7 @@ fi # ---------------------------------------- -if [ $USE_PCRE = YES -o $PCRE != NONE ] && [ $PCRE != NO -a $PCRE != YES ]; then +if [ $USE_PCRE = YES -o $PCRE != NONE ] && [ $PCRE != NO -a $PCRE != YES ] && [ $PCRE2 != YES ]; then # force pcre_version symbol to be required when PCRE is statically linked case "$NGX_PLATFORM" in Darwin:*) diff --git a/src/deps/src/stream-lua-nginx-module/src/api/ngx_stream_lua_api.h b/src/deps/src/stream-lua-nginx-module/src/api/ngx_stream_lua_api.h index 58c8012cc..ba1fbd5be 100644 --- a/src/deps/src/stream-lua-nginx-module/src/api/ngx_stream_lua_api.h +++ b/src/deps/src/stream-lua-nginx-module/src/api/ngx_stream_lua_api.h @@ -29,7 +29,7 @@ /* Public API for other Nginx modules */ -#define ngx_stream_lua_version 13 +#define ngx_stream_lua_version 14 typedef struct { diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_common.h b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_common.h index 8d8cf48c3..f76229e1b 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_common.h +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_common.h @@ -36,15 +36,18 @@ #if (NGX_PCRE) +# if (NGX_PCRE2) +# define LUA_HAVE_PCRE_JIT 1 +# else #include -#if (PCRE_MAJOR > 8) || (PCRE_MAJOR == 8 && PCRE_MINOR >= 21) -# define LUA_HAVE_PCRE_JIT 1 -#else -# define LUA_HAVE_PCRE_JIT 0 -#endif - +# if (PCRE_MAJOR > 8) || (PCRE_MAJOR == 8 && PCRE_MINOR >= 21) +# define LUA_HAVE_PCRE_JIT 1 +# else +# define LUA_HAVE_PCRE_JIT 0 +# endif +# endif #endif @@ -193,11 +196,14 @@ struct ngx_stream_lua_main_conf_s { ngx_int_t regex_cache_entries; ngx_int_t regex_cache_max_entries; ngx_int_t regex_match_limit; - -#if (LUA_HAVE_PCRE_JIT) - pcre_jit_stack *jit_stack; #endif +#if (LUA_HAVE_PCRE_JIT) +#if (NGX_PCRE2) + pcre2_jit_stack *jit_stack; +#else + pcre_jit_stack *jit_stack; +#endif #endif ngx_array_t *shm_zones; /* of ngx_shm_zone_t* */ @@ -245,6 +251,8 @@ struct ngx_stream_lua_main_conf_s { struct ngx_stream_lua_srv_conf_s { #if (NGX_STREAM_SSL) ngx_ssl_t *ssl; /* shared by SSL cosockets */ + ngx_array_t *ssl_certificates; + ngx_array_t *ssl_certificate_keys; ngx_uint_t ssl_protocols; ngx_str_t ssl_ciphers; ngx_uint_t ssl_verify_depth; diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_contentby.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_contentby.c index 0e8635122..79370bfcd 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_contentby.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_contentby.c @@ -80,6 +80,8 @@ ngx_stream_lua_content_by_chunk(lua_State *L, ngx_stream_lua_request_t *r) ctx->cur_co_ctx->co_top = 1; #endif + ngx_stream_lua_attach_co_ctx_to_L(co, ctx->cur_co_ctx); + /* {{{ register request cleanup hooks */ if (ctx->cleanup == NULL) { cln = ngx_stream_lua_cleanup_add(r, 0); diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_coroutine.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_coroutine.c index f12e89bf1..d4863dd0f 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_coroutine.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_coroutine.c @@ -152,6 +152,7 @@ ngx_stream_lua_coroutine_create_helper(lua_State *L, #ifdef OPENRESTY_LUAJIT ngx_stream_lua_set_req(co, r); + ngx_stream_lua_attach_co_ctx_to_L(co, coctx); #else /* make new coroutine share globals of the parent coroutine. * NOTE: globals don't have to be separated! */ diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_module.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_module.c index 7f4c7c0e0..f7dca968f 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_module.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_module.c @@ -56,6 +56,9 @@ static char *ngx_stream_lua_ssl_conf_command_check(ngx_conf_t *cf, void *post, #endif static char *ngx_stream_lua_malloc_trim(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); +#if (NGX_PCRE2) +extern void ngx_stream_lua_regex_cleanup(void *data); +#endif static ngx_conf_post_t ngx_stream_lua_lowat_post = @@ -422,6 +425,20 @@ static ngx_command_t ngx_stream_lua_cmds[] = { offsetof(ngx_stream_lua_srv_conf_t, ssl_verify_depth), NULL }, + { ngx_string("lua_ssl_certificate"), + NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1, + ngx_conf_set_str_array_slot, + NGX_STREAM_SRV_CONF_OFFSET, + offsetof(ngx_stream_lua_srv_conf_t, ssl_certificates), + NULL }, + + { ngx_string("lua_ssl_certificate_key"), + NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1, + ngx_conf_set_str_array_slot, + NGX_STREAM_SRV_CONF_OFFSET, + offsetof(ngx_stream_lua_srv_conf_t, ssl_certificate_keys), + NULL }, + { ngx_string("lua_ssl_trusted_certificate"), NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_TAKE1, ngx_conf_set_str_slot, @@ -563,7 +580,16 @@ ngx_stream_lua_init(ngx_conf_t *cf) cln->data = lmcf; cln->handler = ngx_stream_lua_sema_mm_cleanup; +#if (NGX_PCRE2) + /* add the cleanup of pcre2 regex */ + cln = ngx_pool_cleanup_add(cf->pool, 0); + if (cln == NULL) { + return NGX_ERROR; + } + cln->data = lmcf; + cln->handler = ngx_stream_lua_regex_cleanup; +#endif if (lmcf->lua == NULL) { dd("initializing lua vm"); @@ -579,6 +605,15 @@ ngx_stream_lua_init(ngx_conf_t *cf) "the OpenResty releases from https://openresty.org/" "en/download.html)"); } +#else +# if !defined(HAVE_LUA_EXDATA2) + ngx_log_error(NGX_LOG_ALERT, cf->log, 0, + "detected an old version of OpenResty's LuaJIT missing " + "the exdata2 API and thus the " + "performance will be compromised; please upgrade to the " + "latest version of OpenResty's LuaJIT: " + "https://github.com/openresty/luajit2"); +# endif #endif @@ -814,6 +849,8 @@ ngx_stream_lua_create_srv_conf(ngx_conf_t *cf) #if (NGX_STREAM_SSL) conf->ssl_verify_depth = NGX_CONF_UNSET_UINT; + conf->ssl_certificates = NGX_CONF_UNSET_PTR; + conf->ssl_certificate_keys = NGX_CONF_UNSET_PTR; #endif return conf; @@ -926,6 +963,10 @@ ngx_stream_lua_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) ngx_conf_merge_uint_value(conf->ssl_verify_depth, prev->ssl_verify_depth, 1); + ngx_conf_merge_ptr_value(conf->ssl_certificates, + prev->ssl_certificates, NULL); + ngx_conf_merge_ptr_value(conf->ssl_certificate_keys, + prev->ssl_certificate_keys, NULL); ngx_conf_merge_str_value(conf->ssl_trusted_certificate, prev->ssl_trusted_certificate, ""); ngx_conf_merge_str_value(conf->ssl_crl, prev->ssl_crl, ""); @@ -973,6 +1014,13 @@ ngx_stream_lua_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) conf->preread_chunkname = prev->preread_chunkname; } + if (conf->log_src.value.len == 0) { + conf->log_src = prev->log_src; + conf->log_handler = prev->log_handler; + conf->log_src_key = prev->log_src_key; + conf->log_chunkname = prev->log_chunkname; + } + return NGX_CONF_OK; } @@ -993,6 +1041,20 @@ ngx_stream_lua_set_ssl(ngx_conf_t *cf, ngx_stream_lua_srv_conf_t *lscf) lscf->ssl->log = cf->log; + if (lscf->ssl_certificates) { + if (lscf->ssl_certificate_keys == NULL + || lscf->ssl_certificate_keys->nelts + < lscf->ssl_certificates->nelts) + { + ngx_log_error(NGX_LOG_EMERG, cf->log, 0, + "no \"lua_ssl_certificate_key\" is defined " + "for certificate \"%V\"", + ((ngx_str_t *) lscf->ssl_certificates->elts) + + lscf->ssl_certificates->nelts - 1); + return NGX_ERROR; + } + } + if (ngx_ssl_create(lscf->ssl, lscf->ssl_protocols, NULL) != NGX_OK) { return NGX_ERROR; } @@ -1015,6 +1077,16 @@ ngx_stream_lua_set_ssl(ngx_conf_t *cf, ngx_stream_lua_srv_conf_t *lscf) return NGX_ERROR; } + if (lscf->ssl_certificates + && ngx_ssl_certificates(cf, lscf->ssl, + lscf->ssl_certificates, + lscf->ssl_certificate_keys, + NULL) + != NGX_OK) + { + return NGX_ERROR; + } + if (lscf->ssl_trusted_certificate.len && ngx_ssl_trusted_certificate(cf, lscf->ssl, &lscf->ssl_trusted_certificate, diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_pcrefix.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_pcrefix.c index 37118a998..2e8a9f8b9 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_pcrefix.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_pcrefix.c @@ -26,14 +26,59 @@ static ngx_pool_t *ngx_stream_lua_pcre_pool = NULL; +#if (NGX_PCRE2) +static ngx_uint_t ngx_regex_direct_alloc; +#else static void *(*old_pcre_malloc)(size_t); static void (*old_pcre_free)(void *ptr); +#endif /* XXX: work-around to nginx regex subsystem, must init a memory pool * to use PCRE functions. As PCRE still has memory-leaking problems, * and nginx overwrote pcre_malloc/free hooks with its own static * functions, so nobody else can reuse nginx regex subsystem... */ +#if (NGX_PCRE2) + +void * +ngx_stream_lua_pcre_malloc(size_t size, void *data) +{ + dd("lua pcre pool is %p", ngx_stream_lua_pcre_pool); + + if (ngx_stream_lua_pcre_pool) { + return ngx_palloc(ngx_stream_lua_pcre_pool, size); + } + + if (ngx_regex_direct_alloc) { + return ngx_alloc(size, ngx_cycle->log); + } + + fprintf(stderr, "error: lua pcre malloc failed due to empty pcre pool"); + + return NULL; +} + + +void +ngx_stream_lua_pcre_free(void *ptr, void *data) +{ + dd("lua pcre pool is %p", ngx_stream_lua_pcre_pool); + + if (ngx_stream_lua_pcre_pool) { + ngx_pfree(ngx_stream_lua_pcre_pool, ptr); + return; + } + + if (ngx_regex_direct_alloc) { + ngx_free(ptr); + return; + } + + fprintf(stderr, "error: lua pcre free failed due to empty pcre pool"); +} + +#else + static void * ngx_stream_lua_pcre_malloc(size_t size) { @@ -62,6 +107,41 @@ ngx_stream_lua_pcre_free(void *ptr) fprintf(stderr, "error: lua pcre free failed due to empty pcre pool"); } +#endif + + +#if (NGX_PCRE2) + +ngx_pool_t * +ngx_stream_lua_pcre_malloc_init(ngx_pool_t *pool) +{ + ngx_pool_t *old_pool; + + dd("lua pcre pool was %p", ngx_stream_lua_pcre_pool); + + ngx_regex_direct_alloc = (pool == NULL) ? 1 : 0; + + old_pool = ngx_stream_lua_pcre_pool; + ngx_stream_lua_pcre_pool = pool; + + dd("lua pcre pool is %p", ngx_stream_lua_pcre_pool); + + return old_pool; +} + + +void +ngx_stream_lua_pcre_malloc_done(ngx_pool_t *old_pool) +{ + dd("lua pcre pool was %p", ngx_stream_lua_pcre_pool); + + ngx_stream_lua_pcre_pool = old_pool; + ngx_regex_direct_alloc = 0; + + dd("lua pcre pool is %p", ngx_stream_lua_pcre_pool); +} + +#else ngx_pool_t * ngx_stream_lua_pcre_malloc_init(ngx_pool_t *pool) @@ -109,6 +189,7 @@ ngx_stream_lua_pcre_malloc_done(ngx_pool_t *old_pool) } } +#endif #endif /* NGX_PCRE */ /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_pcrefix.h b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_pcrefix.h index daff4c9fd..885e12d74 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_pcrefix.h +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_pcrefix.h @@ -23,6 +23,11 @@ #if (NGX_PCRE) ngx_pool_t *ngx_stream_lua_pcre_malloc_init(ngx_pool_t *pool); void ngx_stream_lua_pcre_malloc_done(ngx_pool_t *old_pool); + +#if (NGX_PCRE2) +void *ngx_stream_lua_pcre_malloc(size_t size, void *data); +void ngx_stream_lua_pcre_free(void *ptr, void *data); +#endif #endif diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_prereadby.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_prereadby.c index e42787610..61f27b577 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_prereadby.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_prereadby.c @@ -247,6 +247,8 @@ ngx_stream_lua_preread_by_chunk(lua_State *L, ngx_stream_lua_request_t *r) ctx->cur_co_ctx->co_top = 1; #endif + ngx_stream_lua_attach_co_ctx_to_L(co, ctx->cur_co_ctx); + /* }}} */ /* {{{ register request cleanup hooks */ diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_regex.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_regex.c index 9fa8f4f4c..e32744ec6 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_regex.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_regex.c @@ -25,13 +25,24 @@ #include "ngx_stream_lua_util.h" -#if (PCRE_MAJOR >= 6) +#if (PCRE_MAJOR >= 6 || NGX_PCRE2) # define LUA_HAVE_PCRE_DFA 1 #else # define LUA_HAVE_PCRE_DFA 0 #endif +#if (NGX_PCRE2) +static pcre2_compile_context *ngx_regex_compile_context; +static pcre2_match_context *ngx_regex_match_context; +static pcre2_match_data *ngx_regex_match_data; +static ngx_uint_t ngx_regex_match_data_size = 0; + +#define PCRE2_VERSION_SIZE 64 +static char ngx_pcre2_version[PCRE2_VERSION_SIZE]; +#endif + + #define NGX_LUA_RE_MODE_DFA (1<<1) #define NGX_LUA_RE_MODE_JIT (1<<2) #define NGX_LUA_RE_NO_UTF8_CHECK (1<<4) @@ -50,8 +61,17 @@ typedef struct { int ncaptures; int *captures; +#if (NGX_PCRE2) + pcre2_code *regex; + /* + * pcre2 doesn't use pcre_extra any more, + * just for keeping same memory layout in the lua ffi cdef + */ + void *regex_sd; +#else pcre *regex; pcre_extra *regex_sd; +#endif ngx_stream_lua_complex_value_t *replace; @@ -65,7 +85,11 @@ typedef struct { ngx_pool_t *pool; ngx_int_t options; +#if (NGX_PCRE2) + pcre2_code *regex; +#else pcre *regex; +#endif int captures; ngx_str_t err; } ngx_stream_lua_regex_compile_t; @@ -74,8 +98,12 @@ typedef struct { typedef struct { ngx_stream_lua_request_t *request; +#if (NGX_PCRE2) + pcre2_code *regex; +#else pcre *regex; pcre_extra *regex_sd; +#endif int ncaptures; int *captures; int captures_len; @@ -83,8 +111,6 @@ typedef struct { } ngx_stream_lua_regex_ctx_t; -static void ngx_stream_lua_regex_free_study_data(ngx_pool_t *pool, - pcre_extra *sd); static ngx_int_t ngx_stream_lua_regex_compile( ngx_stream_lua_regex_compile_t *rc); @@ -102,22 +128,157 @@ static ngx_int_t ngx_stream_lua_regex_compile( static void -ngx_stream_lua_regex_free_study_data(ngx_pool_t *pool, pcre_extra *sd) +ngx_stream_lua_regex_free_study_data(ngx_pool_t *pool, + ngx_stream_lua_regex_t *re) { - ngx_pool_t *old_pool; + ngx_pool_t *old_pool; - old_pool = ngx_stream_lua_pcre_malloc_init(pool); +#if (NGX_PCRE2) + if (re && re->regex) { + old_pool = ngx_stream_lua_pcre_malloc_init(pool); -#if LUA_HAVE_PCRE_JIT - pcre_free_study(sd); + pcre2_code_free(re->regex); + + ngx_stream_lua_pcre_malloc_done(old_pool); + + re->regex = NULL; + } #else - pcre_free(sd); + if (re && re->regex_sd) { + old_pool = ngx_stream_lua_pcre_malloc_init(pool); +#if LUA_HAVE_PCRE_JIT + pcre_free_study(re->regex_sd); +#else + pcre_free(re->regex_sd); #endif + ngx_stream_lua_pcre_malloc_done(old_pool); - ngx_stream_lua_pcre_malloc_done(old_pool); + re->regex_sd = NULL; + } +#endif } +#if (NGX_PCRE2) +static ngx_int_t +ngx_stream_lua_regex_compile(ngx_stream_lua_regex_compile_t *rc) +{ + int n, errcode; + char *p; + size_t erroff; + u_char errstr[128]; + pcre2_code *re; + ngx_pool_t *old_pool; + pcre2_general_context *gctx; + pcre2_compile_context *cctx; + + ngx_stream_lua_main_conf_t *lmcf; + + if (ngx_regex_compile_context == NULL) { + /* + * Allocate a compile context if not yet allocated. This uses + * direct allocations from heap, so the result can be cached + * even at runtime. + */ + + old_pool = ngx_stream_lua_pcre_malloc_init(NULL); + + gctx = pcre2_general_context_create(ngx_stream_lua_pcre_malloc, + ngx_stream_lua_pcre_free, + NULL); + if (gctx == NULL) { + ngx_stream_lua_pcre_malloc_done(old_pool); + goto nomem; + } + + cctx = pcre2_compile_context_create(gctx); + if (cctx == NULL) { + pcre2_general_context_free(gctx); + ngx_stream_lua_pcre_malloc_done(old_pool); + goto nomem; + } + + ngx_regex_compile_context = cctx; + + ngx_regex_match_context = pcre2_match_context_create(gctx); + if (ngx_regex_match_context == NULL) { + pcre2_general_context_free(gctx); + ngx_stream_lua_pcre_malloc_done(old_pool); + goto nomem; + } + + lmcf = ngx_stream_cycle_get_module_main_conf(ngx_cycle, + ngx_stream_lua_module); + if (lmcf && lmcf->regex_match_limit > 0) { + pcre2_set_match_limit(ngx_regex_match_context, + lmcf->regex_match_limit); + } + + pcre2_general_context_free(gctx); + ngx_stream_lua_pcre_malloc_done(old_pool); + } + + old_pool = ngx_stream_lua_pcre_malloc_init(rc->pool); + + re = pcre2_compile(rc->pattern.data, + rc->pattern.len, rc->options, + &errcode, &erroff, ngx_regex_compile_context); + + ngx_stream_lua_pcre_malloc_done(old_pool); + + if (re == NULL) { + pcre2_get_error_message(errcode, errstr, 128); + + if ((size_t) erroff == rc->pattern.len) { + rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, + "pcre2_compile() failed: %s in \"%V\"", + errstr, &rc->pattern) + - rc->err.data; + + } else { + rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, + "pcre2_compile() failed: %s in " + "\"%V\" at \"%s\"", errstr, &rc->pattern, + rc->pattern.data + erroff) + - rc->err.data; + } + + return NGX_ERROR; + } + + rc->regex = re; + + n = pcre2_pattern_info(re, PCRE2_INFO_CAPTURECOUNT, &rc->captures); + if (n < 0) { + p = "pcre2_pattern_info(\"%V\", PCRE_INFO_CAPTURECOUNT) failed: %d"; + goto failed; + } + +#if (NGX_DEBUG) + ngx_log_debug3(NGX_LOG_DEBUG_STREAM, ngx_cycle->log, 0, + "pcre2_compile: pattern[%V], options 0x%08Xd, ncaptures %d", + &rc->pattern, rc->options, rc->captures); +#endif + + return NGX_OK; + +failed: + + rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, p, &rc->pattern, n) + - rc->err.data; + return NGX_ERROR; + +nomem: + + rc->err.len = ngx_snprintf(rc->err.data, rc->err.len, + "regex \"%V\" compilation failed: no memory", + &rc->pattern) + - rc->err.data; + return NGX_ERROR; +} + +#else + static ngx_int_t ngx_stream_lua_regex_compile(ngx_stream_lua_regex_compile_t *rc) { @@ -170,13 +331,14 @@ failed: - rc->err.data; return NGX_OK; } +#endif ngx_int_t ngx_stream_lua_ffi_set_jit_stack_size(int size, u_char *errstr, size_t *errstr_size) { -#if LUA_HAVE_PCRE_JIT +#if (LUA_HAVE_PCRE_JIT) ngx_stream_lua_main_conf_t *lmcf; ngx_pool_t *pool, *old_pool; @@ -195,15 +357,24 @@ ngx_stream_lua_ffi_set_jit_stack_size(int size, u_char *errstr, if (lmcf->jit_stack) { old_pool = ngx_stream_lua_pcre_malloc_init(pool); +#if (NGX_PCRE2) + pcre2_jit_stack_free(lmcf->jit_stack); +#else pcre_jit_stack_free(lmcf->jit_stack); +#endif ngx_stream_lua_pcre_malloc_done(old_pool); } old_pool = ngx_stream_lua_pcre_malloc_init(pool); +#if (NGX_PCRE2) + lmcf->jit_stack = pcre2_jit_stack_create(NGX_LUA_RE_MIN_JIT_STACK_SIZE, + size, NULL); +#else lmcf->jit_stack = pcre_jit_stack_alloc(NGX_LUA_RE_MIN_JIT_STACK_SIZE, size); +#endif ngx_stream_lua_pcre_malloc_done(old_pool); @@ -222,25 +393,163 @@ ngx_stream_lua_ffi_set_jit_stack_size(int size, u_char *errstr, "no pcre jit support found") - errstr; return NGX_ERROR; -#endif /* LUA_HAVE_PCRE_JIT */ +#endif } +#if (NGX_PCRE2) +static void +ngx_stream_lua_regex_jit_compile(ngx_stream_lua_regex_t *re, int flags, + ngx_pool_t *pool, ngx_stream_lua_main_conf_t *lmcf, + ngx_stream_lua_regex_compile_t *re_comp) +{ + ngx_int_t ret; + ngx_pool_t *old_pool; + + if (flags & NGX_LUA_RE_MODE_JIT) { + old_pool = ngx_stream_lua_pcre_malloc_init(pool); + ret = pcre2_jit_compile(re_comp->regex, PCRE2_JIT_COMPLETE); + + if (ret != 0) { + ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0, + "pcre2_jit_compile() failed: %d in \"%V\", " + "ignored", + ret, &re_comp->pattern); + +#if (NGX_DEBUG) + + } else { + ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ngx_cycle->log, 0, + "pcre2 JIT compiled successfully"); +# endif /* !(NGX_DEBUG) */ + } + + ngx_stream_lua_pcre_malloc_done(old_pool); + + } + + if (lmcf && lmcf->jit_stack) { + pcre2_jit_stack_assign(ngx_regex_match_context, NULL, + lmcf->jit_stack); + } + + return; +} + +#else + +static void +ngx_stream_lua_regex_jit_compile(ngx_stream_lua_regex_t *re, int flags, + ngx_pool_t *pool, ngx_stream_lua_main_conf_t *lmcf, + ngx_stream_lua_regex_compile_t *re_comp) +{ + const char *msg; + pcre_extra *sd = NULL; + ngx_pool_t *old_pool; + + +#if (LUA_HAVE_PCRE_JIT) + if (flags & NGX_LUA_RE_MODE_JIT) { + old_pool = ngx_stream_lua_pcre_malloc_init(pool); + sd = pcre_study(re_comp->regex, PCRE_STUDY_JIT_COMPILE, &msg); + ngx_stream_lua_pcre_malloc_done(old_pool); + +# if (NGX_DEBUG) + if (msg != NULL) { + ngx_log_debug2(NGX_LOG_DEBUG_STREAM, ngx_cycle->log, 0, + "pcre study failed with PCRE_STUDY_JIT_COMPILE: " + "%s (%p)", msg, sd); + } + + if (sd != NULL) { + int jitted; + + old_pool = ngx_stream_lua_pcre_malloc_init(pool); + + pcre_fullinfo(re_comp->regex, sd, PCRE_INFO_JIT, &jitted); + + ngx_stream_lua_pcre_malloc_done(old_pool); + + ngx_log_debug1(NGX_LOG_DEBUG_STREAM, ngx_cycle->log, 0, + "pcre JIT compiling result: %d", jitted); + } +# endif /* !(NGX_DEBUG) */ + + } else { + old_pool = ngx_stream_lua_pcre_malloc_init(pool); + sd = pcre_study(re_comp->regex, 0, &msg); + ngx_stream_lua_pcre_malloc_done(old_pool); + } + + if (sd && lmcf && lmcf->jit_stack) { + pcre_assign_jit_stack(sd, NULL, lmcf->jit_stack); + } + + if (sd + && lmcf && lmcf->regex_match_limit > 0 + && !(flags & NGX_LUA_RE_MODE_DFA)) + { + sd->flags |= PCRE_EXTRA_MATCH_LIMIT; + sd->match_limit = lmcf->regex_match_limit; + } + +#endif /* LUA_HAVE_PCRE_JIT */ + + re->regex_sd = sd; +} +#endif + + +#if (NGX_PCRE2) +void +ngx_stream_lua_regex_cleanup(void *data) +{ + ngx_pool_t *old_pool; + ngx_stream_lua_main_conf_t *lmcf; + + lmcf = data; + + if (ngx_regex_compile_context) { + old_pool = ngx_stream_lua_pcre_malloc_init(NULL); + pcre2_compile_context_free(ngx_regex_compile_context); + ngx_regex_compile_context = NULL; + ngx_stream_lua_pcre_malloc_done(old_pool); + } + + if (lmcf && lmcf->jit_stack) { + old_pool = ngx_stream_lua_pcre_malloc_init(NULL); + + pcre2_jit_stack_free(lmcf->jit_stack); + lmcf->jit_stack = NULL; + + ngx_stream_lua_pcre_malloc_done(old_pool); + } + + if (ngx_regex_match_data) { + old_pool = ngx_stream_lua_pcre_malloc_init(NULL); + pcre2_match_data_free(ngx_regex_match_data); + ngx_regex_match_data = NULL; + ngx_regex_match_data_size = 0; + ngx_stream_lua_pcre_malloc_done(old_pool); + } + +} +#endif + + ngx_stream_lua_regex_t * ngx_stream_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, int flags, int pcre_opts, u_char *errstr, size_t errstr_size) { - int *cap = NULL, ovecsize; - u_char *p; - ngx_int_t rc; - const char *msg; - ngx_pool_t *pool, *old_pool; - pcre_extra *sd = NULL; - - ngx_stream_lua_regex_t *re; - ngx_stream_lua_main_conf_t *lmcf; - ngx_stream_lua_regex_compile_t re_comp; + int *cap = NULL, ovecsize; + u_char *p; + ngx_int_t rc; + const char *msg; + ngx_pool_t *pool, *old_pool; + ngx_stream_lua_regex_t *re = NULL; + ngx_stream_lua_main_conf_t *lmcf; + ngx_stream_lua_regex_compile_t re_comp; pool = ngx_create_pool(512, ngx_cycle->log); if (pool == NULL) { @@ -259,6 +568,8 @@ ngx_stream_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, } re->pool = pool; + re->regex = NULL; + re->regex_sd = NULL; re_comp.options = pcre_opts; re_comp.pattern.data = (u_char *) pat; @@ -280,54 +591,7 @@ ngx_stream_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, lmcf = ngx_stream_cycle_get_module_main_conf(ngx_cycle, ngx_stream_lua_module); -#if (LUA_HAVE_PCRE_JIT) - - if (flags & NGX_LUA_RE_MODE_JIT) { - - old_pool = ngx_stream_lua_pcre_malloc_init(pool); - sd = pcre_study(re_comp.regex, PCRE_STUDY_JIT_COMPILE, &msg); - ngx_stream_lua_pcre_malloc_done(old_pool); - -# if (NGX_DEBUG) - if (msg != NULL) { - ngx_log_debug2(NGX_LOG_DEBUG_STREAM, ngx_cycle->log, 0, - "pcre study failed with PCRE_STUDY_JIT_COMPILE: " - "%s (%p)", msg, sd); - } - - if (sd != NULL) { - int jitted; - - old_pool = ngx_stream_lua_pcre_malloc_init(pool); - - pcre_fullinfo(re_comp.regex, sd, PCRE_INFO_JIT, &jitted); - - ngx_stream_lua_pcre_malloc_done(old_pool); - - ngx_log_debug1(NGX_LOG_DEBUG_STREAM, ngx_cycle->log, 0, - "pcre JIT compiling result: %d", jitted); - } -# endif /* !(NGX_DEBUG) */ - - } else { - old_pool = ngx_stream_lua_pcre_malloc_init(pool); - sd = pcre_study(re_comp.regex, 0, &msg); - ngx_stream_lua_pcre_malloc_done(old_pool); - } - - if (sd && lmcf->jit_stack) { - pcre_assign_jit_stack(sd, NULL, lmcf->jit_stack); - } - -#endif /* LUA_HAVE_PCRE_JIT */ - - if (sd - && lmcf && lmcf->regex_match_limit > 0 - && !(flags & NGX_LUA_RE_MODE_DFA)) - { - sd->flags |= PCRE_EXTRA_MATCH_LIMIT; - sd->match_limit = lmcf->regex_match_limit; - } + ngx_stream_lua_regex_jit_compile(re, flags, pool, lmcf, &re_comp); if (flags & NGX_LUA_RE_MODE_DFA) { ovecsize = 2; @@ -345,6 +609,31 @@ ngx_stream_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, goto error; } +#if (NGX_PCRE2) + if (pcre2_pattern_info(re_comp.regex, PCRE2_INFO_NAMECOUNT, + &re->name_count) < 0) + { + msg = "cannot acquire named subpattern count"; + goto error; + } + + if (re->name_count > 0) { + if (pcre2_pattern_info(re_comp.regex, PCRE2_INFO_NAMEENTRYSIZE, + &re->name_entry_size) != 0) + { + msg = "cannot acquire named subpattern entry size"; + goto error; + } + + if (pcre2_pattern_info(re_comp.regex, PCRE2_INFO_NAMETABLE, + &re->name_table) != 0) + { + msg = "cannot acquire named subpattern table"; + goto error; + } + } + +#else if (pcre_fullinfo(re_comp.regex, NULL, PCRE_INFO_NAMECOUNT, &re->name_count) != 0) { @@ -367,9 +656,9 @@ ngx_stream_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, goto error; } } +#endif re->regex = re_comp.regex; - re->regex_sd = sd; re->ncaptures = re_comp.captures; re->captures = cap; re->replace = NULL; @@ -385,9 +674,7 @@ error: p = ngx_snprintf(errstr, errstr_size - 1, "%s", msg); *p = '\0'; - if (sd) { - ngx_stream_lua_regex_free_study_data(pool, sd); - } + ngx_stream_lua_regex_free_study_data(pool, re); if (pool) { ngx_destroy_pool(pool); @@ -397,6 +684,102 @@ error: } +#if (NGX_PCRE2) +int +ngx_stream_lua_ffi_exec_regex(ngx_stream_lua_regex_t *re, int flags, + const u_char *s, size_t len, int pos) +{ + int rc, exec_opts = 0; + size_t *ov; + ngx_uint_t ovecsize, n, i; + ngx_pool_t *old_pool; + + if (flags & NGX_LUA_RE_MODE_DFA) { + ovecsize = 2; + re->ncaptures = 0; + + } else { + ovecsize = (re->ncaptures + 1) * 3; + } + + old_pool = ngx_stream_lua_pcre_malloc_init(NULL); + + if (ngx_regex_match_data == NULL + || ovecsize > ngx_regex_match_data_size) + { + /* + * Allocate a match data if not yet allocated or smaller than + * needed. + */ + + if (ngx_regex_match_data) { + pcre2_match_data_free(ngx_regex_match_data); + } + + ngx_regex_match_data_size = ovecsize; + ngx_regex_match_data = pcre2_match_data_create(ovecsize / 3, NULL); + + if (ngx_regex_match_data == NULL) { + rc = PCRE2_ERROR_NOMEMORY; + goto failed; + } + } + + if (flags & NGX_LUA_RE_NO_UTF8_CHECK) { + exec_opts = PCRE2_NO_UTF_CHECK; + + } else { + exec_opts = 0; + } + + if (flags & NGX_LUA_RE_MODE_DFA) { + int ws[NGX_LUA_RE_DFA_MODE_WORKSPACE_COUNT]; + rc = pcre2_dfa_match(re->regex, s, len, pos, exec_opts, + ngx_regex_match_data, ngx_regex_match_context, + ws, sizeof(ws) / sizeof(ws[0])); + + } else { + rc = pcre2_match(re->regex, s, len, pos, exec_opts, + ngx_regex_match_data, ngx_regex_match_context); + } + + if (rc < 0) { +#if (NGX_DEBUG) + ngx_log_debug4(NGX_LOG_DEBUG_STREAM, ngx_cycle->log, 0, + "pcre2_match failed: flags 0x%05Xd, options 0x%08Xd, rc %d, " + "ovecsize %ui", flags, exec_opts, rc, ovecsize); +#endif + + goto failed; + } + + n = pcre2_get_ovector_count(ngx_regex_match_data); + ov = pcre2_get_ovector_pointer(ngx_regex_match_data); + +#if (NGX_DEBUG) + ngx_log_debug5(NGX_LOG_DEBUG_STREAM, ngx_cycle->log, 0, + "pcre2_match: flags 0x%05Xd, options 0x%08Xd, rc %d, " + "n %ui, ovecsize %ui", flags, exec_opts, rc, n, ovecsize); +#endif + + if (!(flags & NGX_LUA_RE_MODE_DFA) && n > ovecsize / 3) { + n = ovecsize / 3; + } + + for (i = 0; i < n; i++) { + re->captures[i * 2] = ov[i * 2]; + re->captures[i * 2 + 1] = ov[i * 2 + 1]; + } + +failed: + + ngx_stream_lua_pcre_malloc_done(old_pool); + + return rc; +} + +#else + int ngx_stream_lua_ffi_exec_regex(ngx_stream_lua_regex_t *re, int flags, const u_char *s, size_t len, int pos) @@ -433,7 +816,7 @@ ngx_stream_lua_ffi_exec_regex(ngx_stream_lua_regex_t *re, int flags, int ws[NGX_LUA_RE_DFA_MODE_WORKSPACE_COUNT]; rc = ngx_stream_lua_regex_dfa_exec(re->regex, sd, &subj, (int) pos, cap, ovecsize, ws, - sizeof(ws)/sizeof(ws[0]), exec_opts); + sizeof(ws) / sizeof(ws[0]), exec_opts); #else @@ -449,28 +832,19 @@ ngx_stream_lua_ffi_exec_regex(ngx_stream_lua_regex_t *re, int flags, return rc; } +#endif + void ngx_stream_lua_ffi_destroy_regex(ngx_stream_lua_regex_t *re) { - ngx_pool_t *old_pool; - dd("destroy regex called"); if (re == NULL || re->pool == NULL) { return; } - if (re->regex_sd) { - old_pool = ngx_stream_lua_pcre_malloc_init(re->pool); -#if LUA_HAVE_PCRE_JIT - pcre_free_study(re->regex_sd); -#else - pcre_free(re->regex_sd); -#endif - ngx_stream_lua_pcre_malloc_done(old_pool); - re->regex_sd = NULL; - } + ngx_stream_lua_regex_free_study_data(re->pool, re); ngx_destroy_pool(re->pool); } @@ -598,7 +972,13 @@ ngx_stream_lua_ffi_max_regex_cache_size(void) const char * ngx_stream_lua_ffi_pcre_version(void) { +#if (NGX_PCRE2) + pcre2_config(PCRE2_CONFIG_VERSION, ngx_pcre2_version); + + return ngx_pcre2_version; +#else return pcre_version(); +#endif } diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_socket_tcp.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_socket_tcp.c index 9bc38c31e..57f389d0d 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_socket_tcp.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_socket_tcp.c @@ -3185,6 +3185,25 @@ ngx_stream_lua_socket_tcp_shutdown(lua_State *L) return luaL_error(L, "no request found"); } + if (u == NULL + || u->peer.connection == NULL + || (u->read_closed && u->write_closed)) + { + lua_pushnil(L); + lua_pushliteral(L, "closed"); + return 2; + } + + if (u->write_closed) { + lua_pushnil(L); + lua_pushliteral(L, "already shutdown"); + return 2; + } + + if (u->request != r) { + return luaL_error(L, "bad request"); + } + ctx = ngx_stream_lua_get_module_ctx(r, ngx_stream_lua_module); if (ctx == NULL) { ngx_stream_lua_socket_handle_write_error(r, u, @@ -3212,25 +3231,6 @@ ngx_stream_lua_socket_tcp_shutdown(lua_State *L) ctx->eof = 1; } - if (u == NULL - || u->peer.connection == NULL - || (u->read_closed && u->write_closed)) - { - lua_pushnil(L); - lua_pushliteral(L, "closed"); - return 2; - } - - if (u->write_closed) { - lua_pushnil(L); - lua_pushliteral(L, "already shutdown"); - return 2; - } - - if (u->request != r) { - return luaL_error(L, "bad request"); - } - ngx_stream_lua_socket_check_busy_connecting(r, u, L); ngx_stream_lua_socket_check_busy_writing(r, u, L); diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_ssl_certby.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_ssl_certby.c index 7b4cc5bfa..e7733ae4b 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_ssl_certby.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_ssl_certby.c @@ -517,6 +517,8 @@ ngx_stream_lua_ssl_cert_by_chunk(lua_State *L, ngx_stream_lua_request_t *r) ctx->cur_co_ctx->co_top = 1; #endif + ngx_stream_lua_attach_co_ctx_to_L(co, ctx->cur_co_ctx); + /* register request cleanup hooks */ if (ctx->cleanup == NULL) { cln = ngx_stream_lua_cleanup_add(r, 0); diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_ssl_client_helloby.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_ssl_client_helloby.c index 3b5f6710f..57b5913f1 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_ssl_client_helloby.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_ssl_client_helloby.c @@ -503,6 +503,8 @@ ngx_stream_lua_ssl_client_hello_by_chunk(lua_State *L, ctx->cur_co_ctx->co_top = 1; #endif + ngx_stream_lua_attach_co_ctx_to_L(co, ctx->cur_co_ctx); + /* register request cleanup hooks */ if (ctx->cleanup == NULL) { cln = ngx_stream_lua_cleanup_add(r, 0); diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_timer.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_timer.c index a2d9bfa4e..64e031311 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_timer.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_timer.c @@ -694,6 +694,8 @@ ngx_stream_lua_timer_handler(ngx_event_t *ev) /* save the request in coroutine globals table */ ngx_stream_lua_set_req(tctx.co, r); + ngx_stream_lua_attach_co_ctx_to_L(tctx.co, ctx->cur_co_ctx); + lmcf->running_timers++; lua_pushboolean(tctx.co, tctx.premature); @@ -917,7 +919,7 @@ ngx_stream_lua_abort_pending_timers(ngx_event_t *ev) next = cur->parent; } else { - /* not reacheable */ + /* not reachable */ next = NULL; } diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_uthread.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_uthread.c index c48e944cf..8d906de52 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_uthread.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_uthread.c @@ -105,6 +105,8 @@ ngx_stream_lua_uthread_spawn(lua_State *L) coctx->parent_co_ctx = ctx->cur_co_ctx; ctx->cur_co_ctx = coctx; + ngx_stream_lua_attach_co_ctx_to_L(coctx->co, coctx); + ngx_stream_lua_probe_user_thread_spawn(r, L, coctx->co); dd("yielding with arg %s, top=%d, index-1:%s", luaL_typename(L, -1), @@ -282,7 +284,7 @@ ngx_stream_lua_uthread_kill(lua_State *L) return 1; } - /* not reacheable */ + /* not reachable */ } /* vi:set ft=c ts=4 sw=4 et fdm=marker: */ diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_util.c b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_util.c index 58061b497..e79f18e8c 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_util.c +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_util.c @@ -2590,6 +2590,9 @@ ngx_stream_lua_traceback(lua_State *L) ngx_stream_lua_co_ctx_t * ngx_stream_lua_get_co_ctx(lua_State *L, ngx_stream_lua_ctx_t *ctx) { +#ifdef HAVE_LUA_EXDATA2 + return (ngx_stream_lua_co_ctx_t *) lua_getexdata2(L); +#else ngx_uint_t i; ngx_list_part_t *part; @@ -2626,6 +2629,7 @@ ngx_stream_lua_get_co_ctx(lua_State *L, ngx_stream_lua_ctx_t *ctx) } return NULL; +#endif } diff --git a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_util.h b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_util.h index 61d0727bc..3ea872d09 100644 --- a/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_util.h +++ b/src/deps/src/stream-lua-nginx-module/src/ngx_stream_lua_util.h @@ -191,6 +191,16 @@ ngx_int_t ngx_stream_lua_open_and_stat_file(u_char *name, ngx_chain_t *ngx_stream_lua_chain_get_free_buf(ngx_log_t *log, ngx_pool_t *p, ngx_chain_t **free, size_t len); + +static ngx_inline void +ngx_stream_lua_attach_co_ctx_to_L(lua_State *L, ngx_stream_lua_co_ctx_t *coctx) +{ +#ifdef HAVE_LUA_EXDATA2 + lua_setexdata2(L, (void *) coctx); +#endif +} + + #ifndef OPENRESTY_LUAJIT void ngx_stream_lua_create_new_globals_table(lua_State *L, int narr, int nrec); #endif diff --git a/src/deps/src/stream-lua-nginx-module/t/034-match.t b/src/deps/src/stream-lua-nginx-module/t/034-match.t index 73cbc086f..a1cb6bf93 100644 --- a/src/deps/src/stream-lua-nginx-module/t/034-match.t +++ b/src/deps/src/stream-lua-nginx-module/t/034-match.t @@ -287,8 +287,11 @@ he end end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -505,8 +508,11 @@ regex: (?:>[\w\s]*) end end } ---- stream_response -error: pcre_compile() failed: missing ) in "([0-9]+" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile\(\) failed: missing closing parenthesis in \"\([0-9]+\"\n" +: +"error: pcre_compile\(\) failed: missing \) in \"\([0-9]+\"\n" --- no_error_log [error] @@ -745,8 +751,11 @@ nil ngx.say("not matched") end } ---- stream_response_like chop -^error: pcre_exec\(\) failed: -10$ +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] @@ -844,8 +853,14 @@ if not res then return end ---- stream_response -error: pcre_exec() failed: -8 +--- stream_response eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"failed to match\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/stream-lua-nginx-module/t/035-gmatch.t b/src/deps/src/stream-lua-nginx-module/t/035-gmatch.t index 9b829bba9..97971e752 100644 --- a/src/deps/src/stream-lua-nginx-module/t/035-gmatch.t +++ b/src/deps/src/stream-lua-nginx-module/t/035-gmatch.t @@ -568,8 +568,11 @@ not matched! ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -601,8 +604,11 @@ error: pcre_compile() failed: missing ) in "(abc" ngx.say("not matched") end } ---- stream_response_like chop -error: pcre_exec\(\) failed: -10 +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] @@ -708,8 +714,14 @@ if not res then return end ---- stream_response -error: pcre_exec() failed: -8 +--- stream_response eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"failed to match\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/stream-lua-nginx-module/t/036-sub.t b/src/deps/src/stream-lua-nginx-module/t/036-sub.t index fa426d3a5..a6f8adeb1 100644 --- a/src/deps/src/stream-lua-nginx-module/t/036-sub.t +++ b/src/deps/src/stream-lua-nginx-module/t/036-sub.t @@ -372,8 +372,11 @@ a [b c] [b] [c] [] [] d ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -394,8 +397,11 @@ error: pcre_compile() failed: missing ) in "(abc" ngx.say("error: ", err) end } ---- stream_response_like chop -error: pcre_exec\(\) failed: -10 +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] @@ -486,8 +492,14 @@ if err then end ngx.say("sub: ", cnt) ---- stream_response -error: pcre_exec() failed: -8 +--- stream_response eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"sub: 0\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/stream-lua-nginx-module/t/037-gsub.t b/src/deps/src/stream-lua-nginx-module/t/037-gsub.t index d00b6322a..a3a0be54c 100644 --- a/src/deps/src/stream-lua-nginx-module/t/037-gsub.t +++ b/src/deps/src/stream-lua-nginx-module/t/037-gsub.t @@ -327,8 +327,11 @@ n: 1 ngx.say("error: ", err) end } ---- stream_response_like chop -error: pcre_exec\(\) failed: -10 +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] @@ -423,8 +426,14 @@ if err then end ngx.say("gsub: ", cnt) ---- stream_response -error: pcre_exec() failed: -8 +--- stream_response eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +"gsub: 0\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/stream-lua-nginx-module/t/038-match-o.t b/src/deps/src/stream-lua-nginx-module/t/038-match-o.t index e5b567ebb..4e92958eb 100644 --- a/src/deps/src/stream-lua-nginx-module/t/038-match-o.t +++ b/src/deps/src/stream-lua-nginx-module/t/038-match-o.t @@ -238,8 +238,11 @@ he end end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/stream-lua-nginx-module/t/047-match-jit.t b/src/deps/src/stream-lua-nginx-module/t/047-match-jit.t index ebf446615..6dad7419e 100644 --- a/src/deps/src/stream-lua-nginx-module/t/047-match-jit.t +++ b/src/deps/src/stream-lua-nginx-module/t/047-match-jit.t @@ -28,8 +28,11 @@ __DATA__ } --- stream_response 1234 ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -45,8 +48,11 @@ pcre JIT compiling result: 1 } --- stream_response not matched! ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -64,9 +70,15 @@ pcre JIT compiling result: 1 1234 --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -85,9 +97,15 @@ qr/pcre JIT compiling result: \d+/ not matched! --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -108,8 +126,11 @@ qr/pcre JIT compiling result: \d+/ end end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -146,8 +167,15 @@ if not res then return end ---- stream_response -error: pcre_exec() failed: -8 +--- stream_response eval +# lua_regex_match_limit uses pcre_extra->match_limit in the PCRE, +# but PCRE2 replaces this with pcre2_set_match_limit interface, +# which has different effects. +$Test::Nginx::Util::PcreVersion == 2 ? +# PCRE2_ERROR_MATCHLIMIT (-47) +"error: pcre_exec() failed: -47\n" +: +"error: pcre_exec() failed: -8\n" diff --git a/src/deps/src/stream-lua-nginx-module/t/049-gmatch-jit.t b/src/deps/src/stream-lua-nginx-module/t/049-gmatch-jit.t index b5a2d6ecb..6e404f18b 100644 --- a/src/deps/src/stream-lua-nginx-module/t/049-gmatch-jit.t +++ b/src/deps/src/stream-lua-nginx-module/t/049-gmatch-jit.t @@ -30,8 +30,11 @@ __DATA__ --- stream_response hello world ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -52,8 +55,11 @@ pcre JIT compiling result: 1 nil nil nil ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -65,8 +71,11 @@ pcre JIT compiling result: 1 } --- stream_response done ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -83,8 +92,11 @@ pcre JIT compiling result: 1 } --- stream_response hello ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -104,9 +116,15 @@ hello world --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -130,9 +148,15 @@ nil nil --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -147,9 +171,15 @@ qr/pcre JIT compiling result: \d+/ done --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -169,9 +199,15 @@ qr/pcre JIT compiling result: \d+/ hello --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -186,7 +222,10 @@ qr/pcre JIT compiling result: \d+/ end ngx.say("success") } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/stream-lua-nginx-module/t/050-gmatch-dfa.t b/src/deps/src/stream-lua-nginx-module/t/050-gmatch-dfa.t index 3a0b78e63..cab4f02dc 100644 --- a/src/deps/src/stream-lua-nginx-module/t/050-gmatch-dfa.t +++ b/src/deps/src/stream-lua-nginx-module/t/050-gmatch-dfa.t @@ -171,8 +171,11 @@ hello end ngx.say("success") } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/stream-lua-nginx-module/t/051-sub-jit.t b/src/deps/src/stream-lua-nginx-module/t/051-sub-jit.t index 2334a0ca6..34c288e2a 100644 --- a/src/deps/src/stream-lua-nginx-module/t/051-sub-jit.t +++ b/src/deps/src/stream-lua-nginx-module/t/051-sub-jit.t @@ -28,8 +28,11 @@ __DATA__ } --- stream_response hello, world 5678: 1 ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -45,8 +48,11 @@ pcre JIT compiling result: 1 } --- stream_response hello, world: 0 ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -64,9 +70,15 @@ pcre JIT compiling result: 1 hello, world 5678: 1 --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -85,9 +97,15 @@ qr/pcre JIT compiling result: \d+/ hello, world: 0 --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -102,8 +120,11 @@ qr/pcre JIT compiling result: \d+/ ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -119,7 +140,10 @@ error: pcre_compile() failed: missing ) in "(abc" ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/stream-lua-nginx-module/t/052-sub-dfa.t b/src/deps/src/stream-lua-nginx-module/t/052-sub-dfa.t index b7423dfde..3865d0a54 100644 --- a/src/deps/src/stream-lua-nginx-module/t/052-sub-dfa.t +++ b/src/deps/src/stream-lua-nginx-module/t/052-sub-dfa.t @@ -87,8 +87,11 @@ hello, world: 0 ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -105,8 +108,11 @@ error: pcre_compile() failed: missing ) in "(abc" ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/stream-lua-nginx-module/t/053-gsub-jit.t b/src/deps/src/stream-lua-nginx-module/t/053-gsub-jit.t index a8efdd4c6..b792f8944 100644 --- a/src/deps/src/stream-lua-nginx-module/t/053-gsub-jit.t +++ b/src/deps/src/stream-lua-nginx-module/t/053-gsub-jit.t @@ -28,8 +28,11 @@ __DATA__ } --- stream_response hello, world world: 2 ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -45,8 +48,11 @@ pcre JIT compiling result: 1 } --- stream_response hello, world: 0 ---- error_log -pcre JIT compiling result: 1 +--- error_log eval +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully\n" +: +"pcre JIT compiling result: 1\n" @@ -64,9 +70,15 @@ pcre JIT compiling result: 1 hello, world world: 2 --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -85,9 +97,15 @@ qr/pcre JIT compiling result: \d+/ hello, world: 0 --- grep_error_log eval -qr/pcre JIT compiling result: \d+/ +$Test::Nginx::Util::PcreVersion == 2 ? +"pcre2 JIT compiled successfully" +: +"pcre JIT compiling result: 1" --- grep_error_log_out eval +$Test::Nginx::Util::PcreVersion == 2 ? +["pcre2 JIT compiled successfully\n", ""] +: ["pcre JIT compiling result: 1\n", ""] @@ -102,8 +120,11 @@ qr/pcre JIT compiling result: \d+/ ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -119,7 +140,10 @@ error: pcre_compile() failed: missing ) in "(abc" ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/stream-lua-nginx-module/t/054-gsub-dfa.t b/src/deps/src/stream-lua-nginx-module/t/054-gsub-dfa.t index c707c75fc..95f8999dc 100644 --- a/src/deps/src/stream-lua-nginx-module/t/054-gsub-dfa.t +++ b/src/deps/src/stream-lua-nginx-module/t/054-gsub-dfa.t @@ -87,8 +87,11 @@ hello, world: 0 ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" @@ -102,8 +105,11 @@ error: pcre_compile() failed: missing ) in "(abc" ngx.say("error: ", err) end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] diff --git a/src/deps/src/stream-lua-nginx-module/t/058-tcp-socket.t b/src/deps/src/stream-lua-nginx-module/t/058-tcp-socket.t index c4657a802..d0593fce5 100644 --- a/src/deps/src/stream-lua-nginx-module/t/058-tcp-socket.t +++ b/src/deps/src/stream-lua-nginx-module/t/058-tcp-socket.t @@ -4,7 +4,7 @@ use Test::Nginx::Socket::Lua::Stream; repeat_each(2); -plan tests => repeat_each() * 219; +plan tests => repeat_each() * 221; our $HtmlDir = html_dir; @@ -3526,3 +3526,22 @@ orld [error] --- error_log lua tcp socket calling receiveany() method to read at most 7 bytes + + + +=== TEST 67: shutdown on a not connected socket correctly throws error +--- stream_server_config + lua_socket_connect_timeout 1s; + resolver $TEST_NGINX_RESOLVER ipv6=off; + resolver_timeout 3s; + + content_by_lua_block { + local sock = ngx.socket.tcp() + + local ok, err = sock:shutdown('send') + ngx.log(ngx.ERR, 'shutdown on a not connected socket: ', err) + + } + +--- error_log +shutdown on a not connected socket: closed diff --git a/src/deps/src/stream-lua-nginx-module/t/075-logby.t b/src/deps/src/stream-lua-nginx-module/t/075-logby.t index c2366bddc..62ca9f8bd 100644 --- a/src/deps/src/stream-lua-nginx-module/t/075-logby.t +++ b/src/deps/src/stream-lua-nginx-module/t/075-logby.t @@ -363,3 +363,17 @@ log handler ok --- no_error_log [error] + + + +=== TEST 21: log_by_lua in stream level +--- stream_config + log_by_lua_block { ngx.log(ngx.ERR, "Hello from log_by_lua stream level: ", ngx.var.protocol) } +--- stream_server_config + content_by_lua_block { + ngx.say('hello') + } +--- stream_response +hello +--- error_log +Hello from log_by_lua stream level: TCP diff --git a/src/deps/src/stream-lua-nginx-module/t/120-re-find.t b/src/deps/src/stream-lua-nginx-module/t/120-re-find.t index 36cec76c2..c9f47b76f 100644 --- a/src/deps/src/stream-lua-nginx-module/t/120-re-find.t +++ b/src/deps/src/stream-lua-nginx-module/t/120-re-find.t @@ -301,8 +301,11 @@ matched: he end end } ---- stream_response -error: pcre_compile() failed: missing ) in "(abc" +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre2_compile() failed: missing closing parenthesis in \"(abc\"\n" +: +"error: pcre_compile() failed: missing ) in \"(abc\"\n" --- no_error_log [error] @@ -480,8 +483,11 @@ matched: hello, 1234 ngx.say("not matched") end } ---- stream_response_like chop -^error: pcre_exec\(\) failed: -10$ +--- stream_response eval +$Test::Nginx::Util::PcreVersion == 2 ? +"error: pcre_exec\(\) failed: -4\n" +: +"error: pcre_exec\(\) failed: -10\n" --- no_error_log [error] diff --git a/src/deps/src/stream-lua-nginx-module/t/163-ssl-two-verification.t b/src/deps/src/stream-lua-nginx-module/t/163-ssl-two-verification.t new file mode 100644 index 000000000..2ff3eeb1d --- /dev/null +++ b/src/deps/src/stream-lua-nginx-module/t/163-ssl-two-verification.t @@ -0,0 +1,117 @@ +# vim:set ft= ts=4 sw=4 et fdm=marker: + +use Test::Nginx::Socket::Lua::Stream; + +repeat_each(3); + +# All these tests need to have new openssl +my $NginxBinary = $ENV{'TEST_NGINX_BINARY'} || 'nginx'; +my $openssl_version = eval { `$NginxBinary -V 2>&1` }; + +if ($openssl_version =~ m/built with OpenSSL (0\S*|1\.0\S*|1\.1\.0\S*)/) { + plan(skip_all => "too old OpenSSL, need 1.1.1, was $1"); +} else { + plan tests => repeat_each() * (blocks() * 7); +} + +$ENV{TEST_NGINX_HTML_DIR} ||= html_dir(); +$ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211; + +#log_level 'warn'; +log_level 'debug'; + +no_long_string(); +#no_diff(); + +run_tests(); + +__DATA__ + +=== TEST 1: simple logging +--- stream_config + server { + listen unix:$TEST_NGINX_HTML_DIR/nginx.sock ssl; + #listen 127.0.0.1:4433 ssl; + ssl_client_hello_by_lua_block { print("ssl client hello by lua is running!") } + ssl_certificate ../../cert/test.crt; + ssl_certificate_key ../../cert/test.key; + #ssl_trusted_certificate ../../cert/test.crt; + ssl_client_certificate ../../cert/test.crt; + ssl_verify_client on; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + + log_by_lua_block { + ngx.log(ngx.INFO, "ssl_client_s_dn: ", ngx.var.ssl_client_s_dn) + } + return 'it works!\n'; + } +--- stream_server_config + lua_ssl_certificate ../../cert/test.crt; + lua_ssl_certificate_key ../../cert/test.key; + lua_ssl_trusted_certificate ../../cert/test.crt; + + content_by_lua_block { + do + local sock = ngx.socket.tcp() + + sock:settimeout(2000) + + local ok, err = sock:connect("unix:$TEST_NGINX_HTML_DIR/nginx.sock") + -- local ok, err = sock:connect("127.0.0.1", 4433) + if not ok then + ngx.say("failed to connect: ", err) + return + end + + ngx.say("connected: ", ok) + + local sess, err = sock:sslhandshake(nil, "test.com", true) + if not sess then + ngx.say("failed to do SSL handshake: ", err) + return + end + + ngx.say("ssl handshake: ", type(sess)) + + while true do + local line, err = sock:receive() + if not line then + -- ngx.say("failed to receive response status line: ", err) + break + end + + ngx.say("received: ", line) + end + + local ok, err = sock:close() + ngx.say("close: ", ok, " ", err) + end -- do + -- collectgarbage() + } + +--- stream_response +connected: 1 +ssl handshake: userdata +received: it works! +close: 1 nil + +--- error_log +lua ssl server name: "test.com" +ssl_client_s_dn: emailAddress=agentzh@gmail.com,CN=test.com,OU=OpenResty,O=OpenResty,L=San Francisco,ST=California,C=US + +--- no_error_log +[error] +[alert] +--- grep_error_log eval: qr/ssl_client_hello_by_lua:.*?,|\bssl client hello: connection reusable: \d+|\breusable connection: \d+/ +--- grep_error_log_out eval +qr/reusable connection: 1 +reusable connection: 0 +ssl client hello: connection reusable: 0 +reusable connection: 0 +ssl_client_hello_by_lua:1: ssl client hello by lua is running!, +reusable connection: 0 +reusable connection: 0 +reusable connection: 0 +reusable connection: 0 +reusable connection: 0 +/ diff --git a/src/deps/src/stream-lua-nginx-module/util/build.sh b/src/deps/src/stream-lua-nginx-module/util/build.sh index b8dc34d34..eedbb9b55 100755 --- a/src/deps/src/stream-lua-nginx-module/util/build.sh +++ b/src/deps/src/stream-lua-nginx-module/util/build.sh @@ -10,12 +10,30 @@ version=$1 force=$2 home=~ +add_http3_module=--with-http_v3_module +answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1` +if [ "$OPENSSL_VER" = "1.1.0l" ] || [ "$answer" = "N" ]; then + add_http3_module="" +fi + +disable_pcre2=--without-pcre2 +answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1` +if [ "$answer" = "N" ] || [ "$USE_PCRE2" = "Y" ]; then + disable_pcre2="" +fi +if [ "$USE_PCRE2" = "Y" ]; then + PCRE_INC=$PCRE2_INC + PCRE_LIB=$PCRE2_LIB +fi + #--add-module=$root/../stream-echo-nginx-module \ ngx-build $force $version \ --with-cc-opt="-DNGX_LUA_USE_ASSERT -I$PCRE_INC -I$OPENSSL_INC" \ --with-ld-opt="-L$PCRE_LIB -L$OPENSSL_LIB -Wl,-rpath,$PCRE_LIB:$LIBDRIZZLE_LIB:$OPENSSL_LIB" \ --with-http_stub_status_module \ --with-http_image_filter_module \ + $add_http3_module \ + $disable_pcre2 \ --with-http_ssl_module \ --without-mail_pop3_module \ --without-mail_imap_module \ diff --git a/src/deps/src/stream-lua-nginx-module/util/ver-ge b/src/deps/src/stream-lua-nginx-module/util/ver-ge new file mode 100755 index 000000000..8d7a401e9 --- /dev/null +++ b/src/deps/src/stream-lua-nginx-module/util/ver-ge @@ -0,0 +1,41 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +sub usage { + die "Usage: $0 \n"; +} + +my $a = shift or usage(); +my $b = shift or usage(); + +my @as = split /\./, $a; +my @bs = split /\./, $b; + +my $n = @as > @bs ? scalar(@as) : scalar(@bs); + +for (my $i = 0; $i < $n; $i++) { + my $x = $as[$i]; + my $y = $bs[$i]; + + if (!defined $x) { + $x = 0; + } + + if (!defined $y) { + $y = 0; + } + + if ($x > $y) { + print "Y\n"; + exit; + + } elsif ($x < $y) { + print "N\n"; + exit; + } +} + +print "Y\n"; + diff --git a/src/linux/Dockerfile-centos b/src/linux/Dockerfile-centos index 8faba7f9a..58aadd451 100644 --- a/src/linux/Dockerfile-centos +++ b/src/linux/Dockerfile-centos @@ -1,4 +1,4 @@ -FROM quay.io/centos/centos:stream8@sha256:e4e81a5e6be8f8f7eb511a8df3afcd4e7123e68c56bc03efc40fbd0ab5b2e4fd +FROM quay.io/centos/centos:stream8@sha256:a8692b39e546eed9177d495db1edfd97bb6de70b9527f58aeb72f90b687c3426 ENV OS=centos ENV NGINX_VERSION 1.24.0 diff --git a/src/linux/Dockerfile-debian b/src/linux/Dockerfile-debian index 486afcfa9..fbea5fa88 100644 --- a/src/linux/Dockerfile-debian +++ b/src/linux/Dockerfile-debian @@ -1,4 +1,4 @@ -FROM debian:bookworm-slim@sha256:2bc5c236e9b262645a323e9088dfa3bb1ecb16cc75811daf40a23a824d665be9 +FROM debian:bookworm-slim@sha256:f4a83aa865a2b4a064ff142aa91c713180df9fcb86ce676b5de2981029379c37 ENV OS=debian ENV NGINX_VERSION 1.24.0 diff --git a/src/linux/Dockerfile-rhel b/src/linux/Dockerfile-rhel index ff8929dd1..cb4087366 100644 --- a/src/linux/Dockerfile-rhel +++ b/src/linux/Dockerfile-rhel @@ -1,4 +1,4 @@ -FROM redhat/ubi8:8.9@sha256:449da7f8f2ef6285a8445a1e31af57a97b9dae5dcf009b1629c59742c89c68c3 +FROM redhat/ubi8:8.9@sha256:1fdb97f2d2a44fdef3feaa69100f154631bae65130105ac685d0e34eb1d8c3d0 ENV OS=rhel ENV NGINX_VERSION 1.24.0 diff --git a/src/linux/Dockerfile-ubuntu b/src/linux/Dockerfile-ubuntu index a7afdabac..3f71804fd 100644 --- a/src/linux/Dockerfile-ubuntu +++ b/src/linux/Dockerfile-ubuntu @@ -1,4 +1,4 @@ -FROM ubuntu:22.04@sha256:8eab65df33a6de2844c9aefd19efe8ddb87b7df5e9185a4ab73af936225685bb +FROM ubuntu:22.04@sha256:6042500cf4b44023ea1894effe7890666b0c5c7871ed83a97c36c76ae560bb9b ENV OS=ubuntu ENV NGINX_VERSION 1.24.0 diff --git a/src/scheduler/Dockerfile b/src/scheduler/Dockerfile index 7f257f4ed..db1478f50 100644 --- a/src/scheduler/Dockerfile +++ b/src/scheduler/Dockerfile @@ -77,7 +77,7 @@ COPY --chown=root:scheduler src/bw/misc/country.mmdb /var/tmp/bunkerweb/country. RUN chmod 770 /var/tmp/bunkerweb/asn.mmdb /var/tmp/bunkerweb/country.mmdb # Fix CVEs -# There are no CVEs to fix in this image +RUN apk add --no-cache "libcrypto3>=3.1.4-r3" "libssl3>=3.1.4-r3" VOLUME /data /etc/nginx diff --git a/src/scheduler/requirements.in b/src/scheduler/requirements.in index 0f9edac7c..90385e1dc 100644 --- a/src/scheduler/requirements.in +++ b/src/scheduler/requirements.in @@ -1,7 +1,7 @@ certbot==2.8.0 configobj==5.0.8 cryptography==41.0.7 -maxminddb==2.5.1 +maxminddb==2.5.2 python-magic==0.4.27 schedule==1.2.1 urllib3<2.0.0 diff --git a/src/scheduler/requirements.txt b/src/scheduler/requirements.txt index bd3bec36a..8e4d628e4 100644 --- a/src/scheduler/requirements.txt +++ b/src/scheduler/requirements.txt @@ -220,55 +220,55 @@ josepy==1.14.0 \ # via # acme # certbot -maxminddb==2.5.1 \ - --hash=sha256:0702da59b9670a72761b65cb1a52bc3032d8f6799bdab641cb8350ad5740580b \ - --hash=sha256:0a21abd85e10e5e0f60244b49c3db17e7e48befd4972e62a62833d91e2acbb49 \ - --hash=sha256:0cbd272db3202e948c9088e48dec62add071a47971d84ceb11d2cb2880f83e5a \ - --hash=sha256:17ea454f61631b9815d420d48d00663f8718fc7de30be53ffcec0f73989475eb \ - --hash=sha256:188173c07dce0692fd5660a6eb7ea8c126d7b3a4b61496c8a8ee9e8b10186ff5 \ - --hash=sha256:1e091c2b44673c218ee2df23adbc0b6d04fd5c646cfcb6c6fe26fb849434812a \ - --hash=sha256:2a7a73ab4bbc16b81983531c99fa102a0c7dae459db958c17fea48c981f5e764 \ - --hash=sha256:2c2901daebd7c8a702302315e7a58cdc38e626406ad4a05b4d48634897d5f5a3 \ - --hash=sha256:2e20a70c1545d6626dcd4ce2d7ecf3d566d978ea64cb37e7952f93baff66b812 \ - --hash=sha256:2ecb1be961f1969be047d07743093f0dcf2f6d4ec3a06a4555587f380a96f6e7 \ - --hash=sha256:3ce1f42bdfce7b86cb5a56cba730fed611fb879d867e6024f0d520257bef6891 \ - --hash=sha256:3d52c693baf07bba897d109b0ecb067f21fd0cc0fb266d67db456e85b80d699e \ - --hash=sha256:4807d374e645bd68334e4f487ba85a27189dbc1267a98e644aa686a7927e0559 \ - --hash=sha256:4c67621e842c415ce336ab019a9f087305dfcf24c095b68b8e9d27848f6f6d91 \ - --hash=sha256:500d321bdefe4dcd351e4390a79b7786aab49b0536bedfa0788e5ffb0e91e421 \ - --hash=sha256:526744b12075051fa20979090c111cc3a42a3b55e2714818270c7b84a41a8cfe \ - --hash=sha256:5a6751e2e89d62d53217870bcc2a8c887dc56ae370ba1b74e52e880761916e54 \ - --hash=sha256:5d772be68cce812f7c4b15ae8c68e624c8b88ff83071e3903ca5b5f55e343c25 \ - --hash=sha256:607344b1079ea647629bf962dcea7580ec864faaad3f5aae650e2e8652121d89 \ - --hash=sha256:62e93a8e99937bf4307eeece3ca37e1161325ebf9363c4ce195410fb5daf64a0 \ - --hash=sha256:639aee8abd63a95baa12b94b6f3a842d51877d631879c7d08c98c68dc44a84c3 \ - --hash=sha256:6667948e7501a513caef90edda2d367865097239d4c2381eb3998e9905af7209 \ - --hash=sha256:7805ae8c9de433c38939ada2e376706a9f6740239f61fd445927b88f5b42c267 \ - --hash=sha256:85a302d79577efe5bc308647394ffdc535dd5f062644c41103604ccf24931a05 \ - --hash=sha256:892c11a8694394e97d3ac0f8d5974ea588c732d14e721f22095c58b4f584c144 \ - --hash=sha256:8b98ed5c34955c48e72d35daed713ba4a6833a8a6d1204e79d2c85e644049792 \ - --hash=sha256:8cee4315da7cdd3f2a18f1ab1418953a7a9eda65e63095b01f03c7d3645d633e \ - --hash=sha256:910e7b3ad87d5352ed3f496bd42bffbf9f896245278b0d8e76afa1382e42a7ae \ - --hash=sha256:93f7055779caf7753810f1e2c6444af6d727393fd116ffa0767fbd54fb8c9bbf \ - --hash=sha256:969d0057ea5472e0b574c5293c4f3ecf49585362351c543e8ea55dc48b60f1eb \ - --hash=sha256:a01b0341bd6bee431bb8c07c7ac0ed221250c7390b125c025b7d57578e78e8a3 \ - --hash=sha256:a1e1a19f9740f586362f47862d0095b54d50b9d465babcaa8a563746132fe5be \ - --hash=sha256:aae262da1940a67c3ba765c49e2308947ce68ff647f87630002c306433a98ca1 \ - --hash=sha256:b0bbbd58b300aaddf985f763720bdebba9f7a73168ff9f57168117f630ad1c06 \ - --hash=sha256:b223c53077a736c304b63cf5afceb928975fbd12ddae5afd6b71370bab7b4700 \ - --hash=sha256:b477852cf1741d9187b021e23723e64b063794bbf946a9b5b84cc222f3caf58a \ - --hash=sha256:c4e5ca423b1e310f0327536f5ed1a2c6e08d83289a7f909e021590b0b477cae2 \ - --hash=sha256:c97eac5af102cede4b5f57cecb25e8f949fa4e4a8d812bed575539951c60ecaf \ - --hash=sha256:d4d36cf3d390f02d2bdf53d9efefb92be7bd70e07a5a86cdb79020c48c2d81b7 \ - --hash=sha256:d654895b546a47e85f2e071b98e377a60bb03cd643b9423017fa66fcd5adedce \ - --hash=sha256:dd28c434fb44f825dde6a75df2c338d44645791b03480af66a4d993f93801e10 \ - --hash=sha256:e09b295c401c104ae0e30f66c1a3f3c2aa4ba2cbe12a787576499356a5a4d6c1 \ - --hash=sha256:ea2e27a507b53dfbf2ba2ba85c98682a1ad2dac3f9941a7bffa5cb86150d0c47 \ - --hash=sha256:ef4d508c899ce0f37de731340759c68bfd1102a39a873675c71fae2c8d71ad97 \ - --hash=sha256:f1e5bd58b71f322dc6c16a95a129433b1bc229d4b714f870a61c2367425396ee \ - --hash=sha256:fad45cd2f2e3c5fbebacb8d172a60fb22443222e549bf740a0bc7eeb849e5ce7 \ - --hash=sha256:fbd01fc7d7b5b2befe914e8cdb5ed3a1c5476e57b765197cceff8d897f33d012 \ - --hash=sha256:fe0af3ba9e1a78ed5f2ad32fc18d18b78ef233e7d0c627e1a77a525a7eb0c241 +maxminddb==2.5.2 \ + --hash=sha256:08a540ec3661f6ca40499c86028e96dca5780e9d471b485dc797859b0b22dd22 \ + --hash=sha256:099f4e27feec4bb9658034a3eb853e746721fc15709030bee4f2f889f4a34185 \ + --hash=sha256:1409a045eb04cebb297221eab1020c4f05434d02c0961410f6996ef474482998 \ + --hash=sha256:17de49660372dcccaa23958eccdd1c2464f92f594d027045ad76788db14a5da4 \ + --hash=sha256:17fdb691c389a0e956410d5baef9ad082a0aa67dd6aa231d193499e71a104c19 \ + --hash=sha256:19d8d1e9bbc5281fb4c8112d541d2bd350fd8b5ddfbb43a6951e46df7cd27b9d \ + --hash=sha256:1a3fab6bea6cc59444e6bad2a4fbf91228f6f51dcb29d09ed091930a475bd8cb \ + --hash=sha256:20596e452d03071db37a72c8ef9236126c04ed342864f68db0adf0d1bc9f642e \ + --hash=sha256:22184fa2514c15f5b39e4e2522f4f73d00afcf5eb7102c473f9376f3c3a03b81 \ + --hash=sha256:29d63e7711e5f95c7c190010e57dca9e262aee8ac300aaf75c3f7ede0b5a5863 \ + --hash=sha256:2bba43d370a57785f5ef61c10d0b4bf8de58d431da3c4c2ed78bb2ff3d07edbf \ + --hash=sha256:2cb718908b9dffa10e02361094158ae68ded5a82c750de89737437999a81bafe \ + --hash=sha256:2e01b09480b97d2ebe6765618fb12a0f52caa17368d6cf1f42481d6740428de7 \ + --hash=sha256:2ec51b66774b102824c9a3dd4916356283f6a61db1868d4ebcb98bf26486718e \ + --hash=sha256:335ee3140b41d4e751c14f8fae297aa064c7d3f184c9fbb2790336123187c440 \ + --hash=sha256:3ddbe547d83a2e28e81d9f59fd9708d3044ffb2398ee0f8df2e2a2e9cdea6646 \ + --hash=sha256:3e9198d25e252b27d4e9526d5fcd4b78341c23153363a94f1246de5afcd39f6d \ + --hash=sha256:3fe6bb1b5ea132fcd9fd7b16c80247f0ba667018d5f9f98cd645b297e3b02fbf \ + --hash=sha256:461dcf0a4f67aa1c9faea6d52c4060d39559bf68e99a514cf8c1e01af383f90b \ + --hash=sha256:5a5053231228d7cbf57d98a741b3cbee9efa9e689348dbb56c414e5a4c7f6f1c \ + --hash=sha256:5cb6702fbcc5b209ac3cffacd9cf0a5155feabbeb6fdcf497038be7cb6e52da6 \ + --hash=sha256:67f97cd0c6aac39a51294b04a1e922532125285c24b18a58e2a9c92c7691fa9f \ + --hash=sha256:6f50210506e9818162ef6706d3127efb0575dfe2cc98a7236ca2011f1cc3effe \ + --hash=sha256:6fda0dd512f345cc92492f96c61a0df47efc2e2064c15e8053ab2114b362d64d \ + --hash=sha256:862fcfe226ebda29a537cdce678dc8dc71ca6540ad2483099f80c6a1ee4cdbdd \ + --hash=sha256:8b89129de70e1629f200df9dfda4e4f477c26b05c29e0836604a00209c9466d5 \ + --hash=sha256:94183a78628cad257183a88ce12a3bb9ffbfe0544bd0c1aafc1f9dc55629dd1b \ + --hash=sha256:955a3ec4b161e872cc615b7a09ae9770049e9794e7b3832e3d78905a65c5049d \ + --hash=sha256:a99e3125528ea31e807f80e8c5b65118dc5cc122d0a435f1691a3cc1df55840c \ + --hash=sha256:abd626efaba4f0bc867462337f846796da0bb97b82125dbdbc63067947e353b0 \ + --hash=sha256:ae05c4f87b1dd9a21d430c52451eef5f3bd5af609d093408db91fe0dc4d8d7d1 \ + --hash=sha256:ae98508a200db6f7ae5985a53039aba8eef7ed71d34b0a0e9c9145c3e6139fc3 \ + --hash=sha256:b0203fa2731da45e5461f6e8a0768e85bba8e02137a1598b3fcadf7cbfe8e6f2 \ + --hash=sha256:b3c33e4fc7821ee6c9f40837116e16ab6175863d4a64eee024c5bec686690a87 \ + --hash=sha256:b6adf63695fa5e3d2549f7c2c9d82c6d252edd5c6ba67074637d2cb944143673 \ + --hash=sha256:b85b008f8e2cf3abfabdc24041549c51c97ea9a8bc46eeeadac8cec7acf9fbf0 \ + --hash=sha256:bac5a29fdc5df9222f7baecbcc4a88b309a66a7d147b34160940c0850ee4b9c5 \ + --hash=sha256:bca70905515fe50684974a9afaa7db4a4e9fbfdebcb0c2cde9db8e048e0d8145 \ + --hash=sha256:c0c3ebfc0af00445089629faffa4c5a1fcc42a1ca5d7dffc42bba314fde20c6d \ + --hash=sha256:c204f53ef7c1d77e9fb0dba415dbb56419f2b08ccaca66cd772e29b3a793c3e7 \ + --hash=sha256:d71b48d3dff9150a44e949b28fa5e7251a7a6895a3a77e200ce08410f096f12f \ + --hash=sha256:d839c480e4b93bb37bb1cc2777d77e6b2127c006e60b56f748f10571d8b0e471 \ + --hash=sha256:dd47d13376eaee2e8d1a1fb55d3d6ccdcc995bc931699967f7d5670ec6a454a3 \ + --hash=sha256:e012e889639aab411f5483990188da51c968377f665dcb90584971dbf314d50a \ + --hash=sha256:e0faa0c4c458eb0eb2f267daa7b106baef72c3c7ebcbece00b9e974fc8321412 \ + --hash=sha256:e7e8688342bab592647313cd2054779bcd35ad85933424ceae9f07e3a9779986 \ + --hash=sha256:ed504ca9f3c42e8e71bdbe21f5b818139a1448ac15d7bb6ce12cf41e3b7e2067 \ + --hash=sha256:f5682963a5817066db50f219c33aaa7eb969888211a289a444c42b5dfa0c0f78 # via -r requirements.in parsedatetime==2.6 \ --hash=sha256:4cb368fbb18a0b7231f4d76119165451c8d2e35951455dfee97c62a87b04d455 \ diff --git a/src/ui/Dockerfile b/src/ui/Dockerfile index 64b15011e..71d92dd9b 100644 --- a/src/ui/Dockerfile +++ b/src/ui/Dockerfile @@ -70,7 +70,7 @@ RUN apk add --no-cache bash && \ ln -s /proc/1/fd/2 /var/log/bunkerweb/ui.log # Fix CVEs -# There are no CVEs to fix in this image +RUN apk add --no-cache "libcrypto3>=3.1.4-r3" "libssl3>=3.1.4-r3" VOLUME /data /etc/nginx diff --git a/src/ui/requirements.txt b/src/ui/requirements.txt index 5e78bcb2d..9e91d6dd8 100644 --- a/src/ui/requirements.txt +++ b/src/ui/requirements.txt @@ -78,9 +78,9 @@ itsdangerous==2.1.2 \ # via # flask # flask-wtf -jinja2==3.1.2 \ - --hash=sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852 \ - --hash=sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61 +jinja2==3.1.3 \ + --hash=sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa \ + --hash=sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90 # via flask markupsafe==2.1.3 \ --hash=sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e \ @@ -281,9 +281,9 @@ werkzeug==3.0.1 \ # -r requirements.in # flask # flask-login -wtforms==3.1.1 \ - --hash=sha256:5e51df8af9a60f6beead75efa10975e97768825a82146a65c7cbf5b915990620 \ - --hash=sha256:ae7c54b29806c70f7bce8eb9f24afceb10ca5c32af3d9f04f74d2f66ccc5c7e0 +wtforms==3.1.2 \ + --hash=sha256:bf831c042829c8cdbad74c27575098d541d039b1faa74c771545ecac916f2c07 \ + --hash=sha256:f8d76180d7239c94c6322f7990ae1216dae3659b7aa1cee94b6318bdffb474b9 # via flask-wtf zipp==3.17.0 \ --hash=sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31 \ diff --git a/src/ui/static/css/dashboard.css b/src/ui/static/css/dashboard.css index 500c971d0..621b45455 100644 --- a/src/ui/static/css/dashboard.css +++ b/src/ui/static/css/dashboard.css @@ -1 +1 @@ -/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e9ecef}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Open Sans;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#ced4da}input::placeholder,textarea::placeholder{opacity:1;color:#ced4da}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#5e72e480;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:1.5rem!important;padding-left:1.5rem!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:1.5rem;padding-left:1.5rem}@media (min-width:340px){.\!container{max-width:340px!important}.container{max-width:340px}}@media (min-width:576px){.\!container{max-width:576px!important}.container{max-width:576px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:992px){.\!container{max-width:992px!important}.container{max-width:992px}}@media (min-width:1200px){.\!container{max-width:1200px!important}.container{max-width:1200px}}@media (min-width:1320px){.\!container{max-width:1320px!important}.container{max-width:1320px}}@media (min-width:1920px){.\!container{max-width:1920px!important}.container{max-width:1920px}}a{letter-spacing:-.025rem}hr{margin:1rem 0;border:0;opacity:.25}img{max-width:none}label{display:inline-block}p{line-height:1.625;font-weight:400;margin-bottom:1rem}small{font-size:.875em}svg{display:inline}table{border-collapse:inherit}h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;color:#344767}h1,h2,h3,h4{letter-spacing:-.05rem}h1,h2,h3{font-weight:700}h4,h5,h6{font-weight:600}h1{font-size:3rem;line-height:1.25}h2{font-size:2.25rem;line-height:1.3}h3{font-size:1.875rem}h3,h4{line-height:1.375}h4{font-size:1.5rem}h5{font-size:1.25rem;line-height:1.375}h6{font-size:1rem;line-height:1.625}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-y-0{top:0;bottom:0}.-left-full{left:-100%}.-right-0{right:0}.-right-1{right:-.25rem}.bottom-0{bottom:0}.left-0{left:0}.left-auto{left:auto}.left-full{left:100%}.right-0{right:0}.right-2{right:.5rem}.right-20{right:5rem}.right-4{right:1rem}.right-5{right:1.25rem}.right-6{right:1.5rem}.right-7{right:1.75rem}.right-8{right:2rem}.right-\[3\.25rem\]{right:3.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-16{top:4rem}.top-2{top:.5rem}.top-4{top:1rem}.top-\[38\%\]{top:38%}.top-\[4\.5rem\]{top:4.5rem}.top-\[52\%\]{top:52%}.top-\[55\%\]{top:55%}.top-\[8\.2rem\]{top:8.2rem}.-z-10{z-index:-10}.z-10{z-index:10}.z-100{z-index:100}.z-110{z-index:110}.z-20{z-index:20}.z-990{z-index:990}.z-\[10000\]{z-index:10000}.z-\[1000\]{z-index:1000}.z-\[1001\]{z-index:1001}.z-\[20\]{z-index:20}.z-sticky{z-index:1020}.order-1{order:1}.order-2{order:2}.col-span-1{grid-column:span 1/span 1}.col-span-10{grid-column:span 10/span 10}.col-span-11{grid-column:span 11/span 11}.col-span-12{grid-column:span 12/span 12}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-9{grid-column:span 9/span 9}.float-right{float:right}.float-left{float:left}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.mx-0{margin-left:0;margin-right:0}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-2\.5{margin-left:.625rem;margin-right:.625rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-7{margin-bottom:1.75rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-12{margin-right:3rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[4\.5rem\]{margin-top:4.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\/3{height:33.333333%}.h-12{height:3rem}.h-14{height:3.5rem}.h-19{height:4.75rem}.h-3{height:.75rem}.h-4{height:1rem}.h-4\.5{height:1.125rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-5\.5{height:1.375rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[2\.5rem\]{height:2.5rem}.h-\[3\.5rem\]{height:3.5rem}.h-\[4rem\]{height:4rem}.h-\[90vh\]{height:90vh}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.h-sidenav{height:calc(100vh - 450px)}.max-h-100{max-height:25rem}.max-h-135{max-height:33.75rem}.max-h-30{max-height:7.5rem}.max-h-80{max-height:20rem}.max-h-90{max-height:22.5rem}.max-h-screen{max-height:100vh}.min-h-12{min-height:3rem}.min-h-20{min-height:5rem}.min-h-50-screen{min-height:50vh}.min-h-52{min-height:13rem}.min-h-6{min-height:1.5rem}.min-h-\[100px\]{min-height:100px}.min-h-\[350px\]{min-height:350px}.min-h-\[55vh\]{min-height:55vh}.min-h-\[75px\]{min-height:75px}.min-h-\[85vh\]{min-height:85vh}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-28{width:7rem}.w-3{width:.75rem}.w-4{width:1rem}.w-4\.5{width:1.125rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-5\.5{width:1.375rem}.w-50{width:12.5rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-80{width:20rem}.w-90{width:22.5rem}.w-\[2\.5rem\]{width:2.5rem}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-\[900px\]{min-width:900px}.max-w-180{max-width:45rem}.max-w-40{max-width:10rem}.max-w-60{max-width:15rem}.max-w-64{max-width:16rem}.max-w-\[1920px\]{max-width:1920px}.max-w-\[300px\]{max-width:300px}.max-w-\[400px\]{max-width:400px}.max-w-\[550px\]{max-width:550px}.max-w-full{max-width:100%}.flex-auto{flex:1 1 auto}.grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1{--tw-translate-x:-0.25rem}.-translate-x-1,.-translate-x-1\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\.5{--tw-translate-x:-0.375rem}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0{--tw-translate-y:-0px}.-translate-y-0\.4{--tw-translate-y:-0.1rem}.-translate-y-0\.4,.-translate-y-0\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0\.5{--tw-translate-y:-0.125rem}.-translate-y-1{--tw-translate-y:-0.25rem}.-translate-y-1,.-translate-y-1\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\.5{--tw-translate-y:-0.375rem}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-0\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0\.5{--tw-translate-x:0.125rem}.translate-x-1{--tw-translate-x:0.25rem}.translate-x-1,.translate-x-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-2{--tw-translate-x:0.5rem}.translate-x-90{--tw-translate-x:22.5rem}.translate-x-90,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-0\.5{--tw-translate-y:0.125rem}.translate-y-0\.5,.translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1{--tw-translate-y:0.25rem}.translate-y-16{--tw-translate-y:4rem}.translate-y-16,.translate-y-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y:0.5rem}.-rotate-12{--tw-rotate:-12deg}.-rotate-12,.rotate-12{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-12{--tw-rotate:12deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.scale-105{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x:1.05;--tw-scale-y:1.05}.scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}.scale-110,.scale-50{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-50{--tw-scale-x:.5;--tw-scale-y:.5}.scale-90{--tw-scale-x:.9;--tw-scale-y:.9}.scale-90,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-8{gap:2rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded,.rounded-1{border-radius:.25rem}.rounded-1\.4{border-radius:.35rem}.rounded-10{border-radius:2.5rem}.rounded-2xl{border-radius:1rem}.rounded-circle{border-radius:50%}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-none{border-radius:0}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-left-radius:.5rem}.rounded-b-lg,.rounded-r-lg{border-bottom-right-radius:.5rem}.rounded-r-lg{border-top-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-gray-200{--tw-border-opacity:1;border-color:rgb(233 236 239/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(210 214 218/var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(206 212 218/var(--tw-border-opacity))}.border-primary{--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(94 114 228/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(235 239 244/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(233 236 239/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(210 214 218/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(248 249 250/var(--tw-bg-opacity))}.bg-gray-600\/50{background-color:#6c757d80}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(251 99 64/var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}.bg-primary\/20{background-color:#0b557733}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(245 57 57/var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity:1;background-color:rgb(46 172 104/var(--tw-bg-opacity))}.bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity))}.bg-slate-800\/10{background-color:#3a416f1a}.bg-transparent{background-color:initial}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(251 177 64/var(--tw-bg-opacity))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-tl{background-image:linear-gradient(to top left,var(--tw-gradient-stops))}.bg-none{background-image:none}.from-transparent{--tw-gradient-from:#0000 var(--tw-gradient-from-position);--tw-gradient-to:#0000 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-black\/40{--tw-gradient-to:#0000 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#0006 var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-transparent{--tw-gradient-to:#0000 var(--tw-gradient-to-position)}.bg-150{background-size:150%}.bg-contain{background-size:contain}.bg-clip-border{background-clip:initial}.bg-clip-padding{background-clip:padding-box}.bg-center{background-position:50%}.bg-left{background-position:0}.bg-x-25{background-position:25% 0}.bg-no-repeat{background-repeat:no-repeat}.fill-amber-500{fill:#f59e0b}.fill-blue-500{fill:#5e72e4}.fill-gray-500{fill:#adb5bd}.fill-gray-600{fill:#6c757d}.fill-green-500{fill:#22c55e}.fill-primary{fill:#0b5577}.fill-red-500{fill:#f53939}.fill-sky-500{fill:#0ea5e9}.fill-slate-800{fill:#3a416f}.fill-white{fill:#fff}.fill-yellow-500{fill:#fbb140}.stroke-blue-400{stroke:#60a5fa}.stroke-blue-500{stroke:#5e72e4}.stroke-emerald-600{stroke:#059669}.stroke-gray-100{stroke:#ebeff4}.stroke-gray-600{stroke:#6c757d}.stroke-gray-700{stroke:#495057}.stroke-green-700{stroke:#15803d}.stroke-orange-500{stroke:#fb6340}.stroke-pink-600{stroke:#db2777}.stroke-red-500{stroke:#f53939}.stroke-sky-500{stroke:#0ea5e9}.stroke-yellow-500{stroke:#fbb140}.stroke-0{stroke-width:0}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-0{padding-bottom:0}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-8{padding-bottom:2rem}.pl-0{padding-left:0}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-0{padding-right:0}.pr-8{padding-right:2rem}.pt-1{padding-top:.25rem}.pt-10{padding-top:2.5rem}.pt-20{padding-top:5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-sans{font-family:Open Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-5{line-height:1.25rem}.leading-5\.6{line-height:1.4rem}.leading-6{line-height:1.5rem}.leading-8{line-height:2rem}.leading-default{line-height:1.6}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-tight{line-height:1.25}.tracking-normal{letter-spacing:0}.tracking-tight-rem{letter-spacing:-.025rem}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-blue-500{--tw-text-opacity:1;color:rgb(94 114 228/var(--tw-text-opacity))}.text-emerald-500{--tw-text-opacity:1;color:rgb(45 206 137/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(235 239 244/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(108 117 125/var(--tw-text-opacity))}.text-gray-600\/90{color:#6c757de6}.text-gray-700{--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity))}.text-gray-700\/80{color:#495057cc}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-primary{--tw-text-opacity:1;color:rgb(11 85 119/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(245 57 57/var(--tw-text-opacity))}.text-sky-600{--tw-text-opacity:1;color:rgb(62 161 236/var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity:1;color:rgb(103 116 142/var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity:1;color:rgb(52 71 103/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgb(251 177 64/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-3xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3xl{--tw-shadow:0 8px 26px -4px #14141426,0 8px 9px -5px #1414140f;--tw-shadow-colored:0 8px 26px -4px var(--tw-shadow-color),0 8px 9px -5px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.shadow-md,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-sm{--tw-shadow:0 .25rem .375rem -.0625rem #1414141f,0 .125rem .25rem -.0625rem #14141412;--tw-shadow-colored:0 .25rem .375rem -.0625rem var(--tw-shadow-color),0 .125rem .25rem -.0625rem var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 0 2rem 0 #8898aa26;--tw-shadow-colored:0 0 2rem 0 var(--tw-shadow-color)}.shadow-xs{--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid #0000;outline-offset:2px}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:ease;transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:ease;transition-duration:.15s}.delay-200{transition-delay:.2s}.duration-200{transition-duration:.2s}.duration-250{transition-duration:.25s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.ease-in{transition-timing-function:ease-in}.ease-in-out{transition-timing-function:ease-in-out}.flex-wrap-inherit{flex-wrap:inherit}@font-face{font-family:Open Sans;src:url(../webfonts/OpenSans.ttf)}*{font-family:Open Sans,sans-serif!important}.ace_content,.ace_editor,.ace_editor div{font-family:Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace!important;font-size:16px!important;font-weight:400!important}.sr-only{display:none}.close-btn{display:inline-block;cursor:pointer;border-radius:.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(245 57 57/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:-.025rem;--tw-text-opacity:1;color:rgb(245 57 57/var(--tw-text-opacity));--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.close-btn,.close-btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.close-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.close-btn:focus,.close-btn:hover{background-color:#fffc}.close-btn:active{opacity:.85}:is(.dark .close-btn){--tw-bg-opacity:1;background-color:rgb(233 236 239/var(--tw-bg-opacity));--tw-brightness:brightness(.9)}:is(.dark .close-btn),:is(.dark .close-btn:hover){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .close-btn:hover){--tw-brightness:brightness(.75)}.valid-btn{display:inline-block;cursor:pointer;border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:.025em;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.valid-btn,.valid-btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.valid-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.valid-btn:focus,.valid-btn:hover{background-color:#22c55ecc}.valid-btn:active{opacity:.85}:is(.dark .valid-btn){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.delete-btn{display:inline-block;cursor:pointer;border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(245 57 57/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:.025em;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.delete-btn,.delete-btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.delete-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.delete-btn:focus,.delete-btn:hover{background-color:#f53939cc}.delete-btn:active{opacity:.85}:is(.dark .delete-btn){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.edit-btn{display:inline-block;cursor:pointer;border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(251 177 64/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:.025em;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.edit-btn,.edit-btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.edit-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.edit-btn:focus,.edit-btn:hover{background-color:#fbb140cc}.edit-btn:active{opacity:.85}:is(.dark .edit-btn){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.info-btn{display:inline-block;cursor:pointer;border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:.025em;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.info-btn,.info-btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.info-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.info-btn:focus,.info-btn:hover{background-color:#0ea5e9cc}.info-btn:active{opacity:.85}:is(.dark .info-btn){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.checkbox{position:relative;z-index:10;float:left;margin-top:.25rem;height:1.25rem;width:1.25rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.35rem;border-width:1px;border-color:rgb(210 214 218/var(--tw-border-opacity));background-color:rgb(255 255 255/var(--tw-bg-opacity));background-size:contain;background-position:50%;background-repeat:no-repeat;vertical-align:top;font-size:1rem;line-height:1.5rem;transition-property:all;transition-timing-function:ease;transition-duration:.25s}.checkbox,.checkbox:disabled{--tw-border-opacity:1;--tw-bg-opacity:1}.checkbox:disabled{cursor:default;border-color:rgb(206 212 218/var(--tw-border-opacity));background-color:rgb(206 212 218/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity))}.checkbox[data-checked=true]{z-index:0;--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}.checkbox:disabled[data-checked=true]{--tw-border-opacity:1;border-color:rgb(206 212 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(206 212 218/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity))}:is(.dark .checkbox){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity))}:is(.dark .checkbox:disabled){--tw-border-opacity:1;border-color:rgb(37 47 64/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(37 47 64/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .checkbox[data-checked=true]){--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}:is(.dark .checkbox:disabled[data-checked=true]){--tw-border-opacity:1;border-color:rgb(37 47 64/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(37 47 64/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}.custom-select-btn{display:flex;width:100%;align-items:center;justify-content:space-between;border-radius:.5rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(210 214 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));background-clip:padding-box;padding:.25rem .375rem;text-align:left;vertical-align:middle;font-size:.875rem;font-weight:400;line-height:1.4rem;--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity));transition-property:all;transition-timing-function:ease;transition-duration:.3s;transition-timing-function:ease-in-out}.custom-select-btn::-moz-placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.custom-select-btn::placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.custom-select-btn:focus{--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity))}.custom-select-btn:disabled{--tw-border-opacity:1;border-color:rgb(206 212 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(206 212 218/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity));opacity:.75}:is(.dark .custom-select-btn){border-color:rgb(98 117 148/var(--tw-border-opacity));background-color:rgb(52 71 103/var(--tw-bg-opacity));opacity:.9}:is(.dark .custom-select-btn),:is(.dark .custom-select-btn:disabled){--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .custom-select-btn:disabled){border-color:rgb(37 47 64/var(--tw-border-opacity));background-color:rgb(37 47 64/var(--tw-bg-opacity))}@media (min-width:768px){.custom-select-btn{padding:.5rem .75rem}}.custom-dropdown-btn{position:relative;margin-top:0;margin-bottom:0;min-height:38px;cursor:pointer;border-radius:0;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;--tw-border-opacity:1;border-color:rgb(210 214 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.5rem 1.5rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;line-height:1.5;letter-spacing:-.025rem;--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity));transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.custom-dropdown-btn:hover{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .custom-dropdown-btn){border-color:rgb(98 117 148/var(--tw-border-opacity));background-color:rgb(52 71 103/var(--tw-bg-opacity))}.active.custom-dropdown-btn,:is(.dark .custom-dropdown-btn){--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}.active.custom-dropdown-btn{position:relative;margin-top:0;margin-bottom:0;min-height:38px;cursor:pointer;border-radius:0;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;border-color:rgb(210 214 218/var(--tw-border-opacity));background-color:rgb(11 85 119/var(--tw-bg-opacity));padding:.5rem 1.5rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;line-height:1.5;letter-spacing:-.025rem;transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.active.custom-dropdown-btn:hover{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .active.custom-dropdown-btn){border-color:rgb(98 117 148/var(--tw-border-opacity));background-color:rgb(11 85 119/var(--tw-bg-opacity));color:rgb(210 214 218/var(--tw-text-opacity))}.regular-input,:is(.dark .active.custom-dropdown-btn){--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1}.regular-input{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.5rem;border-width:1px;border-style:solid;border-color:rgb(210 214 218/var(--tw-border-opacity));background-color:rgb(255 255 255/var(--tw-bg-opacity));background-clip:padding-box;padding:.25rem .375rem;font-size:.875rem;font-weight:400;line-height:1.4rem;color:rgb(73 80 87/var(--tw-text-opacity));outline:2px solid #0000;outline-offset:2px;transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.regular-input::-moz-placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.regular-input::placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.regular-input:focus{border-color:#d2d6da00;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.regular-input:valid:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity))}.regular-input:invalid:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(245 57 57/var(--tw-ring-opacity))}.regular-input:disabled{--tw-bg-opacity:1;background-color:rgb(206 212 218/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity));opacity:.75}:is(.dark .regular-input){border-color:rgb(98 117 148/var(--tw-border-opacity));background-color:rgb(52 71 103/var(--tw-bg-opacity));opacity:.9}:is(.dark .regular-input),:is(.dark .regular-input:disabled){--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .regular-input:disabled){border-color:rgb(37 47 64/var(--tw-border-opacity));background-color:rgb(37 47 64/var(--tw-bg-opacity))}@media (min-width:768px){.regular-input{padding:.5rem .75rem}}.input-title{margin:0;font-size:.875rem;line-height:1.5rem;font-weight:700;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.3s;transition-timing-function:ease-in-out}:is(.dark .input-title){--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity));opacity:.9}.popover-settings-container{position:absolute;left:0;bottom:0;z-index:50;--tw-translate-y:-1.75rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:.375rem;--tw-bg-opacity:1;background-color:rgb(94 114 228/var(--tw-bg-opacity));padding:.75rem;transition-property:all;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.5s}:is(.dark .popover-settings-container){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.popover-settings-text{margin:0;font-size:.875rem;line-height:1.5rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.3s;transition-timing-function:ease-in-out}:is(.dark .popover-settings-text){--tw-text-opacity:1;color:rgb(235 239 244/var(--tw-text-opacity));opacity:.9}.popover-settings-svg{margin-left:.5rem;height:1.25rem;width:1.25rem;cursor:pointer;fill:#5e72e4}.popover-settings-svg:hover{--tw-brightness:brightness(.75);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.active.settings-tabs-tab-btn{position:relative;z-index:10;margin-top:.25rem;margin-bottom:.25rem;cursor:pointer;border-radius:0;border-width:1px;--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.75rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:-.025rem;--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.active.settings-tabs-tab-btn:hover{--tw-bg-opacity:1;background-color:rgb(235 239 244/var(--tw-bg-opacity));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .active.settings-tabs-tab-btn){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity))}:is(.dark .active.settings-tabs-tab-btn:hover){--tw-bg-opacity:1;background-color:rgb(58 65 111/var(--tw-bg-opacity))}.settings-tabs-tab-btn{position:relative;margin-top:.25rem;margin-bottom:.25rem;cursor:pointer;border-radius:0;border-width:1px;--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.75rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:-.025rem;--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.settings-tabs-tab-btn:hover{--tw-bg-opacity:1;background-color:rgb(235 239 244/var(--tw-bg-opacity));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .settings-tabs-tab-btn){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity))}:is(.dark .settings-tabs-tab-btn:hover){--tw-bg-opacity:1;background-color:rgb(58 65 111/var(--tw-bg-opacity))}.settings-tabs-name{padding-left:.75rem;padding-right:.5rem;--tw-text-opacity:1;color:rgb(11 85 119/var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.3s;transition-timing-function:ease-in-out}:is(.dark .settings-tabs-name){--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity));opacity:.9}.settings-tabs-popover-container{position:absolute;top:60px;left:0;z-index:50;min-width:150px;border-radius:.375rem;--tw-bg-opacity:1;background-color:rgb(94 114 228/var(--tw-bg-opacity));padding:.75rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.15s}:is(.dark .settings-tabs-popover-container){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.settings-tabs-popover-text{margin:0;font-size:.875rem;line-height:1.5rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.settings-tabs-mobile-btn{margin-top:.25rem;margin-bottom:.25rem;display:flex;width:100%;cursor:pointer;align-items:center;justify-content:space-between;border-radius:.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:-.025rem;--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.settings-tabs-mobile-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-bg-opacity:1;background-color:rgb(248 249 250/var(--tw-bg-opacity));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .settings-tabs-mobile-btn){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity))}:is(.dark .settings-tabs-mobile-btn:hover){--tw-brightness:brightness(.95);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.settings-tabs-mobile-btn-text{--tw-text-opacity:1;color:rgb(11 85 119/var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.3s;transition-timing-function:ease-in-out}:is(.dark .settings-tabs-mobile-btn-text){--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity));opacity:.9}.active.settings-tabs-mobile-dropdown-btn{position:relative;z-index:1000;margin-top:0;margin-bottom:0;cursor:pointer;border-radius:0;--tw-border-opacity:1;border-color:rgb(210 214 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity));padding:.5rem 1.5rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;line-height:1.5;letter-spacing:-.025rem;--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity));transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.active.settings-tabs-mobile-dropdown-btn:hover{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .active.settings-tabs-mobile-dropdown-btn){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .active.settings-tabs-mobile-dropdown-btn:hover){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.first.settings-tabs-mobile-dropdown-btn{border-top-left-radius:.25rem;border-top-right-radius:.25rem;border-width:1px}.settings-tabs-mobile-dropdown-btn{position:relative;margin-top:0;margin-bottom:0;display:flex;cursor:pointer;justify-content:space-between;border-radius:0;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;--tw-border-opacity:1;border-color:rgb(210 214 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.5rem 1.5rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;line-height:1.5;letter-spacing:-.025rem;--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity));transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.settings-tabs-mobile-dropdown-btn:hover{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .settings-tabs-mobile-dropdown-btn){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .settings-tabs-mobile-dropdown-btn:hover){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.first-letter\:absolute:first-letter{position:absolute}.first-letter\:w-full:first-letter{width:100%}.placeholder\:text-gray-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.placeholder\:text-gray-500::placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.before\:float-left:before{content:var(--tw-content);float:left}.before\:pr-2:before{content:var(--tw-content);padding-right:.5rem}.before\:text-white:before{content:var(--tw-content);--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.before\:content-\[\'\/\'\]:before{--tw-content:"/";content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:top-px:after{content:var(--tw-content);top:1px}.after\:float-right:after{content:var(--tw-content);float:right}.after\:h-4:after{content:var(--tw-content);height:1rem}.after\:w-4:after{content:var(--tw-content);width:1rem}.after\:translate-x-px:after{content:var(--tw-content);--tw-translate-x:1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-circle:after{content:var(--tw-content);border-radius:50%}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.after\:pl-2:after{content:var(--tw-content);padding-left:.5rem}.after\:text-gray-600:after{content:var(--tw-content);--tw-text-opacity:1;color:rgb(108 117 125/var(--tw-text-opacity))}.after\:shadow-2xl:after{content:var(--tw-content);--tw-shadow:0 .3125rem .625rem 0 #0000001f;--tw-shadow-colored:0 .3125rem .625rem 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.after\:duration-300:after{content:var(--tw-content);transition-duration:.3s}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.after\:content-\[\'\/\'\]:after{--tw-content:"/";content:var(--tw-content)}.checked\:z-0:checked{z-index:0}.checked\:border-primary:checked{--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity))}.checked\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}.checked\:bg-none:checked{background-image:none}.checked\:bg-right:checked{background-position:100%}.checked\:after\:translate-x-5:checked:after{--tw-translate-x:1.25rem}.checked\:after\:translate-x-5:checked:after,.checked\:after\:translate-x-5\.3:checked:after{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.checked\:after\:translate-x-5\.3:checked:after{--tw-translate-x:1.3rem}.valid\:\!border-red-500:valid{--tw-border-opacity:1!important;border-color:rgb(245 57 57/var(--tw-border-opacity))!important}.hover\:-translate-y-0:hover{--tw-translate-y:-0px}.hover\:-translate-y-0:hover,.hover\:-translate-y-0\.4:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-0\.4:hover{--tw-translate-y:-0.1rem}.hover\:-translate-y-px:hover{--tw-translate-y:-1px}.hover\:-translate-y-px:hover,.hover\:scale-102:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-102:hover{--tw-scale-x:1.02;--tw-scale-y:1.02}.hover\:rounded-lg:hover{border-radius:.5rem}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(235 239 244/var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(210 214 218/var(--tw-bg-opacity))}.hover\:bg-green-500\/80:hover{background-color:#22c55ecc}.hover\:bg-primary\/30:hover{background-color:#0b55774d}.hover\:bg-primary\/5:hover{background-color:#0b55770d}.hover\:bg-primary\/80:hover{background-color:#0b5577cc}.hover\:bg-red-500\/80:hover{background-color:#f53939cc}.hover\:bg-sky-500\/80:hover{background-color:#0ea5e9cc}.hover\:bg-yellow-500\/80:hover{background-color:#fbb140cc}.hover\:italic:hover{font-style:italic}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:brightness-75:hover{--tw-brightness:brightness(.75)}.hover\:brightness-75:hover,.hover\:brightness-90:hover{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\:brightness-90:hover{--tw-brightness:brightness(.9)}.hover\:brightness-95:hover{--tw-brightness:brightness(.95);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:\!border-red-500:focus{--tw-border-opacity:1!important;border-color:rgb(245 57 57/var(--tw-border-opacity))!important}.focus\:border-green-500:focus{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity))}.focus\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity))}.focus\:bg-green-500\/80:focus{background-color:#22c55ecc}.focus\:bg-primary\/80:focus{background-color:#0b5577cc}.focus\:bg-red-500\/80:focus{background-color:#f53939cc}.focus\:bg-sky-500\/80:focus{background-color:#0ea5e9cc}.focus\:bg-yellow-500\/80:focus{background-color:#fbb140cc}.focus\:\!ring-red-500:focus{--tw-ring-opacity:1!important;--tw-ring-color:rgb(245 57 57/var(--tw-ring-opacity))!important}.focus\:valid\:\!border-red-500:valid:focus{--tw-border-opacity:1!important;border-color:rgb(245 57 57/var(--tw-border-opacity))!important}.focus\:valid\:border-green-500:valid:focus{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity))}.focus\:valid\:\!ring-red-500:valid:focus{--tw-ring-opacity:1!important;--tw-ring-color:rgb(245 57 57/var(--tw-ring-opacity))!important}.focus\:invalid\:border-red-500:invalid:focus{--tw-border-opacity:1;border-color:rgb(245 57 57/var(--tw-border-opacity))}.focus\:file\:invalid\:border-red-500:invalid::file-selector-button:focus{--tw-border-opacity:1;border-color:rgb(245 57 57/var(--tw-border-opacity))}.active\:\!border-red-500:active{--tw-border-opacity:1!important;border-color:rgb(245 57 57/var(--tw-border-opacity))!important}.active\:opacity-85:active{opacity:.85}.active\:valid\:\!border-red-500:valid:active{--tw-border-opacity:1!important;border-color:rgb(245 57 57/var(--tw-border-opacity))!important}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:border-gray-400:disabled{--tw-border-opacity:1;border-color:rgb(206 212 218/var(--tw-border-opacity))}.disabled\:bg-gray-400:disabled{--tw-bg-opacity:1;background-color:rgb(206 212 218/var(--tw-bg-opacity))}.disabled\:text-gray-700:disabled{--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity))}.disabled\:opacity-75:disabled{opacity:.75}.disabled\:hover\:translate-y-0:hover:disabled{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(.dark .dark\:inline){display:inline}:is(.dark .dark\:hidden){display:none}:is(.dark .dark\:border-gray-700){--tw-border-opacity:1;border-color:rgb(73 80 87/var(--tw-border-opacity))}:is(.dark .dark\:border-slate-600){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity))}:is(.dark .dark\:border-slate-800){--tw-border-opacity:1;border-color:rgb(58 65 111/var(--tw-border-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity:1;background-color:rgb(37 47 64/var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-500\/90){background-color:#22c55ee6}:is(.dark .dark\:bg-primary){--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}:is(.dark .dark\:bg-primary\/50){background-color:#0b557780}:is(.dark .dark\:bg-slate-700){--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-700\/50){background-color:#34476780}:is(.dark .dark\:bg-slate-850){--tw-bg-opacity:1;background-color:rgb(17 28 68/var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-900){--tw-bg-opacity:1;background-color:rgb(5 17 57/var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-900\/30){background-color:#0511394d}:is(.dark .dark\:bg-gradient-to-r){background-image:linear-gradient(to right,var(--tw-gradient-stops))}:is(.dark .dark\:from-transparent){--tw-gradient-from:#0000 var(--tw-gradient-from-position);--tw-gradient-to:#0000 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}:is(.dark .dark\:via-white){--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#fff var(--tw-gradient-via-position),var(--tw-gradient-to)}:is(.dark .dark\:to-transparent){--tw-gradient-to:#0000 var(--tw-gradient-to-position)}:is(.dark .dark\:fill-blue-500){fill:#5e72e4}:is(.dark .dark\:fill-gray-300){fill:#d2d6da}:is(.dark .dark\:fill-gray-500){fill:#adb5bd}:is(.dark .dark\:fill-gray-600){fill:#6c757d}:is(.dark .dark\:stroke-gray-400){stroke:#ced4da}:is(.dark .dark\:stroke-gray-600){stroke:#6c757d}:is(.dark .dark\:text-gray-100){--tw-text-opacity:1;color:rgb(235 239 244/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-200){--tw-text-opacity:1;color:rgb(233 236 239/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity:1;color:rgb(206 212 218/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}:is(.dark .dark\:text-red-500){--tw-text-opacity:1;color:rgb(245 57 57/var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .dark\:text-white\/80){color:#fffc}:is(.dark .dark\:text-white\/90){color:#ffffffe6}:is(.dark .dark\:opacity-60){opacity:.6}:is(.dark .dark\:opacity-75){opacity:.75}:is(.dark .dark\:opacity-80){opacity:.8}:is(.dark .dark\:opacity-90){opacity:.9}:is(.dark .dark\:shadow-dark-xl){--tw-shadow:0 2px 2px 0 #00000024,0 3px 1px -2px #0003,0 1px 5px 0 #0000001f;--tw-shadow-colored:0 2px 2px 0 var(--tw-shadow-color),0 3px 1px -2px var(--tw-shadow-color),0 1px 5px 0 var(--tw-shadow-color)}:is(.dark .dark\:shadow-dark-xl),:is(.dark .dark\:shadow-none){box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-none){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}:is(.dark .dark\:brightness-110){--tw-brightness:brightness(1.1)}:is(.dark .dark\:brightness-110),:is(.dark .dark\:brightness-125){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:brightness-125){--tw-brightness:brightness(1.25)}:is(.dark .dark\:brightness-150){--tw-brightness:brightness(1.5)}:is(.dark .dark\:brightness-150),:is(.dark .dark\:brightness-90){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:brightness-90){--tw-brightness:brightness(.9)}:is(.dark .dark\:brightness-95){--tw-brightness:brightness(.95)}:is(.dark .dark\:brightness-95),:is(.dark .dark\:brightness-\[0\.885\]){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:brightness-\[0\.885\]){--tw-brightness:brightness(0.885)}:is(.dark .dark\:after\:text-gray-500):after{content:var(--tw-content);--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}:is(.dark .dark\:checked\:border-primary:checked){--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity))}:is(.dark .dark\:checked\:bg-primary:checked){--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-primary\/20:hover){background-color:#0b557733}:is(.dark .dark\:hover\:bg-primary\/60:hover){background-color:#0b557799}:is(.dark .dark\:hover\:bg-slate-700\/50:hover){background-color:#34476780}:is(.dark .dark\:hover\:bg-slate-800:hover){--tw-bg-opacity:1;background-color:rgb(58 65 111/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:brightness-100:hover){--tw-brightness:brightness(1)}:is(.dark .dark\:hover\:brightness-100:hover),:is(.dark .dark\:hover\:brightness-105:hover){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:hover\:brightness-105:hover){--tw-brightness:brightness(1.05)}:is(.dark .dark\:hover\:brightness-90:hover){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:disabled\:border-gray-800:disabled){--tw-border-opacity:1;border-color:rgb(37 47 64/var(--tw-border-opacity))}:is(.dark .dark\:disabled\:bg-gray-800:disabled){--tw-bg-opacity:1;background-color:rgb(37 47 64/var(--tw-bg-opacity))}:is(.dark .dark\:disabled\:text-gray-300:disabled){--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}@media (min-width:576px){.sm\:right-24{right:6rem}.sm\:right-40{right:10rem}.sm\:right-6{right:1.5rem}.sm\:top-2{top:.5rem}.sm\:top-\[4\.5rem\]{top:4.5rem}.sm\:col-span-4{grid-column:span 4/span 4}.sm\:col-span-6{grid-column:span 6/span 6}.sm\:col-start-5{grid-column-start:5}.sm\:mx-4{margin-left:1rem;margin-right:1rem}.sm\:mx-6{margin-left:1.5rem;margin-right:1.5rem}.sm\:ml-1{margin-left:.25rem}.sm\:mr-16{margin-right:4rem}.sm\:inline{display:inline}.sm\:h-10{height:2.5rem}.sm\:h-14{height:3.5rem}.sm\:h-7{height:1.75rem}.sm\:max-h-125{max-height:31.25rem}.sm\:max-h-28{max-height:7rem}.sm\:w-36{width:9rem}.sm\:w-50{width:12.5rem}.sm\:w-7{width:1.75rem}.sm\:min-w-\[500px\]{min-width:500px}.sm\:scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-items-start{justify-items:start}.sm\:gap-4{gap:1rem}.sm\:px-12{padding-left:3rem;padding-right:3rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-0{padding-top:0;padding-bottom:0}.sm\:pt-6{padding-top:1.5rem}.sm\:text-left{text-align:left}}@media (min-width:768px){.md\:right-8{right:2rem}.md\:right-\[3\.75rem\]{right:3.75rem}.md\:top-\[40\%\]{top:40%}.md\:col-span-4{grid-column:span 4/span 4}.md\:col-span-5{grid-column:span 5/span 5}.md\:col-span-6{grid-column:span 6/span 6}.md\:col-span-7{grid-column:span 7/span 7}.md\:col-span-8{grid-column:span 8/span 8}.md\:mx-6{margin-left:1.5rem;margin-right:1.5rem}.md\:my-3{margin-top:.75rem;margin-bottom:.75rem}.md\:mb-0{margin-bottom:0}.md\:mb-3{margin-bottom:.75rem}.md\:mb-8{margin-bottom:2rem}.md\:mr-3{margin-right:.75rem}.md\:mt-0{margin-top:0}.md\:mt-6{margin-top:1.5rem}.md\:block{display:block}.md\:hidden{display:none}.md\:h-16{height:4rem}.md\:max-h-160{max-height:40rem}.md\:min-h-75-screen{min-height:75vh}.md\:w-1\/2{width:50%}.md\:w-60{width:15rem}.md\:max-w-\[600px\]{max-width:600px}.md\:justify-end{justify-content:flex-end}.md\:gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\:py-4{padding-top:1rem;padding-bottom:1rem}.md\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width:992px){.lg\:relative{position:relative}.lg\:order-1{order:1}.lg\:order-2{order:2}.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-4{grid-column:span 4/span 4}.lg\:col-span-6{grid-column:span 6/span 6}.lg\:col-span-8{grid-column:span 8/span 8}.lg\:mx-0{margin-left:0;margin-right:0}.lg\:mx-8{margin-left:2rem;margin-right:2rem}.lg\:my-3{margin-top:.75rem;margin-bottom:.75rem}.lg\:mt-0{margin-top:0}.lg\:mt-4{margin-top:1rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-24{height:6rem}.lg\:h-9{height:2.25rem}.lg\:w-80{width:20rem}.lg\:w-9{width:2.25rem}.lg\:flex-row{flex-direction:row}.lg\:flex-nowrap{flex-wrap:nowrap}.lg\:justify-start{justify-content:flex-start}.lg\:justify-end{justify-content:flex-end}.lg\:justify-between{justify-content:space-between}.lg\:gap-6{gap:1.5rem}.lg\:bg-gray-50{--tw-bg-opacity:1;background-color:rgb(248 249 250/var(--tw-bg-opacity))}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}.lg\:pb-1{padding-bottom:.25rem}.lg\:text-left{text-align:left}}@media (min-width:1200px){.xl\:left-0{left:0}.xl\:right-24{right:6rem}.xl\:right-6{right:1.5rem}.xl\:ml-6{margin-left:1.5rem}.xl\:ml-68{margin-left:17rem}.xl\:hidden{display:none}.xl\:translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.xl\:p-1{padding:.25rem}.xl\:p-1\.5{padding:.375rem}.xl\:pl-75{padding-left:18.75rem}.xl\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width:1320px){.\32xl\:col-span-4{grid-column:span 4/span 4}.\32xl\:col-span-6{grid-column:span 6/span 6}.\32xl\:mx-6{margin-left:1.5rem;margin-right:1.5rem}.\32xl\:my-3{margin-top:.75rem;margin-bottom:.75rem}}@media (min-width:1920px){.\33xl\:col-span-3{grid-column:span 3/span 3}.\33xl\:col-span-4{grid-column:span 4/span 4}.\33xl\:col-span-5{grid-column:span 5/span 5}}@media (min-width:340px){.xs\:flex-row{flex-direction:row}.xs\:items-center{align-items:center}.xs\:justify-start{justify-content:flex-start}.xs\:pl-2{padding-left:.5rem}.xs\:text-sm{font-size:.875rem;line-height:1.5rem}}.\[\&\>\*\]\:bg-primary>*{--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))} \ No newline at end of file +/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e9ecef}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Open Sans;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#ced4da}input::placeholder,textarea::placeholder{opacity:1;color:#ced4da}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#5e72e480;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:1.5rem!important;padding-left:1.5rem!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:1.5rem;padding-left:1.5rem}@media (min-width:340px){.\!container{max-width:340px!important}.container{max-width:340px}}@media (min-width:576px){.\!container{max-width:576px!important}.container{max-width:576px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:992px){.\!container{max-width:992px!important}.container{max-width:992px}}@media (min-width:1200px){.\!container{max-width:1200px!important}.container{max-width:1200px}}@media (min-width:1320px){.\!container{max-width:1320px!important}.container{max-width:1320px}}@media (min-width:1920px){.\!container{max-width:1920px!important}.container{max-width:1920px}}a{letter-spacing:-.025rem}hr{margin:1rem 0;border:0;opacity:.25}img{max-width:none}label{display:inline-block}p{line-height:1.625;font-weight:400;margin-bottom:1rem}small{font-size:.875em}svg{display:inline}table{border-collapse:inherit}h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;color:#344767}h1,h2,h3,h4{letter-spacing:-.05rem}h1,h2,h3{font-weight:700}h4,h5,h6{font-weight:600}h1{font-size:3rem;line-height:1.25}h2{font-size:2.25rem;line-height:1.3}h3{font-size:1.875rem}h3,h4{line-height:1.375}h4{font-size:1.5rem}h5{font-size:1.25rem;line-height:1.375}h6{font-size:1rem;line-height:1.625}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-y-0{top:0;bottom:0}.-left-full{left:-100%}.-right-0{right:0}.-right-1{right:-.25rem}.bottom-0{bottom:0}.left-0{left:0}.left-auto{left:auto}.left-full{left:100%}.right-0{right:0}.right-2{right:.5rem}.right-20{right:5rem}.right-4{right:1rem}.right-5{right:1.25rem}.right-6{right:1.5rem}.right-7{right:1.75rem}.right-8{right:2rem}.right-\[3\.25rem\]{right:3.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-16{top:4rem}.top-2{top:.5rem}.top-4{top:1rem}.top-\[38\%\]{top:38%}.top-\[4\.5rem\]{top:4.5rem}.top-\[52\%\]{top:52%}.top-\[55\%\]{top:55%}.top-\[8\.2rem\]{top:8.2rem}.-z-10{z-index:-10}.z-10{z-index:10}.z-100{z-index:100}.z-110{z-index:110}.z-20{z-index:20}.z-990{z-index:990}.z-\[10000\]{z-index:10000}.z-\[1000\]{z-index:1000}.z-\[1001\]{z-index:1001}.z-\[20\]{z-index:20}.z-sticky{z-index:1020}.order-1{order:1}.order-2{order:2}.col-span-1{grid-column:span 1/span 1}.col-span-10{grid-column:span 10/span 10}.col-span-11{grid-column:span 11/span 11}.col-span-12{grid-column:span 12/span 12}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-9{grid-column:span 9/span 9}.float-right{float:right}.float-left{float:left}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.mx-0{margin-left:0;margin-right:0}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-2\.5{margin-left:.625rem;margin-right:.625rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-7{margin-bottom:1.75rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-12{margin-left:3rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-12{margin-right:3rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\[4\.5rem\]{margin-top:4.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\/3{height:33.333333%}.h-12{height:3rem}.h-14{height:3.5rem}.h-19{height:4.75rem}.h-3{height:.75rem}.h-4{height:1rem}.h-4\.5{height:1.125rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-5\.5{height:1.375rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[2\.5rem\]{height:2.5rem}.h-\[3\.5rem\]{height:3.5rem}.h-\[4rem\]{height:4rem}.h-\[90vh\]{height:90vh}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.h-sidenav{height:calc(100vh - 450px)}.max-h-100{max-height:25rem}.max-h-135{max-height:33.75rem}.max-h-30{max-height:7.5rem}.max-h-80{max-height:20rem}.max-h-90{max-height:22.5rem}.max-h-screen{max-height:100vh}.min-h-12{min-height:3rem}.min-h-20{min-height:5rem}.min-h-50-screen{min-height:50vh}.min-h-52{min-height:13rem}.min-h-6{min-height:1.5rem}.min-h-\[100px\]{min-height:100px}.min-h-\[350px\]{min-height:350px}.min-h-\[55vh\]{min-height:55vh}.min-h-\[75px\]{min-height:75px}.min-h-\[85vh\]{min-height:85vh}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-28{width:7rem}.w-3{width:.75rem}.w-4{width:1rem}.w-4\.5{width:1.125rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-5\.5{width:1.375rem}.w-50{width:12.5rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-80{width:20rem}.w-90{width:22.5rem}.w-\[2\.5rem\]{width:2.5rem}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-\[900px\]{min-width:900px}.max-w-180{max-width:45rem}.max-w-40{max-width:10rem}.max-w-60{max-width:15rem}.max-w-64{max-width:16rem}.max-w-\[1920px\]{max-width:1920px}.max-w-\[300px\]{max-width:300px}.max-w-\[400px\]{max-width:400px}.max-w-\[550px\]{max-width:550px}.max-w-full{max-width:100%}.flex-auto{flex:1 1 auto}.grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1{--tw-translate-x:-0.25rem}.-translate-x-1,.-translate-x-1\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\.5{--tw-translate-x:-0.375rem}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0{--tw-translate-y:-0px}.-translate-y-0\.4{--tw-translate-y:-0.1rem}.-translate-y-0\.4,.-translate-y-0\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0\.5{--tw-translate-y:-0.125rem}.-translate-y-1{--tw-translate-y:-0.25rem}.-translate-y-1,.-translate-y-1\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\.5{--tw-translate-y:-0.375rem}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-0\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0\.5{--tw-translate-x:0.125rem}.translate-x-1{--tw-translate-x:0.25rem}.translate-x-1,.translate-x-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-2{--tw-translate-x:0.5rem}.translate-x-90{--tw-translate-x:22.5rem}.translate-x-90,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-0\.5{--tw-translate-y:0.125rem}.translate-y-0\.5,.translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1{--tw-translate-y:0.25rem}.translate-y-16{--tw-translate-y:4rem}.translate-y-16,.translate-y-2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y:0.5rem}.-rotate-12{--tw-rotate:-12deg}.-rotate-12,.rotate-12{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-12{--tw-rotate:12deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.scale-105{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x:1.05;--tw-scale-y:1.05}.scale-110{--tw-scale-x:1.1;--tw-scale-y:1.1}.scale-110,.scale-50{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-50{--tw-scale-x:.5;--tw-scale-y:.5}.scale-90{--tw-scale-x:.9;--tw-scale-y:.9}.scale-90,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded,.rounded-1{border-radius:.25rem}.rounded-1\.4{border-radius:.35rem}.rounded-10{border-radius:2.5rem}.rounded-2xl{border-radius:1rem}.rounded-circle{border-radius:50%}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-none{border-radius:0}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-left-radius:.5rem}.rounded-b-lg,.rounded-r-lg{border-bottom-right-radius:.5rem}.rounded-r-lg{border-top-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-gray-200{--tw-border-opacity:1;border-color:rgb(233 236 239/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(210 214 218/var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(206 212 218/var(--tw-border-opacity))}.border-primary{--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(94 114 228/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(235 239 244/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(233 236 239/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(210 214 218/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(248 249 250/var(--tw-bg-opacity))}.bg-gray-600\/50{background-color:#6c757d80}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(251 99 64/var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}.bg-primary\/20{background-color:#0b557733}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(245 57 57/var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity:1;background-color:rgb(46 172 104/var(--tw-bg-opacity))}.bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity))}.bg-slate-800\/10{background-color:#3a416f1a}.bg-transparent{background-color:initial}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(251 177 64/var(--tw-bg-opacity))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-tl{background-image:linear-gradient(to top left,var(--tw-gradient-stops))}.bg-none{background-image:none}.from-transparent{--tw-gradient-from:#0000 var(--tw-gradient-from-position);--tw-gradient-to:#0000 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.via-black\/40{--tw-gradient-to:#0000 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#0006 var(--tw-gradient-via-position),var(--tw-gradient-to)}.to-transparent{--tw-gradient-to:#0000 var(--tw-gradient-to-position)}.bg-150{background-size:150%}.bg-contain{background-size:contain}.bg-clip-border{background-clip:initial}.bg-clip-padding{background-clip:padding-box}.bg-center{background-position:50%}.bg-left{background-position:0}.bg-x-25{background-position:25% 0}.bg-no-repeat{background-repeat:no-repeat}.fill-amber-500{fill:#f59e0b}.fill-blue-500{fill:#5e72e4}.fill-gray-500{fill:#adb5bd}.fill-gray-600{fill:#6c757d}.fill-green-500{fill:#22c55e}.fill-primary{fill:#0b5577}.fill-red-500{fill:#f53939}.fill-sky-500{fill:#0ea5e9}.fill-slate-800{fill:#3a416f}.fill-white{fill:#fff}.fill-yellow-500{fill:#fbb140}.stroke-blue-400{stroke:#60a5fa}.stroke-blue-500{stroke:#5e72e4}.stroke-emerald-600{stroke:#059669}.stroke-gray-100{stroke:#ebeff4}.stroke-gray-600{stroke:#6c757d}.stroke-gray-700{stroke:#495057}.stroke-green-700{stroke:#15803d}.stroke-orange-500{stroke:#fb6340}.stroke-pink-600{stroke:#db2777}.stroke-red-500{stroke:#f53939}.stroke-sky-500{stroke:#0ea5e9}.stroke-yellow-500{stroke:#fbb140}.stroke-0{stroke-width:0}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-0{padding-bottom:0}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-8{padding-bottom:2rem}.pl-0{padding-left:0}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-0{padding-right:0}.pr-8{padding-right:2rem}.pt-1{padding-top:.25rem}.pt-10{padding-top:2.5rem}.pt-20{padding-top:5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-sans{font-family:Open Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-5{line-height:1.25rem}.leading-5\.6{line-height:1.4rem}.leading-6{line-height:1.5rem}.leading-8{line-height:2rem}.leading-default{line-height:1.6}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-tight{line-height:1.25}.tracking-normal{letter-spacing:0}.tracking-tight-rem{letter-spacing:-.025rem}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-blue-500{--tw-text-opacity:1;color:rgb(94 114 228/var(--tw-text-opacity))}.text-emerald-500{--tw-text-opacity:1;color:rgb(45 206 137/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(235 239 244/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(108 117 125/var(--tw-text-opacity))}.text-gray-600\/90{color:#6c757de6}.text-gray-700{--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity))}.text-gray-700\/80{color:#495057cc}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-primary{--tw-text-opacity:1;color:rgb(11 85 119/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(245 57 57/var(--tw-text-opacity))}.text-sky-600{--tw-text-opacity:1;color:rgb(62 161 236/var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity:1;color:rgb(103 116 142/var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity:1;color:rgb(52 71 103/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgb(251 177 64/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-3xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-3xl{--tw-shadow:0 8px 26px -4px #14141426,0 8px 9px -5px #1414140f;--tw-shadow-colored:0 8px 26px -4px var(--tw-shadow-color),0 8px 9px -5px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.shadow-md,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-sm{--tw-shadow:0 .25rem .375rem -.0625rem #1414141f,0 .125rem .25rem -.0625rem #14141412;--tw-shadow-colored:0 .25rem .375rem -.0625rem var(--tw-shadow-color),0 .125rem .25rem -.0625rem var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 0 2rem 0 #8898aa26;--tw-shadow-colored:0 0 2rem 0 var(--tw-shadow-color)}.shadow-xs{--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid #0000;outline-offset:2px}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:ease;transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:ease;transition-duration:.15s}.delay-200{transition-delay:.2s}.duration-200{transition-duration:.2s}.duration-250{transition-duration:.25s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.ease-in{transition-timing-function:ease-in}.ease-in-out{transition-timing-function:ease-in-out}.flex-wrap-inherit{flex-wrap:inherit}@font-face{font-family:Open Sans;src:url(../webfonts/OpenSans.ttf)}*{font-family:Open Sans,sans-serif!important}.ace_content,.ace_editor,.ace_editor div{font-family:Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace!important;font-size:16px!important;font-weight:400!important}.sr-only{display:none}.close-btn{display:inline-block;cursor:pointer;border-radius:.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(245 57 57/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:-.025rem;--tw-text-opacity:1;color:rgb(245 57 57/var(--tw-text-opacity));--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.close-btn,.close-btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.close-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.close-btn:focus,.close-btn:hover{background-color:#fffc}.close-btn:active{opacity:.85}:is(.dark .close-btn){--tw-bg-opacity:1;background-color:rgb(233 236 239/var(--tw-bg-opacity));--tw-brightness:brightness(.9)}:is(.dark .close-btn),:is(.dark .close-btn:hover){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .close-btn:hover){--tw-brightness:brightness(.75)}.valid-btn{display:inline-block;cursor:pointer;border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:.025em;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.valid-btn,.valid-btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.valid-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.valid-btn:focus,.valid-btn:hover{background-color:#22c55ecc}.valid-btn:active{opacity:.85}:is(.dark .valid-btn){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.delete-btn{display:inline-block;cursor:pointer;border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(245 57 57/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:.025em;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.delete-btn,.delete-btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.delete-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.delete-btn:focus,.delete-btn:hover{background-color:#f53939cc}.delete-btn:active{opacity:.85}:is(.dark .delete-btn){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.edit-btn{display:inline-block;cursor:pointer;border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(251 177 64/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:.025em;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.edit-btn,.edit-btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.edit-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.edit-btn:focus,.edit-btn:hover{background-color:#fbb140cc}.edit-btn:active{opacity:.85}:is(.dark .edit-btn){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.info-btn{display:inline-block;cursor:pointer;border-radius:.5rem;--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:.025em;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.info-btn,.info-btn:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.info-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color)}.info-btn:focus,.info-btn:hover{background-color:#0ea5e9cc}.info-btn:active{opacity:.85}:is(.dark .info-btn){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.checkbox{position:relative;z-index:10;float:left;margin-top:.25rem;height:1.25rem;width:1.25rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.35rem;border-width:1px;border-color:rgb(210 214 218/var(--tw-border-opacity));background-color:rgb(255 255 255/var(--tw-bg-opacity));background-size:contain;background-position:50%;background-repeat:no-repeat;vertical-align:top;font-size:1rem;line-height:1.5rem;transition-property:all;transition-timing-function:ease;transition-duration:.25s}.checkbox,.checkbox:disabled{--tw-border-opacity:1;--tw-bg-opacity:1}.checkbox:disabled{cursor:default;border-color:rgb(206 212 218/var(--tw-border-opacity));background-color:rgb(206 212 218/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity))}.checkbox[data-checked=true]{z-index:0;--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}.checkbox:disabled[data-checked=true]{--tw-border-opacity:1;border-color:rgb(206 212 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(206 212 218/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity))}:is(.dark .checkbox){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity))}:is(.dark .checkbox:disabled){--tw-border-opacity:1;border-color:rgb(37 47 64/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(37 47 64/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .checkbox[data-checked=true]){--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}:is(.dark .checkbox:disabled[data-checked=true]){--tw-border-opacity:1;border-color:rgb(37 47 64/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(37 47 64/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}.custom-select-btn{display:flex;width:100%;align-items:center;justify-content:space-between;border-radius:.5rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(210 214 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));background-clip:padding-box;padding:.25rem .375rem;text-align:left;vertical-align:middle;font-size:.875rem;font-weight:400;line-height:1.4rem;--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity));transition-property:all;transition-timing-function:ease;transition-duration:.3s;transition-timing-function:ease-in-out}.custom-select-btn::-moz-placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.custom-select-btn::placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.custom-select-btn:focus{--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity))}.custom-select-btn:disabled{--tw-border-opacity:1;border-color:rgb(206 212 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(206 212 218/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity));opacity:.75}:is(.dark .custom-select-btn){border-color:rgb(98 117 148/var(--tw-border-opacity));background-color:rgb(52 71 103/var(--tw-bg-opacity));opacity:.9}:is(.dark .custom-select-btn),:is(.dark .custom-select-btn:disabled){--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .custom-select-btn:disabled){border-color:rgb(37 47 64/var(--tw-border-opacity));background-color:rgb(37 47 64/var(--tw-bg-opacity))}@media (min-width:768px){.custom-select-btn{padding:.5rem .75rem}}.custom-dropdown-btn{position:relative;margin-top:0;margin-bottom:0;min-height:38px;cursor:pointer;border-radius:0;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;--tw-border-opacity:1;border-color:rgb(210 214 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.5rem 1.5rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;line-height:1.5;letter-spacing:-.025rem;--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity));transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.custom-dropdown-btn:hover{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .custom-dropdown-btn){border-color:rgb(98 117 148/var(--tw-border-opacity));background-color:rgb(52 71 103/var(--tw-bg-opacity))}.active.custom-dropdown-btn,:is(.dark .custom-dropdown-btn){--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}.active.custom-dropdown-btn{position:relative;margin-top:0;margin-bottom:0;min-height:38px;cursor:pointer;border-radius:0;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;border-color:rgb(210 214 218/var(--tw-border-opacity));background-color:rgb(11 85 119/var(--tw-bg-opacity));padding:.5rem 1.5rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;line-height:1.5;letter-spacing:-.025rem;transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.active.custom-dropdown-btn:hover{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .active.custom-dropdown-btn){border-color:rgb(98 117 148/var(--tw-border-opacity));background-color:rgb(11 85 119/var(--tw-bg-opacity));color:rgb(210 214 218/var(--tw-text-opacity))}.regular-input,:is(.dark .active.custom-dropdown-btn){--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1}.regular-input{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.5rem;border-width:1px;border-style:solid;border-color:rgb(210 214 218/var(--tw-border-opacity));background-color:rgb(255 255 255/var(--tw-bg-opacity));background-clip:padding-box;padding:.25rem .375rem;font-size:.875rem;font-weight:400;line-height:1.4rem;color:rgb(73 80 87/var(--tw-text-opacity));outline:2px solid #0000;outline-offset:2px;transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.regular-input::-moz-placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.regular-input::placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.regular-input:focus{border-color:#d2d6da00;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.regular-input:valid:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity))}.regular-input:invalid:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(245 57 57/var(--tw-ring-opacity))}.regular-input:disabled{--tw-bg-opacity:1;background-color:rgb(206 212 218/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity));opacity:.75}:is(.dark .regular-input){border-color:rgb(98 117 148/var(--tw-border-opacity));background-color:rgb(52 71 103/var(--tw-bg-opacity));opacity:.9}:is(.dark .regular-input),:is(.dark .regular-input:disabled){--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .regular-input:disabled){border-color:rgb(37 47 64/var(--tw-border-opacity));background-color:rgb(37 47 64/var(--tw-bg-opacity))}@media (min-width:768px){.regular-input{padding:.5rem .75rem}}.input-title{margin:0;font-size:.875rem;line-height:1.5rem;font-weight:700;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.3s;transition-timing-function:ease-in-out}:is(.dark .input-title){--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity));opacity:.9}.popover-settings-container{position:absolute;left:0;bottom:0;z-index:50;--tw-translate-y:-1.75rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:.375rem;--tw-bg-opacity:1;background-color:rgb(94 114 228/var(--tw-bg-opacity));padding:.75rem;transition-property:all;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.5s}:is(.dark .popover-settings-container){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.popover-settings-text{margin:0;font-size:.875rem;line-height:1.5rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.3s;transition-timing-function:ease-in-out}:is(.dark .popover-settings-text){--tw-text-opacity:1;color:rgb(235 239 244/var(--tw-text-opacity));opacity:.9}.popover-settings-svg{margin-left:.5rem;height:1.25rem;width:1.25rem;cursor:pointer;fill:#5e72e4}.popover-settings-svg:hover{--tw-brightness:brightness(.75);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.active.settings-tabs-tab-btn{position:relative;z-index:10;margin-top:.25rem;margin-bottom:.25rem;cursor:pointer;border-radius:0;border-width:1px;--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.75rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:-.025rem;--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.active.settings-tabs-tab-btn:hover{--tw-bg-opacity:1;background-color:rgb(235 239 244/var(--tw-bg-opacity));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .active.settings-tabs-tab-btn){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity))}:is(.dark .active.settings-tabs-tab-btn:hover){--tw-bg-opacity:1;background-color:rgb(58 65 111/var(--tw-bg-opacity))}.settings-tabs-tab-btn{position:relative;margin-top:.25rem;margin-bottom:.25rem;cursor:pointer;border-radius:0;border-width:1px;--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.75rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:-.025rem;--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.settings-tabs-tab-btn:hover{--tw-bg-opacity:1;background-color:rgb(235 239 244/var(--tw-bg-opacity));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .settings-tabs-tab-btn){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity))}:is(.dark .settings-tabs-tab-btn:hover){--tw-bg-opacity:1;background-color:rgb(58 65 111/var(--tw-bg-opacity))}.settings-tabs-name{padding-left:.75rem;padding-right:.5rem;--tw-text-opacity:1;color:rgb(11 85 119/var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.3s;transition-timing-function:ease-in-out}:is(.dark .settings-tabs-name){--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity));opacity:.9}.settings-tabs-popover-container{position:absolute;top:60px;left:0;z-index:50;min-width:150px;border-radius:.375rem;--tw-bg-opacity:1;background-color:rgb(94 114 228/var(--tw-bg-opacity));padding:.75rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.15s}:is(.dark .settings-tabs-popover-container){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.settings-tabs-popover-text{margin:0;font-size:.875rem;line-height:1.5rem;font-weight:700;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.settings-tabs-mobile-btn{margin-top:.25rem;margin-bottom:.25rem;display:flex;width:100%;cursor:pointer;align-items:center;justify-content:space-between;border-radius:.5rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.75rem 1.5rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;font-weight:700;text-transform:uppercase;line-height:1.5;letter-spacing:-.025rem;--tw-shadow:0 7px 14px #32325d1a,0 3px 6px #00000014;--tw-shadow-colored:0 7px 14px var(--tw-shadow-color),0 3px 6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.settings-tabs-mobile-btn:hover{--tw-translate-y:-1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-bg-opacity:1;background-color:rgb(248 249 250/var(--tw-bg-opacity));--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .settings-tabs-mobile-btn){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity))}:is(.dark .settings-tabs-mobile-btn:hover){--tw-brightness:brightness(.95);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.settings-tabs-mobile-btn-text{--tw-text-opacity:1;color:rgb(11 85 119/var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:ease;transition-duration:.3s;transition-timing-function:ease-in-out}:is(.dark .settings-tabs-mobile-btn-text){--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity));opacity:.9}.active.settings-tabs-mobile-dropdown-btn{position:relative;z-index:1000;margin-top:0;margin-bottom:0;cursor:pointer;border-radius:0;--tw-border-opacity:1;border-color:rgb(210 214 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity));padding:.5rem 1.5rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;line-height:1.5;letter-spacing:-.025rem;--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity));transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.active.settings-tabs-mobile-dropdown-btn:hover{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .active.settings-tabs-mobile-dropdown-btn){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .active.settings-tabs-mobile-dropdown-btn:hover){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.first.settings-tabs-mobile-dropdown-btn{border-top-left-radius:.25rem;border-top-right-radius:.25rem;border-width:1px}.settings-tabs-mobile-dropdown-btn{position:relative;margin-top:0;margin-bottom:0;display:flex;cursor:pointer;justify-content:space-between;border-radius:0;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;--tw-border-opacity:1;border-color:rgb(210 214 218/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:.5rem 1.5rem;text-align:center;vertical-align:middle;font-size:.875rem;line-height:1.5rem;line-height:1.5;letter-spacing:-.025rem;--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity));transition-property:all;transition-timing-function:ease;transition-duration:.15s;transition-timing-function:ease-in}.settings-tabs-mobile-dropdown-btn:hover{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .settings-tabs-mobile-dropdown-btn){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity));--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .settings-tabs-mobile-dropdown-btn:hover){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.first-letter\:absolute:first-letter{position:absolute}.first-letter\:w-full:first-letter{width:100%}.placeholder\:text-gray-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.placeholder\:text-gray-500::placeholder{--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}.before\:float-left:before{content:var(--tw-content);float:left}.before\:pr-2:before{content:var(--tw-content);padding-right:.5rem}.before\:text-white:before{content:var(--tw-content);--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.before\:content-\[\'\/\'\]:before{--tw-content:"/";content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:top-px:after{content:var(--tw-content);top:1px}.after\:float-right:after{content:var(--tw-content);float:right}.after\:h-4:after{content:var(--tw-content);height:1rem}.after\:w-4:after{content:var(--tw-content);width:1rem}.after\:translate-x-px:after{content:var(--tw-content);--tw-translate-x:1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-circle:after{content:var(--tw-content);border-radius:50%}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.after\:pl-2:after{content:var(--tw-content);padding-left:.5rem}.after\:text-gray-600:after{content:var(--tw-content);--tw-text-opacity:1;color:rgb(108 117 125/var(--tw-text-opacity))}.after\:shadow-2xl:after{content:var(--tw-content);--tw-shadow:0 .3125rem .625rem 0 #0000001f;--tw-shadow-colored:0 .3125rem .625rem 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.after\:duration-300:after{content:var(--tw-content);transition-duration:.3s}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.after\:content-\[\'\/\'\]:after{--tw-content:"/";content:var(--tw-content)}.checked\:z-0:checked{z-index:0}.checked\:border-primary:checked{--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity))}.checked\:bg-primary:checked{--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}.checked\:bg-none:checked{background-image:none}.checked\:bg-right:checked{background-position:100%}.checked\:after\:translate-x-5:checked:after{--tw-translate-x:1.25rem}.checked\:after\:translate-x-5:checked:after,.checked\:after\:translate-x-5\.3:checked:after{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.checked\:after\:translate-x-5\.3:checked:after{--tw-translate-x:1.3rem}.valid\:\!border-red-500:valid{--tw-border-opacity:1!important;border-color:rgb(245 57 57/var(--tw-border-opacity))!important}.hover\:-translate-y-0:hover{--tw-translate-y:-0px}.hover\:-translate-y-0:hover,.hover\:-translate-y-0\.4:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-0\.4:hover{--tw-translate-y:-0.1rem}.hover\:-translate-y-px:hover{--tw-translate-y:-1px}.hover\:-translate-y-px:hover,.hover\:scale-102:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-102:hover{--tw-scale-x:1.02;--tw-scale-y:1.02}.hover\:rounded-lg:hover{border-radius:.5rem}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(235 239 244/var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(210 214 218/var(--tw-bg-opacity))}.hover\:bg-green-500\/80:hover{background-color:#22c55ecc}.hover\:bg-primary\/30:hover{background-color:#0b55774d}.hover\:bg-primary\/5:hover{background-color:#0b55770d}.hover\:bg-primary\/80:hover{background-color:#0b5577cc}.hover\:bg-red-500\/80:hover{background-color:#f53939cc}.hover\:bg-sky-500\/80:hover{background-color:#0ea5e9cc}.hover\:bg-yellow-500\/80:hover{background-color:#fbb140cc}.hover\:italic:hover{font-style:italic}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px #32325d1a,0 1px 3px #00000014;--tw-shadow-colored:0 4px 6px var(--tw-shadow-color),0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:brightness-75:hover{--tw-brightness:brightness(.75)}.hover\:brightness-75:hover,.hover\:brightness-90:hover{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\:brightness-90:hover{--tw-brightness:brightness(.9)}.hover\:brightness-95:hover{--tw-brightness:brightness(.95);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:\!border-red-500:focus{--tw-border-opacity:1!important;border-color:rgb(245 57 57/var(--tw-border-opacity))!important}.focus\:border-green-500:focus{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity))}.focus\:border-primary:focus{--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity))}.focus\:bg-green-500\/80:focus{background-color:#22c55ecc}.focus\:bg-primary\/80:focus{background-color:#0b5577cc}.focus\:bg-red-500\/80:focus{background-color:#f53939cc}.focus\:bg-sky-500\/80:focus{background-color:#0ea5e9cc}.focus\:bg-yellow-500\/80:focus{background-color:#fbb140cc}.focus\:\!ring-red-500:focus{--tw-ring-opacity:1!important;--tw-ring-color:rgb(245 57 57/var(--tw-ring-opacity))!important}.focus\:valid\:\!border-red-500:valid:focus{--tw-border-opacity:1!important;border-color:rgb(245 57 57/var(--tw-border-opacity))!important}.focus\:valid\:border-green-500:valid:focus{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity))}.focus\:valid\:\!ring-red-500:valid:focus{--tw-ring-opacity:1!important;--tw-ring-color:rgb(245 57 57/var(--tw-ring-opacity))!important}.focus\:invalid\:border-red-500:invalid:focus{--tw-border-opacity:1;border-color:rgb(245 57 57/var(--tw-border-opacity))}.focus\:file\:invalid\:border-red-500:invalid::file-selector-button:focus{--tw-border-opacity:1;border-color:rgb(245 57 57/var(--tw-border-opacity))}.active\:\!border-red-500:active{--tw-border-opacity:1!important;border-color:rgb(245 57 57/var(--tw-border-opacity))!important}.active\:opacity-85:active{opacity:.85}.active\:valid\:\!border-red-500:valid:active{--tw-border-opacity:1!important;border-color:rgb(245 57 57/var(--tw-border-opacity))!important}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:border-gray-400:disabled{--tw-border-opacity:1;border-color:rgb(206 212 218/var(--tw-border-opacity))}.disabled\:bg-gray-400:disabled{--tw-bg-opacity:1;background-color:rgb(206 212 218/var(--tw-bg-opacity))}.disabled\:text-gray-700:disabled{--tw-text-opacity:1;color:rgb(73 80 87/var(--tw-text-opacity))}.disabled\:opacity-75:disabled{opacity:.75}.disabled\:hover\:translate-y-0:hover:disabled{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is(.dark .dark\:inline){display:inline}:is(.dark .dark\:hidden){display:none}:is(.dark .dark\:border-gray-700){--tw-border-opacity:1;border-color:rgb(73 80 87/var(--tw-border-opacity))}:is(.dark .dark\:border-slate-600){--tw-border-opacity:1;border-color:rgb(98 117 148/var(--tw-border-opacity))}:is(.dark .dark\:border-slate-800){--tw-border-opacity:1;border-color:rgb(58 65 111/var(--tw-border-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity:1;background-color:rgb(37 47 64/var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-500\/90){background-color:#22c55ee6}:is(.dark .dark\:bg-primary){--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}:is(.dark .dark\:bg-primary\/50){background-color:#0b557780}:is(.dark .dark\:bg-slate-700){--tw-bg-opacity:1;background-color:rgb(52 71 103/var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-700\/50){background-color:#34476780}:is(.dark .dark\:bg-slate-850){--tw-bg-opacity:1;background-color:rgb(17 28 68/var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-900){--tw-bg-opacity:1;background-color:rgb(5 17 57/var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-900\/30){background-color:#0511394d}:is(.dark .dark\:bg-gradient-to-r){background-image:linear-gradient(to right,var(--tw-gradient-stops))}:is(.dark .dark\:from-transparent){--tw-gradient-from:#0000 var(--tw-gradient-from-position);--tw-gradient-to:#0000 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}:is(.dark .dark\:via-white){--tw-gradient-to:#fff0 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#fff var(--tw-gradient-via-position),var(--tw-gradient-to)}:is(.dark .dark\:to-transparent){--tw-gradient-to:#0000 var(--tw-gradient-to-position)}:is(.dark .dark\:fill-blue-500){fill:#5e72e4}:is(.dark .dark\:fill-gray-300){fill:#d2d6da}:is(.dark .dark\:fill-gray-500){fill:#adb5bd}:is(.dark .dark\:fill-gray-600){fill:#6c757d}:is(.dark .dark\:stroke-gray-400){stroke:#ced4da}:is(.dark .dark\:stroke-gray-600){stroke:#6c757d}:is(.dark .dark\:text-gray-100){--tw-text-opacity:1;color:rgb(235 239 244/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-200){--tw-text-opacity:1;color:rgb(233 236 239/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity:1;color:rgb(206 212 218/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}:is(.dark .dark\:text-red-500){--tw-text-opacity:1;color:rgb(245 57 57/var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .dark\:text-white\/80){color:#fffc}:is(.dark .dark\:text-white\/90){color:#ffffffe6}:is(.dark .dark\:opacity-60){opacity:.6}:is(.dark .dark\:opacity-75){opacity:.75}:is(.dark .dark\:opacity-80){opacity:.8}:is(.dark .dark\:opacity-90){opacity:.9}:is(.dark .dark\:shadow-dark-xl){--tw-shadow:0 2px 2px 0 #00000024,0 3px 1px -2px #0003,0 1px 5px 0 #0000001f;--tw-shadow-colored:0 2px 2px 0 var(--tw-shadow-color),0 3px 1px -2px var(--tw-shadow-color),0 1px 5px 0 var(--tw-shadow-color)}:is(.dark .dark\:shadow-dark-xl),:is(.dark .dark\:shadow-none){box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-none){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}:is(.dark .dark\:brightness-110){--tw-brightness:brightness(1.1)}:is(.dark .dark\:brightness-110),:is(.dark .dark\:brightness-125){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:brightness-125){--tw-brightness:brightness(1.25)}:is(.dark .dark\:brightness-150){--tw-brightness:brightness(1.5)}:is(.dark .dark\:brightness-150),:is(.dark .dark\:brightness-90){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:brightness-90){--tw-brightness:brightness(.9)}:is(.dark .dark\:brightness-95){--tw-brightness:brightness(.95)}:is(.dark .dark\:brightness-95),:is(.dark .dark\:brightness-\[0\.885\]){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:brightness-\[0\.885\]){--tw-brightness:brightness(0.885)}:is(.dark .dark\:after\:text-gray-500):after{content:var(--tw-content);--tw-text-opacity:1;color:rgb(173 181 189/var(--tw-text-opacity))}:is(.dark .dark\:checked\:border-primary:checked){--tw-border-opacity:1;border-color:rgb(11 85 119/var(--tw-border-opacity))}:is(.dark .dark\:checked\:bg-primary:checked){--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-primary\/20:hover){background-color:#0b557733}:is(.dark .dark\:hover\:bg-primary\/60:hover){background-color:#0b557799}:is(.dark .dark\:hover\:bg-slate-700\/50:hover){background-color:#34476780}:is(.dark .dark\:hover\:bg-slate-800:hover){--tw-bg-opacity:1;background-color:rgb(58 65 111/var(--tw-bg-opacity))}:is(.dark .dark\:hover\:brightness-100:hover){--tw-brightness:brightness(1)}:is(.dark .dark\:hover\:brightness-100:hover),:is(.dark .dark\:hover\:brightness-105:hover){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:hover\:brightness-105:hover){--tw-brightness:brightness(1.05)}:is(.dark .dark\:hover\:brightness-90:hover){--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:disabled\:border-gray-800:disabled){--tw-border-opacity:1;border-color:rgb(37 47 64/var(--tw-border-opacity))}:is(.dark .dark\:disabled\:bg-gray-800:disabled){--tw-bg-opacity:1;background-color:rgb(37 47 64/var(--tw-bg-opacity))}:is(.dark .dark\:disabled\:text-gray-300:disabled){--tw-text-opacity:1;color:rgb(210 214 218/var(--tw-text-opacity))}@media (min-width:576px){.sm\:right-24{right:6rem}.sm\:right-40{right:10rem}.sm\:right-6{right:1.5rem}.sm\:top-2{top:.5rem}.sm\:top-\[4\.5rem\]{top:4.5rem}.sm\:col-span-4{grid-column:span 4/span 4}.sm\:col-span-6{grid-column:span 6/span 6}.sm\:col-start-5{grid-column-start:5}.sm\:mx-4{margin-left:1rem;margin-right:1rem}.sm\:mx-6{margin-left:1.5rem;margin-right:1.5rem}.sm\:ml-1{margin-left:.25rem}.sm\:mr-16{margin-right:4rem}.sm\:inline{display:inline}.sm\:h-10{height:2.5rem}.sm\:h-14{height:3.5rem}.sm\:h-7{height:1.75rem}.sm\:max-h-125{max-height:31.25rem}.sm\:max-h-28{max-height:7rem}.sm\:w-36{width:9rem}.sm\:w-50{width:12.5rem}.sm\:w-7{width:1.75rem}.sm\:min-w-\[500px\]{min-width:500px}.sm\:scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-items-start{justify-items:start}.sm\:gap-4{gap:1rem}.sm\:px-12{padding-left:3rem;padding-right:3rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-0{padding-top:0;padding-bottom:0}.sm\:pt-6{padding-top:1.5rem}.sm\:text-left{text-align:left}}@media (min-width:768px){.md\:right-8{right:2rem}.md\:right-\[3\.75rem\]{right:3.75rem}.md\:top-\[40\%\]{top:40%}.md\:col-span-4{grid-column:span 4/span 4}.md\:col-span-5{grid-column:span 5/span 5}.md\:col-span-6{grid-column:span 6/span 6}.md\:col-span-7{grid-column:span 7/span 7}.md\:col-span-8{grid-column:span 8/span 8}.md\:mx-6{margin-left:1.5rem;margin-right:1.5rem}.md\:my-3{margin-top:.75rem;margin-bottom:.75rem}.md\:mb-0{margin-bottom:0}.md\:mb-3{margin-bottom:.75rem}.md\:mb-8{margin-bottom:2rem}.md\:mr-3{margin-right:.75rem}.md\:mt-0{margin-top:0}.md\:mt-6{margin-top:1.5rem}.md\:block{display:block}.md\:hidden{display:none}.md\:h-16{height:4rem}.md\:max-h-160{max-height:40rem}.md\:min-h-75-screen{min-height:75vh}.md\:w-1\/2{width:50%}.md\:w-60{width:15rem}.md\:max-w-\[600px\]{max-width:600px}.md\:justify-end{justify-content:flex-end}.md\:gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:py-2{padding-top:.5rem;padding-bottom:.5rem}.md\:py-4{padding-top:1rem;padding-bottom:1rem}.md\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width:992px){.lg\:relative{position:relative}.lg\:order-1{order:1}.lg\:order-2{order:2}.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-4{grid-column:span 4/span 4}.lg\:col-span-6{grid-column:span 6/span 6}.lg\:col-span-8{grid-column:span 8/span 8}.lg\:mx-0{margin-left:0;margin-right:0}.lg\:mx-8{margin-left:2rem;margin-right:2rem}.lg\:my-3{margin-top:.75rem;margin-bottom:.75rem}.lg\:mt-0{margin-top:0}.lg\:mt-4{margin-top:1rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-24{height:6rem}.lg\:h-9{height:2.25rem}.lg\:w-80{width:20rem}.lg\:w-9{width:2.25rem}.lg\:flex-row{flex-direction:row}.lg\:flex-nowrap{flex-wrap:nowrap}.lg\:justify-start{justify-content:flex-start}.lg\:justify-end{justify-content:flex-end}.lg\:justify-between{justify-content:space-between}.lg\:gap-6{gap:1.5rem}.lg\:bg-gray-50{--tw-bg-opacity:1;background-color:rgb(248 249 250/var(--tw-bg-opacity))}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}.lg\:pb-1{padding-bottom:.25rem}.lg\:text-left{text-align:left}}@media (min-width:1200px){.xl\:left-0{left:0}.xl\:right-24{right:6rem}.xl\:right-6{right:1.5rem}.xl\:ml-6{margin-left:1.5rem}.xl\:ml-68{margin-left:17rem}.xl\:hidden{display:none}.xl\:translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.xl\:p-1{padding:.25rem}.xl\:p-1\.5{padding:.375rem}.xl\:pl-75{padding-left:18.75rem}.xl\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width:1320px){.\32xl\:col-span-4{grid-column:span 4/span 4}.\32xl\:col-span-6{grid-column:span 6/span 6}.\32xl\:mx-6{margin-left:1.5rem;margin-right:1.5rem}.\32xl\:my-3{margin-top:.75rem;margin-bottom:.75rem}}@media (min-width:1920px){.\33xl\:col-span-3{grid-column:span 3/span 3}.\33xl\:col-span-4{grid-column:span 4/span 4}.\33xl\:col-span-5{grid-column:span 5/span 5}}@media (min-width:340px){.xs\:flex-row{flex-direction:row}.xs\:items-center{align-items:center}.xs\:justify-start{justify-content:flex-start}.xs\:pl-2{padding-left:.5rem}.xs\:text-sm{font-size:.875rem;line-height:1.5rem}}.\[\&\>\*\]\:bg-primary>*{--tw-bg-opacity:1;background-color:rgb(11 85 119/var(--tw-bg-opacity))} \ No newline at end of file diff --git a/src/ui/templates/banner.html b/src/ui/templates/banner.html index 67e8d2e78..250ef4ac2 100644 --- a/src/ui/templates/banner.html +++ b/src/ui/templates/banner.html @@ -42,7 +42,7 @@ class="dark:brightness-125 font-medium underline text-gray-100 hover:no-underline" href="https://demo.bunkerweb.io/link/?utm_campaign=self&utm_source=ui" > - demo wep app ! + demo web app !

diff --git a/src/ui/templates/home.html b/src/ui/templates/home.html index 8982f0e46..73ff4f2f7 100644 --- a/src/ui/templates/home.html +++ b/src/ui/templates/home.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% block content %} - + + + {% endblock %} diff --git a/tests/core/antibot/requirements.txt b/tests/core/antibot/requirements.txt index d8525371f..7dc9efbe9 100644 --- a/tests/core/antibot/requirements.txt +++ b/tests/core/antibot/requirements.txt @@ -149,9 +149,9 @@ sortedcontainers==2.4.0 \ --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 # via trio -trio==0.23.2 \ - --hash=sha256:5a0b566fa5d50cf231cfd6b08f3b03aa4179ff004b8f3144059587039e2b26d3 \ - --hash=sha256:da1d35b9a2b17eb32cae2e763b16551f9aa6703634735024e32f325c9285069e +trio==0.24.0 \ + --hash=sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c \ + --hash=sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d # via # selenium # trio-websocket diff --git a/tests/core/authbasic/requirements.txt b/tests/core/authbasic/requirements.txt index d8525371f..7dc9efbe9 100644 --- a/tests/core/authbasic/requirements.txt +++ b/tests/core/authbasic/requirements.txt @@ -149,9 +149,9 @@ sortedcontainers==2.4.0 \ --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 # via trio -trio==0.23.2 \ - --hash=sha256:5a0b566fa5d50cf231cfd6b08f3b03aa4179ff004b8f3144059587039e2b26d3 \ - --hash=sha256:da1d35b9a2b17eb32cae2e763b16551f9aa6703634735024e32f325c9285069e +trio==0.24.0 \ + --hash=sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c \ + --hash=sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d # via # selenium # trio-websocket diff --git a/tests/core/blacklist/api/requirements.in b/tests/core/blacklist/api/requirements.in index 9945aad2d..c70d8e9ca 100644 --- a/tests/core/blacklist/api/requirements.in +++ b/tests/core/blacklist/api/requirements.in @@ -1,2 +1,2 @@ -fastapi==0.108.0 +fastapi==0.109.0 uvicorn[standard]==0.25.0 diff --git a/tests/core/blacklist/api/requirements.txt b/tests/core/blacklist/api/requirements.txt index 4b2d26b89..9f6ef8206 100644 --- a/tests/core/blacklist/api/requirements.txt +++ b/tests/core/blacklist/api/requirements.txt @@ -22,9 +22,9 @@ exceptiongroup==1.2.0 \ --hash=sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14 \ --hash=sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68 # via anyio -fastapi==0.108.0 \ - --hash=sha256:5056e504ac6395bf68493d71fcfc5352fdbd5fda6f88c21f6420d80d81163296 \ - --hash=sha256:8c7bc6d315da963ee4cdb605557827071a9a7f95aeb8fcdd3bde48cdc8764dd7 +fastapi==0.109.0 \ + --hash=sha256:8c77515984cd8e8cfeb58364f8cc7a28f0692088475e2614f7bf03275eba9093 \ + --hash=sha256:b978095b9ee01a5cf49b19f4bc1ac9b8ca83aa076e770ef8fd9af09a2b88d191 # via -r requirements.in h11==0.14.0 \ --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ @@ -243,9 +243,9 @@ sniffio==1.3.0 \ --hash=sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101 \ --hash=sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384 # via anyio -starlette==0.32.0.post1 \ - --hash=sha256:cd0cb10ddb49313f609cedfac62c8c12e56c7314b66d89bb077ba228bada1b09 \ - --hash=sha256:e54e2b7e2fb06dff9eac40133583f10dfa05913f5a85bf26f427c7a40a9a3d02 +starlette==0.35.1 \ + --hash=sha256:3e2639dac3520e4f58734ed22553f950d3f3cb1001cd2eaac4d57e8cdc5f66bc \ + --hash=sha256:50bbbda9baa098e361f398fda0928062abbaf1f54f4fadcbe17c092a01eb9a25 # via fastapi typing-extensions==4.9.0 \ --hash=sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783 \ diff --git a/tests/core/blacklist/init/requirements.in b/tests/core/blacklist/init/requirements.in index 40b89144b..16be7b8ef 100644 --- a/tests/core/blacklist/init/requirements.in +++ b/tests/core/blacklist/init/requirements.in @@ -1,2 +1,2 @@ -maxminddb==2.5.1 +maxminddb==2.5.2 requests==2.31.0 diff --git a/tests/core/blacklist/init/requirements.txt b/tests/core/blacklist/init/requirements.txt index 53d7e6b8e..5207ef6a6 100644 --- a/tests/core/blacklist/init/requirements.txt +++ b/tests/core/blacklist/init/requirements.txt @@ -104,55 +104,55 @@ idna==3.6 \ --hash=sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca \ --hash=sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f # via requests -maxminddb==2.5.1 \ - --hash=sha256:0702da59b9670a72761b65cb1a52bc3032d8f6799bdab641cb8350ad5740580b \ - --hash=sha256:0a21abd85e10e5e0f60244b49c3db17e7e48befd4972e62a62833d91e2acbb49 \ - --hash=sha256:0cbd272db3202e948c9088e48dec62add071a47971d84ceb11d2cb2880f83e5a \ - --hash=sha256:17ea454f61631b9815d420d48d00663f8718fc7de30be53ffcec0f73989475eb \ - --hash=sha256:188173c07dce0692fd5660a6eb7ea8c126d7b3a4b61496c8a8ee9e8b10186ff5 \ - --hash=sha256:1e091c2b44673c218ee2df23adbc0b6d04fd5c646cfcb6c6fe26fb849434812a \ - --hash=sha256:2a7a73ab4bbc16b81983531c99fa102a0c7dae459db958c17fea48c981f5e764 \ - --hash=sha256:2c2901daebd7c8a702302315e7a58cdc38e626406ad4a05b4d48634897d5f5a3 \ - --hash=sha256:2e20a70c1545d6626dcd4ce2d7ecf3d566d978ea64cb37e7952f93baff66b812 \ - --hash=sha256:2ecb1be961f1969be047d07743093f0dcf2f6d4ec3a06a4555587f380a96f6e7 \ - --hash=sha256:3ce1f42bdfce7b86cb5a56cba730fed611fb879d867e6024f0d520257bef6891 \ - --hash=sha256:3d52c693baf07bba897d109b0ecb067f21fd0cc0fb266d67db456e85b80d699e \ - --hash=sha256:4807d374e645bd68334e4f487ba85a27189dbc1267a98e644aa686a7927e0559 \ - --hash=sha256:4c67621e842c415ce336ab019a9f087305dfcf24c095b68b8e9d27848f6f6d91 \ - --hash=sha256:500d321bdefe4dcd351e4390a79b7786aab49b0536bedfa0788e5ffb0e91e421 \ - --hash=sha256:526744b12075051fa20979090c111cc3a42a3b55e2714818270c7b84a41a8cfe \ - --hash=sha256:5a6751e2e89d62d53217870bcc2a8c887dc56ae370ba1b74e52e880761916e54 \ - --hash=sha256:5d772be68cce812f7c4b15ae8c68e624c8b88ff83071e3903ca5b5f55e343c25 \ - --hash=sha256:607344b1079ea647629bf962dcea7580ec864faaad3f5aae650e2e8652121d89 \ - --hash=sha256:62e93a8e99937bf4307eeece3ca37e1161325ebf9363c4ce195410fb5daf64a0 \ - --hash=sha256:639aee8abd63a95baa12b94b6f3a842d51877d631879c7d08c98c68dc44a84c3 \ - --hash=sha256:6667948e7501a513caef90edda2d367865097239d4c2381eb3998e9905af7209 \ - --hash=sha256:7805ae8c9de433c38939ada2e376706a9f6740239f61fd445927b88f5b42c267 \ - --hash=sha256:85a302d79577efe5bc308647394ffdc535dd5f062644c41103604ccf24931a05 \ - --hash=sha256:892c11a8694394e97d3ac0f8d5974ea588c732d14e721f22095c58b4f584c144 \ - --hash=sha256:8b98ed5c34955c48e72d35daed713ba4a6833a8a6d1204e79d2c85e644049792 \ - --hash=sha256:8cee4315da7cdd3f2a18f1ab1418953a7a9eda65e63095b01f03c7d3645d633e \ - --hash=sha256:910e7b3ad87d5352ed3f496bd42bffbf9f896245278b0d8e76afa1382e42a7ae \ - --hash=sha256:93f7055779caf7753810f1e2c6444af6d727393fd116ffa0767fbd54fb8c9bbf \ - --hash=sha256:969d0057ea5472e0b574c5293c4f3ecf49585362351c543e8ea55dc48b60f1eb \ - --hash=sha256:a01b0341bd6bee431bb8c07c7ac0ed221250c7390b125c025b7d57578e78e8a3 \ - --hash=sha256:a1e1a19f9740f586362f47862d0095b54d50b9d465babcaa8a563746132fe5be \ - --hash=sha256:aae262da1940a67c3ba765c49e2308947ce68ff647f87630002c306433a98ca1 \ - --hash=sha256:b0bbbd58b300aaddf985f763720bdebba9f7a73168ff9f57168117f630ad1c06 \ - --hash=sha256:b223c53077a736c304b63cf5afceb928975fbd12ddae5afd6b71370bab7b4700 \ - --hash=sha256:b477852cf1741d9187b021e23723e64b063794bbf946a9b5b84cc222f3caf58a \ - --hash=sha256:c4e5ca423b1e310f0327536f5ed1a2c6e08d83289a7f909e021590b0b477cae2 \ - --hash=sha256:c97eac5af102cede4b5f57cecb25e8f949fa4e4a8d812bed575539951c60ecaf \ - --hash=sha256:d4d36cf3d390f02d2bdf53d9efefb92be7bd70e07a5a86cdb79020c48c2d81b7 \ - --hash=sha256:d654895b546a47e85f2e071b98e377a60bb03cd643b9423017fa66fcd5adedce \ - --hash=sha256:dd28c434fb44f825dde6a75df2c338d44645791b03480af66a4d993f93801e10 \ - --hash=sha256:e09b295c401c104ae0e30f66c1a3f3c2aa4ba2cbe12a787576499356a5a4d6c1 \ - --hash=sha256:ea2e27a507b53dfbf2ba2ba85c98682a1ad2dac3f9941a7bffa5cb86150d0c47 \ - --hash=sha256:ef4d508c899ce0f37de731340759c68bfd1102a39a873675c71fae2c8d71ad97 \ - --hash=sha256:f1e5bd58b71f322dc6c16a95a129433b1bc229d4b714f870a61c2367425396ee \ - --hash=sha256:fad45cd2f2e3c5fbebacb8d172a60fb22443222e549bf740a0bc7eeb849e5ce7 \ - --hash=sha256:fbd01fc7d7b5b2befe914e8cdb5ed3a1c5476e57b765197cceff8d897f33d012 \ - --hash=sha256:fe0af3ba9e1a78ed5f2ad32fc18d18b78ef233e7d0c627e1a77a525a7eb0c241 +maxminddb==2.5.2 \ + --hash=sha256:08a540ec3661f6ca40499c86028e96dca5780e9d471b485dc797859b0b22dd22 \ + --hash=sha256:099f4e27feec4bb9658034a3eb853e746721fc15709030bee4f2f889f4a34185 \ + --hash=sha256:1409a045eb04cebb297221eab1020c4f05434d02c0961410f6996ef474482998 \ + --hash=sha256:17de49660372dcccaa23958eccdd1c2464f92f594d027045ad76788db14a5da4 \ + --hash=sha256:17fdb691c389a0e956410d5baef9ad082a0aa67dd6aa231d193499e71a104c19 \ + --hash=sha256:19d8d1e9bbc5281fb4c8112d541d2bd350fd8b5ddfbb43a6951e46df7cd27b9d \ + --hash=sha256:1a3fab6bea6cc59444e6bad2a4fbf91228f6f51dcb29d09ed091930a475bd8cb \ + --hash=sha256:20596e452d03071db37a72c8ef9236126c04ed342864f68db0adf0d1bc9f642e \ + --hash=sha256:22184fa2514c15f5b39e4e2522f4f73d00afcf5eb7102c473f9376f3c3a03b81 \ + --hash=sha256:29d63e7711e5f95c7c190010e57dca9e262aee8ac300aaf75c3f7ede0b5a5863 \ + --hash=sha256:2bba43d370a57785f5ef61c10d0b4bf8de58d431da3c4c2ed78bb2ff3d07edbf \ + --hash=sha256:2cb718908b9dffa10e02361094158ae68ded5a82c750de89737437999a81bafe \ + --hash=sha256:2e01b09480b97d2ebe6765618fb12a0f52caa17368d6cf1f42481d6740428de7 \ + --hash=sha256:2ec51b66774b102824c9a3dd4916356283f6a61db1868d4ebcb98bf26486718e \ + --hash=sha256:335ee3140b41d4e751c14f8fae297aa064c7d3f184c9fbb2790336123187c440 \ + --hash=sha256:3ddbe547d83a2e28e81d9f59fd9708d3044ffb2398ee0f8df2e2a2e9cdea6646 \ + --hash=sha256:3e9198d25e252b27d4e9526d5fcd4b78341c23153363a94f1246de5afcd39f6d \ + --hash=sha256:3fe6bb1b5ea132fcd9fd7b16c80247f0ba667018d5f9f98cd645b297e3b02fbf \ + --hash=sha256:461dcf0a4f67aa1c9faea6d52c4060d39559bf68e99a514cf8c1e01af383f90b \ + --hash=sha256:5a5053231228d7cbf57d98a741b3cbee9efa9e689348dbb56c414e5a4c7f6f1c \ + --hash=sha256:5cb6702fbcc5b209ac3cffacd9cf0a5155feabbeb6fdcf497038be7cb6e52da6 \ + --hash=sha256:67f97cd0c6aac39a51294b04a1e922532125285c24b18a58e2a9c92c7691fa9f \ + --hash=sha256:6f50210506e9818162ef6706d3127efb0575dfe2cc98a7236ca2011f1cc3effe \ + --hash=sha256:6fda0dd512f345cc92492f96c61a0df47efc2e2064c15e8053ab2114b362d64d \ + --hash=sha256:862fcfe226ebda29a537cdce678dc8dc71ca6540ad2483099f80c6a1ee4cdbdd \ + --hash=sha256:8b89129de70e1629f200df9dfda4e4f477c26b05c29e0836604a00209c9466d5 \ + --hash=sha256:94183a78628cad257183a88ce12a3bb9ffbfe0544bd0c1aafc1f9dc55629dd1b \ + --hash=sha256:955a3ec4b161e872cc615b7a09ae9770049e9794e7b3832e3d78905a65c5049d \ + --hash=sha256:a99e3125528ea31e807f80e8c5b65118dc5cc122d0a435f1691a3cc1df55840c \ + --hash=sha256:abd626efaba4f0bc867462337f846796da0bb97b82125dbdbc63067947e353b0 \ + --hash=sha256:ae05c4f87b1dd9a21d430c52451eef5f3bd5af609d093408db91fe0dc4d8d7d1 \ + --hash=sha256:ae98508a200db6f7ae5985a53039aba8eef7ed71d34b0a0e9c9145c3e6139fc3 \ + --hash=sha256:b0203fa2731da45e5461f6e8a0768e85bba8e02137a1598b3fcadf7cbfe8e6f2 \ + --hash=sha256:b3c33e4fc7821ee6c9f40837116e16ab6175863d4a64eee024c5bec686690a87 \ + --hash=sha256:b6adf63695fa5e3d2549f7c2c9d82c6d252edd5c6ba67074637d2cb944143673 \ + --hash=sha256:b85b008f8e2cf3abfabdc24041549c51c97ea9a8bc46eeeadac8cec7acf9fbf0 \ + --hash=sha256:bac5a29fdc5df9222f7baecbcc4a88b309a66a7d147b34160940c0850ee4b9c5 \ + --hash=sha256:bca70905515fe50684974a9afaa7db4a4e9fbfdebcb0c2cde9db8e048e0d8145 \ + --hash=sha256:c0c3ebfc0af00445089629faffa4c5a1fcc42a1ca5d7dffc42bba314fde20c6d \ + --hash=sha256:c204f53ef7c1d77e9fb0dba415dbb56419f2b08ccaca66cd772e29b3a793c3e7 \ + --hash=sha256:d71b48d3dff9150a44e949b28fa5e7251a7a6895a3a77e200ce08410f096f12f \ + --hash=sha256:d839c480e4b93bb37bb1cc2777d77e6b2127c006e60b56f748f10571d8b0e471 \ + --hash=sha256:dd47d13376eaee2e8d1a1fb55d3d6ccdcc995bc931699967f7d5670ec6a454a3 \ + --hash=sha256:e012e889639aab411f5483990188da51c968377f665dcb90584971dbf314d50a \ + --hash=sha256:e0faa0c4c458eb0eb2f267daa7b106baef72c3c7ebcbece00b9e974fc8321412 \ + --hash=sha256:e7e8688342bab592647313cd2054779bcd35ad85933424ceae9f07e3a9779986 \ + --hash=sha256:ed504ca9f3c42e8e71bdbe21f5b818139a1448ac15d7bb6ce12cf41e3b7e2067 \ + --hash=sha256:f5682963a5817066db50f219c33aaa7eb969888211a289a444c42b5dfa0c0f78 # via -r requirements.in requests==2.31.0 \ --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ diff --git a/tests/core/bunkernet/api/requirements.in b/tests/core/bunkernet/api/requirements.in index 9945aad2d..c70d8e9ca 100644 --- a/tests/core/bunkernet/api/requirements.in +++ b/tests/core/bunkernet/api/requirements.in @@ -1,2 +1,2 @@ -fastapi==0.108.0 +fastapi==0.109.0 uvicorn[standard]==0.25.0 diff --git a/tests/core/bunkernet/api/requirements.txt b/tests/core/bunkernet/api/requirements.txt index 4b2d26b89..9f6ef8206 100644 --- a/tests/core/bunkernet/api/requirements.txt +++ b/tests/core/bunkernet/api/requirements.txt @@ -22,9 +22,9 @@ exceptiongroup==1.2.0 \ --hash=sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14 \ --hash=sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68 # via anyio -fastapi==0.108.0 \ - --hash=sha256:5056e504ac6395bf68493d71fcfc5352fdbd5fda6f88c21f6420d80d81163296 \ - --hash=sha256:8c7bc6d315da963ee4cdb605557827071a9a7f95aeb8fcdd3bde48cdc8764dd7 +fastapi==0.109.0 \ + --hash=sha256:8c77515984cd8e8cfeb58364f8cc7a28f0692088475e2614f7bf03275eba9093 \ + --hash=sha256:b978095b9ee01a5cf49b19f4bc1ac9b8ca83aa076e770ef8fd9af09a2b88d191 # via -r requirements.in h11==0.14.0 \ --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ @@ -243,9 +243,9 @@ sniffio==1.3.0 \ --hash=sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101 \ --hash=sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384 # via anyio -starlette==0.32.0.post1 \ - --hash=sha256:cd0cb10ddb49313f609cedfac62c8c12e56c7314b66d89bb077ba228bada1b09 \ - --hash=sha256:e54e2b7e2fb06dff9eac40133583f10dfa05913f5a85bf26f427c7a40a9a3d02 +starlette==0.35.1 \ + --hash=sha256:3e2639dac3520e4f58734ed22553f950d3f3cb1001cd2eaac4d57e8cdc5f66bc \ + --hash=sha256:50bbbda9baa098e361f398fda0928062abbaf1f54f4fadcbe17c092a01eb9a25 # via fastapi typing-extensions==4.9.0 \ --hash=sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783 \ diff --git a/tests/core/cors/requirements.txt b/tests/core/cors/requirements.txt index d8525371f..7dc9efbe9 100644 --- a/tests/core/cors/requirements.txt +++ b/tests/core/cors/requirements.txt @@ -149,9 +149,9 @@ sortedcontainers==2.4.0 \ --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 # via trio -trio==0.23.2 \ - --hash=sha256:5a0b566fa5d50cf231cfd6b08f3b03aa4179ff004b8f3144059587039e2b26d3 \ - --hash=sha256:da1d35b9a2b17eb32cae2e763b16551f9aa6703634735024e32f325c9285069e +trio==0.24.0 \ + --hash=sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c \ + --hash=sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d # via # selenium # trio-websocket diff --git a/tests/core/customcert/requirements.txt b/tests/core/customcert/requirements.txt index d8525371f..7dc9efbe9 100644 --- a/tests/core/customcert/requirements.txt +++ b/tests/core/customcert/requirements.txt @@ -149,9 +149,9 @@ sortedcontainers==2.4.0 \ --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 # via trio -trio==0.23.2 \ - --hash=sha256:5a0b566fa5d50cf231cfd6b08f3b03aa4179ff004b8f3144059587039e2b26d3 \ - --hash=sha256:da1d35b9a2b17eb32cae2e763b16551f9aa6703634735024e32f325c9285069e +trio==0.24.0 \ + --hash=sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c \ + --hash=sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d # via # selenium # trio-websocket diff --git a/tests/core/dnsbl/init/requirements.txt b/tests/core/dnsbl/init/requirements.txt index c0adfbce3..d127eefd7 100644 --- a/tests/core/dnsbl/init/requirements.txt +++ b/tests/core/dnsbl/init/requirements.txt @@ -49,9 +49,9 @@ sortedcontainers==2.4.0 \ --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 # via trio -trio==0.23.2 \ - --hash=sha256:5a0b566fa5d50cf231cfd6b08f3b03aa4179ff004b8f3144059587039e2b26d3 \ - --hash=sha256:da1d35b9a2b17eb32cae2e763b16551f9aa6703634735024e32f325c9285069e +trio==0.24.0 \ + --hash=sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c \ + --hash=sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d # via # selenium # trio-websocket diff --git a/tests/core/errors/requirements.txt b/tests/core/errors/requirements.txt index d8525371f..7dc9efbe9 100644 --- a/tests/core/errors/requirements.txt +++ b/tests/core/errors/requirements.txt @@ -149,9 +149,9 @@ sortedcontainers==2.4.0 \ --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 # via trio -trio==0.23.2 \ - --hash=sha256:5a0b566fa5d50cf231cfd6b08f3b03aa4179ff004b8f3144059587039e2b26d3 \ - --hash=sha256:da1d35b9a2b17eb32cae2e763b16551f9aa6703634735024e32f325c9285069e +trio==0.24.0 \ + --hash=sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c \ + --hash=sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d # via # selenium # trio-websocket diff --git a/tests/core/greylist/api/requirements.in b/tests/core/greylist/api/requirements.in index 9945aad2d..c70d8e9ca 100644 --- a/tests/core/greylist/api/requirements.in +++ b/tests/core/greylist/api/requirements.in @@ -1,2 +1,2 @@ -fastapi==0.108.0 +fastapi==0.109.0 uvicorn[standard]==0.25.0 diff --git a/tests/core/greylist/api/requirements.txt b/tests/core/greylist/api/requirements.txt index 4b2d26b89..9f6ef8206 100644 --- a/tests/core/greylist/api/requirements.txt +++ b/tests/core/greylist/api/requirements.txt @@ -22,9 +22,9 @@ exceptiongroup==1.2.0 \ --hash=sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14 \ --hash=sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68 # via anyio -fastapi==0.108.0 \ - --hash=sha256:5056e504ac6395bf68493d71fcfc5352fdbd5fda6f88c21f6420d80d81163296 \ - --hash=sha256:8c7bc6d315da963ee4cdb605557827071a9a7f95aeb8fcdd3bde48cdc8764dd7 +fastapi==0.109.0 \ + --hash=sha256:8c77515984cd8e8cfeb58364f8cc7a28f0692088475e2614f7bf03275eba9093 \ + --hash=sha256:b978095b9ee01a5cf49b19f4bc1ac9b8ca83aa076e770ef8fd9af09a2b88d191 # via -r requirements.in h11==0.14.0 \ --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ @@ -243,9 +243,9 @@ sniffio==1.3.0 \ --hash=sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101 \ --hash=sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384 # via anyio -starlette==0.32.0.post1 \ - --hash=sha256:cd0cb10ddb49313f609cedfac62c8c12e56c7314b66d89bb077ba228bada1b09 \ - --hash=sha256:e54e2b7e2fb06dff9eac40133583f10dfa05913f5a85bf26f427c7a40a9a3d02 +starlette==0.35.1 \ + --hash=sha256:3e2639dac3520e4f58734ed22553f950d3f3cb1001cd2eaac4d57e8cdc5f66bc \ + --hash=sha256:50bbbda9baa098e361f398fda0928062abbaf1f54f4fadcbe17c092a01eb9a25 # via fastapi typing-extensions==4.9.0 \ --hash=sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783 \ diff --git a/tests/core/greylist/init/requirements.in b/tests/core/greylist/init/requirements.in index 40b89144b..16be7b8ef 100644 --- a/tests/core/greylist/init/requirements.in +++ b/tests/core/greylist/init/requirements.in @@ -1,2 +1,2 @@ -maxminddb==2.5.1 +maxminddb==2.5.2 requests==2.31.0 diff --git a/tests/core/greylist/init/requirements.txt b/tests/core/greylist/init/requirements.txt index 53d7e6b8e..5207ef6a6 100644 --- a/tests/core/greylist/init/requirements.txt +++ b/tests/core/greylist/init/requirements.txt @@ -104,55 +104,55 @@ idna==3.6 \ --hash=sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca \ --hash=sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f # via requests -maxminddb==2.5.1 \ - --hash=sha256:0702da59b9670a72761b65cb1a52bc3032d8f6799bdab641cb8350ad5740580b \ - --hash=sha256:0a21abd85e10e5e0f60244b49c3db17e7e48befd4972e62a62833d91e2acbb49 \ - --hash=sha256:0cbd272db3202e948c9088e48dec62add071a47971d84ceb11d2cb2880f83e5a \ - --hash=sha256:17ea454f61631b9815d420d48d00663f8718fc7de30be53ffcec0f73989475eb \ - --hash=sha256:188173c07dce0692fd5660a6eb7ea8c126d7b3a4b61496c8a8ee9e8b10186ff5 \ - --hash=sha256:1e091c2b44673c218ee2df23adbc0b6d04fd5c646cfcb6c6fe26fb849434812a \ - --hash=sha256:2a7a73ab4bbc16b81983531c99fa102a0c7dae459db958c17fea48c981f5e764 \ - --hash=sha256:2c2901daebd7c8a702302315e7a58cdc38e626406ad4a05b4d48634897d5f5a3 \ - --hash=sha256:2e20a70c1545d6626dcd4ce2d7ecf3d566d978ea64cb37e7952f93baff66b812 \ - --hash=sha256:2ecb1be961f1969be047d07743093f0dcf2f6d4ec3a06a4555587f380a96f6e7 \ - --hash=sha256:3ce1f42bdfce7b86cb5a56cba730fed611fb879d867e6024f0d520257bef6891 \ - --hash=sha256:3d52c693baf07bba897d109b0ecb067f21fd0cc0fb266d67db456e85b80d699e \ - --hash=sha256:4807d374e645bd68334e4f487ba85a27189dbc1267a98e644aa686a7927e0559 \ - --hash=sha256:4c67621e842c415ce336ab019a9f087305dfcf24c095b68b8e9d27848f6f6d91 \ - --hash=sha256:500d321bdefe4dcd351e4390a79b7786aab49b0536bedfa0788e5ffb0e91e421 \ - --hash=sha256:526744b12075051fa20979090c111cc3a42a3b55e2714818270c7b84a41a8cfe \ - --hash=sha256:5a6751e2e89d62d53217870bcc2a8c887dc56ae370ba1b74e52e880761916e54 \ - --hash=sha256:5d772be68cce812f7c4b15ae8c68e624c8b88ff83071e3903ca5b5f55e343c25 \ - --hash=sha256:607344b1079ea647629bf962dcea7580ec864faaad3f5aae650e2e8652121d89 \ - --hash=sha256:62e93a8e99937bf4307eeece3ca37e1161325ebf9363c4ce195410fb5daf64a0 \ - --hash=sha256:639aee8abd63a95baa12b94b6f3a842d51877d631879c7d08c98c68dc44a84c3 \ - --hash=sha256:6667948e7501a513caef90edda2d367865097239d4c2381eb3998e9905af7209 \ - --hash=sha256:7805ae8c9de433c38939ada2e376706a9f6740239f61fd445927b88f5b42c267 \ - --hash=sha256:85a302d79577efe5bc308647394ffdc535dd5f062644c41103604ccf24931a05 \ - --hash=sha256:892c11a8694394e97d3ac0f8d5974ea588c732d14e721f22095c58b4f584c144 \ - --hash=sha256:8b98ed5c34955c48e72d35daed713ba4a6833a8a6d1204e79d2c85e644049792 \ - --hash=sha256:8cee4315da7cdd3f2a18f1ab1418953a7a9eda65e63095b01f03c7d3645d633e \ - --hash=sha256:910e7b3ad87d5352ed3f496bd42bffbf9f896245278b0d8e76afa1382e42a7ae \ - --hash=sha256:93f7055779caf7753810f1e2c6444af6d727393fd116ffa0767fbd54fb8c9bbf \ - --hash=sha256:969d0057ea5472e0b574c5293c4f3ecf49585362351c543e8ea55dc48b60f1eb \ - --hash=sha256:a01b0341bd6bee431bb8c07c7ac0ed221250c7390b125c025b7d57578e78e8a3 \ - --hash=sha256:a1e1a19f9740f586362f47862d0095b54d50b9d465babcaa8a563746132fe5be \ - --hash=sha256:aae262da1940a67c3ba765c49e2308947ce68ff647f87630002c306433a98ca1 \ - --hash=sha256:b0bbbd58b300aaddf985f763720bdebba9f7a73168ff9f57168117f630ad1c06 \ - --hash=sha256:b223c53077a736c304b63cf5afceb928975fbd12ddae5afd6b71370bab7b4700 \ - --hash=sha256:b477852cf1741d9187b021e23723e64b063794bbf946a9b5b84cc222f3caf58a \ - --hash=sha256:c4e5ca423b1e310f0327536f5ed1a2c6e08d83289a7f909e021590b0b477cae2 \ - --hash=sha256:c97eac5af102cede4b5f57cecb25e8f949fa4e4a8d812bed575539951c60ecaf \ - --hash=sha256:d4d36cf3d390f02d2bdf53d9efefb92be7bd70e07a5a86cdb79020c48c2d81b7 \ - --hash=sha256:d654895b546a47e85f2e071b98e377a60bb03cd643b9423017fa66fcd5adedce \ - --hash=sha256:dd28c434fb44f825dde6a75df2c338d44645791b03480af66a4d993f93801e10 \ - --hash=sha256:e09b295c401c104ae0e30f66c1a3f3c2aa4ba2cbe12a787576499356a5a4d6c1 \ - --hash=sha256:ea2e27a507b53dfbf2ba2ba85c98682a1ad2dac3f9941a7bffa5cb86150d0c47 \ - --hash=sha256:ef4d508c899ce0f37de731340759c68bfd1102a39a873675c71fae2c8d71ad97 \ - --hash=sha256:f1e5bd58b71f322dc6c16a95a129433b1bc229d4b714f870a61c2367425396ee \ - --hash=sha256:fad45cd2f2e3c5fbebacb8d172a60fb22443222e549bf740a0bc7eeb849e5ce7 \ - --hash=sha256:fbd01fc7d7b5b2befe914e8cdb5ed3a1c5476e57b765197cceff8d897f33d012 \ - --hash=sha256:fe0af3ba9e1a78ed5f2ad32fc18d18b78ef233e7d0c627e1a77a525a7eb0c241 +maxminddb==2.5.2 \ + --hash=sha256:08a540ec3661f6ca40499c86028e96dca5780e9d471b485dc797859b0b22dd22 \ + --hash=sha256:099f4e27feec4bb9658034a3eb853e746721fc15709030bee4f2f889f4a34185 \ + --hash=sha256:1409a045eb04cebb297221eab1020c4f05434d02c0961410f6996ef474482998 \ + --hash=sha256:17de49660372dcccaa23958eccdd1c2464f92f594d027045ad76788db14a5da4 \ + --hash=sha256:17fdb691c389a0e956410d5baef9ad082a0aa67dd6aa231d193499e71a104c19 \ + --hash=sha256:19d8d1e9bbc5281fb4c8112d541d2bd350fd8b5ddfbb43a6951e46df7cd27b9d \ + --hash=sha256:1a3fab6bea6cc59444e6bad2a4fbf91228f6f51dcb29d09ed091930a475bd8cb \ + --hash=sha256:20596e452d03071db37a72c8ef9236126c04ed342864f68db0adf0d1bc9f642e \ + --hash=sha256:22184fa2514c15f5b39e4e2522f4f73d00afcf5eb7102c473f9376f3c3a03b81 \ + --hash=sha256:29d63e7711e5f95c7c190010e57dca9e262aee8ac300aaf75c3f7ede0b5a5863 \ + --hash=sha256:2bba43d370a57785f5ef61c10d0b4bf8de58d431da3c4c2ed78bb2ff3d07edbf \ + --hash=sha256:2cb718908b9dffa10e02361094158ae68ded5a82c750de89737437999a81bafe \ + --hash=sha256:2e01b09480b97d2ebe6765618fb12a0f52caa17368d6cf1f42481d6740428de7 \ + --hash=sha256:2ec51b66774b102824c9a3dd4916356283f6a61db1868d4ebcb98bf26486718e \ + --hash=sha256:335ee3140b41d4e751c14f8fae297aa064c7d3f184c9fbb2790336123187c440 \ + --hash=sha256:3ddbe547d83a2e28e81d9f59fd9708d3044ffb2398ee0f8df2e2a2e9cdea6646 \ + --hash=sha256:3e9198d25e252b27d4e9526d5fcd4b78341c23153363a94f1246de5afcd39f6d \ + --hash=sha256:3fe6bb1b5ea132fcd9fd7b16c80247f0ba667018d5f9f98cd645b297e3b02fbf \ + --hash=sha256:461dcf0a4f67aa1c9faea6d52c4060d39559bf68e99a514cf8c1e01af383f90b \ + --hash=sha256:5a5053231228d7cbf57d98a741b3cbee9efa9e689348dbb56c414e5a4c7f6f1c \ + --hash=sha256:5cb6702fbcc5b209ac3cffacd9cf0a5155feabbeb6fdcf497038be7cb6e52da6 \ + --hash=sha256:67f97cd0c6aac39a51294b04a1e922532125285c24b18a58e2a9c92c7691fa9f \ + --hash=sha256:6f50210506e9818162ef6706d3127efb0575dfe2cc98a7236ca2011f1cc3effe \ + --hash=sha256:6fda0dd512f345cc92492f96c61a0df47efc2e2064c15e8053ab2114b362d64d \ + --hash=sha256:862fcfe226ebda29a537cdce678dc8dc71ca6540ad2483099f80c6a1ee4cdbdd \ + --hash=sha256:8b89129de70e1629f200df9dfda4e4f477c26b05c29e0836604a00209c9466d5 \ + --hash=sha256:94183a78628cad257183a88ce12a3bb9ffbfe0544bd0c1aafc1f9dc55629dd1b \ + --hash=sha256:955a3ec4b161e872cc615b7a09ae9770049e9794e7b3832e3d78905a65c5049d \ + --hash=sha256:a99e3125528ea31e807f80e8c5b65118dc5cc122d0a435f1691a3cc1df55840c \ + --hash=sha256:abd626efaba4f0bc867462337f846796da0bb97b82125dbdbc63067947e353b0 \ + --hash=sha256:ae05c4f87b1dd9a21d430c52451eef5f3bd5af609d093408db91fe0dc4d8d7d1 \ + --hash=sha256:ae98508a200db6f7ae5985a53039aba8eef7ed71d34b0a0e9c9145c3e6139fc3 \ + --hash=sha256:b0203fa2731da45e5461f6e8a0768e85bba8e02137a1598b3fcadf7cbfe8e6f2 \ + --hash=sha256:b3c33e4fc7821ee6c9f40837116e16ab6175863d4a64eee024c5bec686690a87 \ + --hash=sha256:b6adf63695fa5e3d2549f7c2c9d82c6d252edd5c6ba67074637d2cb944143673 \ + --hash=sha256:b85b008f8e2cf3abfabdc24041549c51c97ea9a8bc46eeeadac8cec7acf9fbf0 \ + --hash=sha256:bac5a29fdc5df9222f7baecbcc4a88b309a66a7d147b34160940c0850ee4b9c5 \ + --hash=sha256:bca70905515fe50684974a9afaa7db4a4e9fbfdebcb0c2cde9db8e048e0d8145 \ + --hash=sha256:c0c3ebfc0af00445089629faffa4c5a1fcc42a1ca5d7dffc42bba314fde20c6d \ + --hash=sha256:c204f53ef7c1d77e9fb0dba415dbb56419f2b08ccaca66cd772e29b3a793c3e7 \ + --hash=sha256:d71b48d3dff9150a44e949b28fa5e7251a7a6895a3a77e200ce08410f096f12f \ + --hash=sha256:d839c480e4b93bb37bb1cc2777d77e6b2127c006e60b56f748f10571d8b0e471 \ + --hash=sha256:dd47d13376eaee2e8d1a1fb55d3d6ccdcc995bc931699967f7d5670ec6a454a3 \ + --hash=sha256:e012e889639aab411f5483990188da51c968377f665dcb90584971dbf314d50a \ + --hash=sha256:e0faa0c4c458eb0eb2f267daa7b106baef72c3c7ebcbece00b9e974fc8321412 \ + --hash=sha256:e7e8688342bab592647313cd2054779bcd35ad85933424ceae9f07e3a9779986 \ + --hash=sha256:ed504ca9f3c42e8e71bdbe21f5b818139a1448ac15d7bb6ce12cf41e3b7e2067 \ + --hash=sha256:f5682963a5817066db50f219c33aaa7eb969888211a289a444c42b5dfa0c0f78 # via -r requirements.in requests==2.31.0 \ --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ diff --git a/tests/core/redirect/requirements.txt b/tests/core/redirect/requirements.txt index d8525371f..7dc9efbe9 100644 --- a/tests/core/redirect/requirements.txt +++ b/tests/core/redirect/requirements.txt @@ -149,9 +149,9 @@ sortedcontainers==2.4.0 \ --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 # via trio -trio==0.23.2 \ - --hash=sha256:5a0b566fa5d50cf231cfd6b08f3b03aa4179ff004b8f3144059587039e2b26d3 \ - --hash=sha256:da1d35b9a2b17eb32cae2e763b16551f9aa6703634735024e32f325c9285069e +trio==0.24.0 \ + --hash=sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c \ + --hash=sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d # via # selenium # trio-websocket diff --git a/tests/core/redis/requirements.in b/tests/core/redis/requirements.in index 819a03740..e1fced6d7 100644 --- a/tests/core/redis/requirements.in +++ b/tests/core/redis/requirements.in @@ -1,4 +1,4 @@ -fastapi==0.108.0 +fastapi==0.109.0 redis==5.0.1 requests==2.31.0 selenium==4.16.0 diff --git a/tests/core/redis/requirements.txt b/tests/core/redis/requirements.txt index 92e3e23e8..278878e84 100644 --- a/tests/core/redis/requirements.txt +++ b/tests/core/redis/requirements.txt @@ -133,9 +133,9 @@ exceptiongroup==1.2.0 \ # anyio # trio # trio-websocket -fastapi==0.108.0 \ - --hash=sha256:5056e504ac6395bf68493d71fcfc5352fdbd5fda6f88c21f6420d80d81163296 \ - --hash=sha256:8c7bc6d315da963ee4cdb605557827071a9a7f95aeb8fcdd3bde48cdc8764dd7 +fastapi==0.109.0 \ + --hash=sha256:8c77515984cd8e8cfeb58364f8cc7a28f0692088475e2614f7bf03275eba9093 \ + --hash=sha256:b978095b9ee01a5cf49b19f4bc1ac9b8ca83aa076e770ef8fd9af09a2b88d191 # via -r requirements.in h11==0.14.0 \ --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ @@ -386,13 +386,13 @@ sortedcontainers==2.4.0 \ --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 # via trio -starlette==0.32.0.post1 \ - --hash=sha256:cd0cb10ddb49313f609cedfac62c8c12e56c7314b66d89bb077ba228bada1b09 \ - --hash=sha256:e54e2b7e2fb06dff9eac40133583f10dfa05913f5a85bf26f427c7a40a9a3d02 +starlette==0.35.1 \ + --hash=sha256:3e2639dac3520e4f58734ed22553f950d3f3cb1001cd2eaac4d57e8cdc5f66bc \ + --hash=sha256:50bbbda9baa098e361f398fda0928062abbaf1f54f4fadcbe17c092a01eb9a25 # via fastapi -trio==0.23.2 \ - --hash=sha256:5a0b566fa5d50cf231cfd6b08f3b03aa4179ff004b8f3144059587039e2b26d3 \ - --hash=sha256:da1d35b9a2b17eb32cae2e763b16551f9aa6703634735024e32f325c9285069e +trio==0.24.0 \ + --hash=sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c \ + --hash=sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d # via # selenium # trio-websocket diff --git a/tests/core/reversescan/requirements.in b/tests/core/reversescan/requirements.in index ddf7c36a9..4b2f52ce8 100644 --- a/tests/core/reversescan/requirements.in +++ b/tests/core/reversescan/requirements.in @@ -1,3 +1,3 @@ -fastapi==0.108.0 +fastapi==0.109.0 requests==2.31.0 uvicorn[standard]==0.25.0 diff --git a/tests/core/reversescan/requirements.txt b/tests/core/reversescan/requirements.txt index d74b6c256..865d07ddd 100644 --- a/tests/core/reversescan/requirements.txt +++ b/tests/core/reversescan/requirements.txt @@ -118,9 +118,9 @@ exceptiongroup==1.2.0 \ --hash=sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14 \ --hash=sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68 # via anyio -fastapi==0.108.0 \ - --hash=sha256:5056e504ac6395bf68493d71fcfc5352fdbd5fda6f88c21f6420d80d81163296 \ - --hash=sha256:8c7bc6d315da963ee4cdb605557827071a9a7f95aeb8fcdd3bde48cdc8764dd7 +fastapi==0.109.0 \ + --hash=sha256:8c77515984cd8e8cfeb58364f8cc7a28f0692088475e2614f7bf03275eba9093 \ + --hash=sha256:b978095b9ee01a5cf49b19f4bc1ac9b8ca83aa076e770ef8fd9af09a2b88d191 # via -r requirements.in h11==0.14.0 \ --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ @@ -345,9 +345,9 @@ sniffio==1.3.0 \ --hash=sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101 \ --hash=sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384 # via anyio -starlette==0.32.0.post1 \ - --hash=sha256:cd0cb10ddb49313f609cedfac62c8c12e56c7314b66d89bb077ba228bada1b09 \ - --hash=sha256:e54e2b7e2fb06dff9eac40133583f10dfa05913f5a85bf26f427c7a40a9a3d02 +starlette==0.35.1 \ + --hash=sha256:3e2639dac3520e4f58734ed22553f950d3f3cb1001cd2eaac4d57e8cdc5f66bc \ + --hash=sha256:50bbbda9baa098e361f398fda0928062abbaf1f54f4fadcbe17c092a01eb9a25 # via fastapi typing-extensions==4.9.0 \ --hash=sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783 \ diff --git a/tests/core/sessions/requirements.txt b/tests/core/sessions/requirements.txt index d8525371f..7dc9efbe9 100644 --- a/tests/core/sessions/requirements.txt +++ b/tests/core/sessions/requirements.txt @@ -149,9 +149,9 @@ sortedcontainers==2.4.0 \ --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 # via trio -trio==0.23.2 \ - --hash=sha256:5a0b566fa5d50cf231cfd6b08f3b03aa4179ff004b8f3144059587039e2b26d3 \ - --hash=sha256:da1d35b9a2b17eb32cae2e763b16551f9aa6703634735024e32f325c9285069e +trio==0.24.0 \ + --hash=sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c \ + --hash=sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d # via # selenium # trio-websocket diff --git a/tests/core/whitelist/api/requirements.in b/tests/core/whitelist/api/requirements.in index 9945aad2d..c70d8e9ca 100644 --- a/tests/core/whitelist/api/requirements.in +++ b/tests/core/whitelist/api/requirements.in @@ -1,2 +1,2 @@ -fastapi==0.108.0 +fastapi==0.109.0 uvicorn[standard]==0.25.0 diff --git a/tests/core/whitelist/api/requirements.txt b/tests/core/whitelist/api/requirements.txt index 4b2d26b89..9f6ef8206 100644 --- a/tests/core/whitelist/api/requirements.txt +++ b/tests/core/whitelist/api/requirements.txt @@ -22,9 +22,9 @@ exceptiongroup==1.2.0 \ --hash=sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14 \ --hash=sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68 # via anyio -fastapi==0.108.0 \ - --hash=sha256:5056e504ac6395bf68493d71fcfc5352fdbd5fda6f88c21f6420d80d81163296 \ - --hash=sha256:8c7bc6d315da963ee4cdb605557827071a9a7f95aeb8fcdd3bde48cdc8764dd7 +fastapi==0.109.0 \ + --hash=sha256:8c77515984cd8e8cfeb58364f8cc7a28f0692088475e2614f7bf03275eba9093 \ + --hash=sha256:b978095b9ee01a5cf49b19f4bc1ac9b8ca83aa076e770ef8fd9af09a2b88d191 # via -r requirements.in h11==0.14.0 \ --hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \ @@ -243,9 +243,9 @@ sniffio==1.3.0 \ --hash=sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101 \ --hash=sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384 # via anyio -starlette==0.32.0.post1 \ - --hash=sha256:cd0cb10ddb49313f609cedfac62c8c12e56c7314b66d89bb077ba228bada1b09 \ - --hash=sha256:e54e2b7e2fb06dff9eac40133583f10dfa05913f5a85bf26f427c7a40a9a3d02 +starlette==0.35.1 \ + --hash=sha256:3e2639dac3520e4f58734ed22553f950d3f3cb1001cd2eaac4d57e8cdc5f66bc \ + --hash=sha256:50bbbda9baa098e361f398fda0928062abbaf1f54f4fadcbe17c092a01eb9a25 # via fastapi typing-extensions==4.9.0 \ --hash=sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783 \ diff --git a/tests/core/whitelist/init/requirements.in b/tests/core/whitelist/init/requirements.in index 40b89144b..16be7b8ef 100644 --- a/tests/core/whitelist/init/requirements.in +++ b/tests/core/whitelist/init/requirements.in @@ -1,2 +1,2 @@ -maxminddb==2.5.1 +maxminddb==2.5.2 requests==2.31.0 diff --git a/tests/core/whitelist/init/requirements.txt b/tests/core/whitelist/init/requirements.txt index 53d7e6b8e..5207ef6a6 100644 --- a/tests/core/whitelist/init/requirements.txt +++ b/tests/core/whitelist/init/requirements.txt @@ -104,55 +104,55 @@ idna==3.6 \ --hash=sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca \ --hash=sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f # via requests -maxminddb==2.5.1 \ - --hash=sha256:0702da59b9670a72761b65cb1a52bc3032d8f6799bdab641cb8350ad5740580b \ - --hash=sha256:0a21abd85e10e5e0f60244b49c3db17e7e48befd4972e62a62833d91e2acbb49 \ - --hash=sha256:0cbd272db3202e948c9088e48dec62add071a47971d84ceb11d2cb2880f83e5a \ - --hash=sha256:17ea454f61631b9815d420d48d00663f8718fc7de30be53ffcec0f73989475eb \ - --hash=sha256:188173c07dce0692fd5660a6eb7ea8c126d7b3a4b61496c8a8ee9e8b10186ff5 \ - --hash=sha256:1e091c2b44673c218ee2df23adbc0b6d04fd5c646cfcb6c6fe26fb849434812a \ - --hash=sha256:2a7a73ab4bbc16b81983531c99fa102a0c7dae459db958c17fea48c981f5e764 \ - --hash=sha256:2c2901daebd7c8a702302315e7a58cdc38e626406ad4a05b4d48634897d5f5a3 \ - --hash=sha256:2e20a70c1545d6626dcd4ce2d7ecf3d566d978ea64cb37e7952f93baff66b812 \ - --hash=sha256:2ecb1be961f1969be047d07743093f0dcf2f6d4ec3a06a4555587f380a96f6e7 \ - --hash=sha256:3ce1f42bdfce7b86cb5a56cba730fed611fb879d867e6024f0d520257bef6891 \ - --hash=sha256:3d52c693baf07bba897d109b0ecb067f21fd0cc0fb266d67db456e85b80d699e \ - --hash=sha256:4807d374e645bd68334e4f487ba85a27189dbc1267a98e644aa686a7927e0559 \ - --hash=sha256:4c67621e842c415ce336ab019a9f087305dfcf24c095b68b8e9d27848f6f6d91 \ - --hash=sha256:500d321bdefe4dcd351e4390a79b7786aab49b0536bedfa0788e5ffb0e91e421 \ - --hash=sha256:526744b12075051fa20979090c111cc3a42a3b55e2714818270c7b84a41a8cfe \ - --hash=sha256:5a6751e2e89d62d53217870bcc2a8c887dc56ae370ba1b74e52e880761916e54 \ - --hash=sha256:5d772be68cce812f7c4b15ae8c68e624c8b88ff83071e3903ca5b5f55e343c25 \ - --hash=sha256:607344b1079ea647629bf962dcea7580ec864faaad3f5aae650e2e8652121d89 \ - --hash=sha256:62e93a8e99937bf4307eeece3ca37e1161325ebf9363c4ce195410fb5daf64a0 \ - --hash=sha256:639aee8abd63a95baa12b94b6f3a842d51877d631879c7d08c98c68dc44a84c3 \ - --hash=sha256:6667948e7501a513caef90edda2d367865097239d4c2381eb3998e9905af7209 \ - --hash=sha256:7805ae8c9de433c38939ada2e376706a9f6740239f61fd445927b88f5b42c267 \ - --hash=sha256:85a302d79577efe5bc308647394ffdc535dd5f062644c41103604ccf24931a05 \ - --hash=sha256:892c11a8694394e97d3ac0f8d5974ea588c732d14e721f22095c58b4f584c144 \ - --hash=sha256:8b98ed5c34955c48e72d35daed713ba4a6833a8a6d1204e79d2c85e644049792 \ - --hash=sha256:8cee4315da7cdd3f2a18f1ab1418953a7a9eda65e63095b01f03c7d3645d633e \ - --hash=sha256:910e7b3ad87d5352ed3f496bd42bffbf9f896245278b0d8e76afa1382e42a7ae \ - --hash=sha256:93f7055779caf7753810f1e2c6444af6d727393fd116ffa0767fbd54fb8c9bbf \ - --hash=sha256:969d0057ea5472e0b574c5293c4f3ecf49585362351c543e8ea55dc48b60f1eb \ - --hash=sha256:a01b0341bd6bee431bb8c07c7ac0ed221250c7390b125c025b7d57578e78e8a3 \ - --hash=sha256:a1e1a19f9740f586362f47862d0095b54d50b9d465babcaa8a563746132fe5be \ - --hash=sha256:aae262da1940a67c3ba765c49e2308947ce68ff647f87630002c306433a98ca1 \ - --hash=sha256:b0bbbd58b300aaddf985f763720bdebba9f7a73168ff9f57168117f630ad1c06 \ - --hash=sha256:b223c53077a736c304b63cf5afceb928975fbd12ddae5afd6b71370bab7b4700 \ - --hash=sha256:b477852cf1741d9187b021e23723e64b063794bbf946a9b5b84cc222f3caf58a \ - --hash=sha256:c4e5ca423b1e310f0327536f5ed1a2c6e08d83289a7f909e021590b0b477cae2 \ - --hash=sha256:c97eac5af102cede4b5f57cecb25e8f949fa4e4a8d812bed575539951c60ecaf \ - --hash=sha256:d4d36cf3d390f02d2bdf53d9efefb92be7bd70e07a5a86cdb79020c48c2d81b7 \ - --hash=sha256:d654895b546a47e85f2e071b98e377a60bb03cd643b9423017fa66fcd5adedce \ - --hash=sha256:dd28c434fb44f825dde6a75df2c338d44645791b03480af66a4d993f93801e10 \ - --hash=sha256:e09b295c401c104ae0e30f66c1a3f3c2aa4ba2cbe12a787576499356a5a4d6c1 \ - --hash=sha256:ea2e27a507b53dfbf2ba2ba85c98682a1ad2dac3f9941a7bffa5cb86150d0c47 \ - --hash=sha256:ef4d508c899ce0f37de731340759c68bfd1102a39a873675c71fae2c8d71ad97 \ - --hash=sha256:f1e5bd58b71f322dc6c16a95a129433b1bc229d4b714f870a61c2367425396ee \ - --hash=sha256:fad45cd2f2e3c5fbebacb8d172a60fb22443222e549bf740a0bc7eeb849e5ce7 \ - --hash=sha256:fbd01fc7d7b5b2befe914e8cdb5ed3a1c5476e57b765197cceff8d897f33d012 \ - --hash=sha256:fe0af3ba9e1a78ed5f2ad32fc18d18b78ef233e7d0c627e1a77a525a7eb0c241 +maxminddb==2.5.2 \ + --hash=sha256:08a540ec3661f6ca40499c86028e96dca5780e9d471b485dc797859b0b22dd22 \ + --hash=sha256:099f4e27feec4bb9658034a3eb853e746721fc15709030bee4f2f889f4a34185 \ + --hash=sha256:1409a045eb04cebb297221eab1020c4f05434d02c0961410f6996ef474482998 \ + --hash=sha256:17de49660372dcccaa23958eccdd1c2464f92f594d027045ad76788db14a5da4 \ + --hash=sha256:17fdb691c389a0e956410d5baef9ad082a0aa67dd6aa231d193499e71a104c19 \ + --hash=sha256:19d8d1e9bbc5281fb4c8112d541d2bd350fd8b5ddfbb43a6951e46df7cd27b9d \ + --hash=sha256:1a3fab6bea6cc59444e6bad2a4fbf91228f6f51dcb29d09ed091930a475bd8cb \ + --hash=sha256:20596e452d03071db37a72c8ef9236126c04ed342864f68db0adf0d1bc9f642e \ + --hash=sha256:22184fa2514c15f5b39e4e2522f4f73d00afcf5eb7102c473f9376f3c3a03b81 \ + --hash=sha256:29d63e7711e5f95c7c190010e57dca9e262aee8ac300aaf75c3f7ede0b5a5863 \ + --hash=sha256:2bba43d370a57785f5ef61c10d0b4bf8de58d431da3c4c2ed78bb2ff3d07edbf \ + --hash=sha256:2cb718908b9dffa10e02361094158ae68ded5a82c750de89737437999a81bafe \ + --hash=sha256:2e01b09480b97d2ebe6765618fb12a0f52caa17368d6cf1f42481d6740428de7 \ + --hash=sha256:2ec51b66774b102824c9a3dd4916356283f6a61db1868d4ebcb98bf26486718e \ + --hash=sha256:335ee3140b41d4e751c14f8fae297aa064c7d3f184c9fbb2790336123187c440 \ + --hash=sha256:3ddbe547d83a2e28e81d9f59fd9708d3044ffb2398ee0f8df2e2a2e9cdea6646 \ + --hash=sha256:3e9198d25e252b27d4e9526d5fcd4b78341c23153363a94f1246de5afcd39f6d \ + --hash=sha256:3fe6bb1b5ea132fcd9fd7b16c80247f0ba667018d5f9f98cd645b297e3b02fbf \ + --hash=sha256:461dcf0a4f67aa1c9faea6d52c4060d39559bf68e99a514cf8c1e01af383f90b \ + --hash=sha256:5a5053231228d7cbf57d98a741b3cbee9efa9e689348dbb56c414e5a4c7f6f1c \ + --hash=sha256:5cb6702fbcc5b209ac3cffacd9cf0a5155feabbeb6fdcf497038be7cb6e52da6 \ + --hash=sha256:67f97cd0c6aac39a51294b04a1e922532125285c24b18a58e2a9c92c7691fa9f \ + --hash=sha256:6f50210506e9818162ef6706d3127efb0575dfe2cc98a7236ca2011f1cc3effe \ + --hash=sha256:6fda0dd512f345cc92492f96c61a0df47efc2e2064c15e8053ab2114b362d64d \ + --hash=sha256:862fcfe226ebda29a537cdce678dc8dc71ca6540ad2483099f80c6a1ee4cdbdd \ + --hash=sha256:8b89129de70e1629f200df9dfda4e4f477c26b05c29e0836604a00209c9466d5 \ + --hash=sha256:94183a78628cad257183a88ce12a3bb9ffbfe0544bd0c1aafc1f9dc55629dd1b \ + --hash=sha256:955a3ec4b161e872cc615b7a09ae9770049e9794e7b3832e3d78905a65c5049d \ + --hash=sha256:a99e3125528ea31e807f80e8c5b65118dc5cc122d0a435f1691a3cc1df55840c \ + --hash=sha256:abd626efaba4f0bc867462337f846796da0bb97b82125dbdbc63067947e353b0 \ + --hash=sha256:ae05c4f87b1dd9a21d430c52451eef5f3bd5af609d093408db91fe0dc4d8d7d1 \ + --hash=sha256:ae98508a200db6f7ae5985a53039aba8eef7ed71d34b0a0e9c9145c3e6139fc3 \ + --hash=sha256:b0203fa2731da45e5461f6e8a0768e85bba8e02137a1598b3fcadf7cbfe8e6f2 \ + --hash=sha256:b3c33e4fc7821ee6c9f40837116e16ab6175863d4a64eee024c5bec686690a87 \ + --hash=sha256:b6adf63695fa5e3d2549f7c2c9d82c6d252edd5c6ba67074637d2cb944143673 \ + --hash=sha256:b85b008f8e2cf3abfabdc24041549c51c97ea9a8bc46eeeadac8cec7acf9fbf0 \ + --hash=sha256:bac5a29fdc5df9222f7baecbcc4a88b309a66a7d147b34160940c0850ee4b9c5 \ + --hash=sha256:bca70905515fe50684974a9afaa7db4a4e9fbfdebcb0c2cde9db8e048e0d8145 \ + --hash=sha256:c0c3ebfc0af00445089629faffa4c5a1fcc42a1ca5d7dffc42bba314fde20c6d \ + --hash=sha256:c204f53ef7c1d77e9fb0dba415dbb56419f2b08ccaca66cd772e29b3a793c3e7 \ + --hash=sha256:d71b48d3dff9150a44e949b28fa5e7251a7a6895a3a77e200ce08410f096f12f \ + --hash=sha256:d839c480e4b93bb37bb1cc2777d77e6b2127c006e60b56f748f10571d8b0e471 \ + --hash=sha256:dd47d13376eaee2e8d1a1fb55d3d6ccdcc995bc931699967f7d5670ec6a454a3 \ + --hash=sha256:e012e889639aab411f5483990188da51c968377f665dcb90584971dbf314d50a \ + --hash=sha256:e0faa0c4c458eb0eb2f267daa7b106baef72c3c7ebcbece00b9e974fc8321412 \ + --hash=sha256:e7e8688342bab592647313cd2054779bcd35ad85933424ceae9f07e3a9779986 \ + --hash=sha256:ed504ca9f3c42e8e71bdbe21f5b818139a1448ac15d7bb6ce12cf41e3b7e2067 \ + --hash=sha256:f5682963a5817066db50f219c33aaa7eb969888211a289a444c42b5dfa0c0f78 # via -r requirements.in requests==2.31.0 \ --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ diff --git a/tests/linux/Dockerfile-centos b/tests/linux/Dockerfile-centos index 0e3d08b9a..3ba981aad 100644 --- a/tests/linux/Dockerfile-centos +++ b/tests/linux/Dockerfile-centos @@ -1,4 +1,4 @@ -FROM quay.io/centos/centos:stream8@sha256:e4e81a5e6be8f8f7eb511a8df3afcd4e7123e68c56bc03efc40fbd0ab5b2e4fd +FROM quay.io/centos/centos:stream8@sha256:a8692b39e546eed9177d495db1edfd97bb6de70b9527f58aeb72f90b687c3426 RUN yum install -y initscripts # for old "service" diff --git a/tests/linux/Dockerfile-debian b/tests/linux/Dockerfile-debian index d51fbe420..4e5f15080 100644 --- a/tests/linux/Dockerfile-debian +++ b/tests/linux/Dockerfile-debian @@ -1,4 +1,4 @@ -FROM debian:bookworm@sha256:133a1f2aa9e55d1c93d0ae1aaa7b94fb141265d0ee3ea677175cdb96f5f990e5 +FROM debian:bookworm@sha256:b16cef8cbcb20935c0f052e37fc3d38dc92bfec0bcfb894c328547f81e932d67 ENV container docker ENV LC_ALL C diff --git a/tests/linux/Dockerfile-rhel b/tests/linux/Dockerfile-rhel index fc284441a..127ee6bd3 100644 --- a/tests/linux/Dockerfile-rhel +++ b/tests/linux/Dockerfile-rhel @@ -1,4 +1,4 @@ -FROM redhat/ubi8-init:8.9-1@sha256:d56665582a7430d7417a110c3a5aa5d070934c01030757bcf0c338eab5e651af +FROM redhat/ubi8-init:8.9-3@sha256:a7db519a1068bee207b821e9ab6b3776599e80008355fa93202e3a2ff768c577 ENV NGINX_VERSION 1.24.0 diff --git a/tests/linux/Dockerfile-ubuntu b/tests/linux/Dockerfile-ubuntu index 1e6e37621..13b590e49 100644 --- a/tests/linux/Dockerfile-ubuntu +++ b/tests/linux/Dockerfile-ubuntu @@ -1,4 +1,4 @@ -FROM ubuntu:22.04@sha256:8eab65df33a6de2844c9aefd19efe8ddb87b7df5e9185a4ab73af936225685bb +FROM ubuntu:22.04@sha256:6042500cf4b44023ea1894effe7890666b0c5c7871ed83a97c36c76ae560bb9b ENV container docker ENV LC_ALL C diff --git a/tests/ui/requirements.txt b/tests/ui/requirements.txt index a77569db7..5c2079852 100644 --- a/tests/ui/requirements.txt +++ b/tests/ui/requirements.txt @@ -153,9 +153,9 @@ sortedcontainers==2.4.0 \ --hash=sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88 \ --hash=sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0 # via trio -trio==0.23.2 \ - --hash=sha256:5a0b566fa5d50cf231cfd6b08f3b03aa4179ff004b8f3144059587039e2b26d3 \ - --hash=sha256:da1d35b9a2b17eb32cae2e763b16551f9aa6703634735024e32f325c9285069e +trio==0.24.0 \ + --hash=sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c \ + --hash=sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d # via # selenium # trio-websocket