-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into refactor/ai-analytics
- Loading branch information
Showing
84 changed files
with
1,147 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 50 additions & 11 deletions
61
build/openresty/patches/ngx_lua-0.10.26_03-regex-memory-corruption.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,77 @@ | ||
diff --git a/bundle/ngx_lua-0.10.26/src/ngx_http_lua_regex.c b/bundle/ngx_lua-0.10.26/src/ngx_http_lua_regex.c | ||
index 1b52fa2..30c1650 100644 | ||
index 1b52fa2..646b483 100644 | ||
--- a/bundle/ngx_lua-0.10.26/src/ngx_http_lua_regex.c | ||
+++ b/bundle/ngx_lua-0.10.26/src/ngx_http_lua_regex.c | ||
@@ -688,11 +688,11 @@ ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, | ||
@@ -591,7 +591,11 @@ ngx_http_lua_ffi_compile_regex(const unsigned char *pat, size_t pat_len, | ||
re_comp.captures = 0; | ||
|
||
} else { | ||
+#if (NGX_PCRE2) | ||
+ ovecsize = (re_comp.captures + 1) * 2; | ||
+#else | ||
ovecsize = (re_comp.captures + 1) * 3; | ||
+#endif | ||
} | ||
|
||
dd("allocating cap with size: %d", (int) ovecsize); | ||
@@ -684,21 +688,21 @@ ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, | ||
{ | ||
int rc, exec_opts = 0; | ||
size_t *ov; | ||
- ngx_uint_t ovecsize, n, i; | ||
+ ngx_uint_t ovecpair, n, i; | ||
ngx_pool_t *old_pool; | ||
|
||
if (flags & NGX_LUA_RE_MODE_DFA) { | ||
- ovecsize = 2; | ||
+ ovecsize = 1; | ||
+ ovecpair = 1; | ||
re->ncaptures = 0; | ||
|
||
} else { | ||
- ovecsize = (re->ncaptures + 1) * 3; | ||
+ ovecsize = re->ncaptures + 1; | ||
+ ovecpair = re->ncaptures + 1; | ||
} | ||
|
||
old_pool = ngx_http_lua_pcre_malloc_init(NULL); | ||
@@ -710,7 +710,7 @@ ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, | ||
|
||
if (ngx_regex_match_data == NULL | ||
- || ovecsize > ngx_regex_match_data_size) | ||
+ || ovecpair > ngx_regex_match_data_size) | ||
{ | ||
/* | ||
* Allocate a match data if not yet allocated or smaller than | ||
@@ -709,8 +713,8 @@ ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, | ||
pcre2_match_data_free(ngx_regex_match_data); | ||
} | ||
|
||
ngx_regex_match_data_size = ovecsize; | ||
- ngx_regex_match_data_size = ovecsize; | ||
- ngx_regex_match_data = pcre2_match_data_create(ovecsize / 3, NULL); | ||
+ ngx_regex_match_data = pcre2_match_data_create(ovecsize, NULL); | ||
+ ngx_regex_match_data_size = ovecpair; | ||
+ ngx_regex_match_data = pcre2_match_data_create(ovecpair, NULL); | ||
|
||
if (ngx_regex_match_data == NULL) { | ||
rc = PCRE2_ERROR_NOMEMORY; | ||
@@ -756,8 +756,8 @@ ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, | ||
"n %ui, ovecsize %ui", flags, exec_opts, rc, n, ovecsize); | ||
@@ -741,7 +745,7 @@ ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, | ||
#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); | ||
+ "rc %d, ovecpair %ui", flags, exec_opts, rc, ovecpair); | ||
#endif | ||
|
||
goto failed; | ||
@@ -753,11 +757,11 @@ ngx_http_lua_ffi_exec_regex(ngx_http_lua_regex_t *re, int flags, | ||
#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); | ||
+ "n %ui, ovecpair %ui", flags, exec_opts, rc, n, ovecpair); | ||
#endif | ||
|
||
- if (!(flags & NGX_LUA_RE_MODE_DFA) && n > ovecsize / 3) { | ||
- n = ovecsize / 3; | ||
+ if (n > ovecsize) { | ||
+ n = ovecsize; | ||
+ if (n > ovecpair) { | ||
+ n = ovecpair; | ||
} | ||
|
||
for (i = 0; i < n; i++) { |
63 changes: 51 additions & 12 deletions
63
build/openresty/patches/ngx_stream_lua-0.0.14_03-regex-memory-corruption.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
message: | | ||
Addded support for EdDSA algorithms in JWT plugin | ||
type: feature | ||
scope: Plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
message: | | ||
Addded support for ES512, PS256, PS384, PS512 algorithms in JWT plugin | ||
type: feature | ||
scope: Plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
message: "**DNS Client**: Ignore a non-positive values on resolv.conf for options timeout, and use a default value of 2 seconds instead." | ||
type: bugfix | ||
scope: Core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
message: | | ||
Fix an issue where an external plugin (Go, Javascript, or Python) would fail to | ||
apply a change to the plugin config via the Admin API. | ||
type: bugfix | ||
scope: Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
message: "**Jwt**: fix an issue where the plugin would fail when using invalid public keys for ES384 and ES512 algorithms." | ||
type: bugfix | ||
scope: Plugin |
5 changes: 5 additions & 0 deletions
5
changelog/unreleased/kong/fix-snis-tls-passthrough-in-trad-compat.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
message: | | ||
Fixed an issue where SNI-based routing does not work | ||
using tls_passthrough and the traditional_compatible router flavor | ||
type: bugfix | ||
scope: Core |
3 changes: 3 additions & 0 deletions
3
changelog/unreleased/kong/plugin-schema-deprecation-record.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
message: "**Schema**: Added a deprecation field attribute to identify deprecated fields" | ||
type: feature | ||
scope: Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.