Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(var): patch set_uri_args #59

Merged
merged 1 commit into from
Jan 27, 2023
Merged

fix(var): patch set_uri_args #59

merged 1 commit into from
Jan 27, 2023

Conversation

samugi
Copy link
Member

@samugi samugi commented Jan 26, 2023

set_uri_args modifies the $args variable without accessing our patched metatable. For it to work properly we can invalidate our index table for the value "args" whenever the function set_uri_args is called. This way the next access to ngx.var.args will miss the index and fetch the real value of $args.

fix for Kong/kong#10080

KAG-410

@CLAassistant
Copy link

CLAassistant commented Jan 26, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@samugi samugi marked this pull request as draft January 26, 2023 07:47
@samugi samugi force-pushed the fix/patch_set_uri_args branch 4 times, most recently from cdf8a56 to ae8ce72 Compare January 26, 2023 08:41
@samugi samugi force-pushed the fix/patch_set_uri_args branch from ae8ce72 to dd4d882 Compare January 26, 2023 16:23
set_uri_args modifies the $args variable without accessing our patched
metatable. For it to work we need to invalidate our index whenever the
function is called.

fix for Kong/kong#10080
@samugi samugi force-pushed the fix/patch_set_uri_args branch from dd4d882 to b36c9bb Compare January 26, 2023 16:28
@samugi samugi marked this pull request as ready for review January 26, 2023 16:32
Copy link
Member

@bungle bungle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@samugi samugi merged commit bd5915f into master Jan 27, 2023
@samugi samugi deleted the fix/patch_set_uri_args branch January 27, 2023 08:28
tzssangglass added a commit that referenced this pull request Dec 11, 2024
patch the `req.set_header` function to invalidate the relevant `variable_index` entry for the modified header.
Specifically, after normalizing the header name, the corresponding `variable_index` entry is set to `nil`.
This ensures that subsequent accesses to `ngx.var.http_*` variables will bypass the cached index and fetch
the updated header value.

same fix way as: #59

Fix: [KAG-5963](https://konghq.atlassian.net/browse/KAG-5963)
Signed-off-by: tzssangglass <tzssangglass@gmail.com>
fffonion pushed a commit that referenced this pull request Dec 18, 2024
patch the `req.set_header` function to invalidate the relevant `variable_index` entry for the modified header.
Specifically, after normalizing the header name, the corresponding `variable_index` entry is set to `nil`.
This ensures that subsequent accesses to `ngx.var.http_*` variables will bypass the cached index and fetch
the updated header value.

same fix way as: #59

Fix: KAG-5963
Fix: FTI-6406

Signed-off-by: tzssangglass <tzssangglass@gmail.com>
tzssangglass added a commit that referenced this pull request Dec 24, 2024
patch the `req.set_header` function to invalidate the relevant `variable_index` entry for the modified header.
Specifically, after normalizing the header name, the corresponding `variable_index` entry is set to `nil`.
This ensures that subsequent accesses to `ngx.var.http_*` variables will bypass the cached index and fetch
the updated header value.

same fix way as: #59

Fix: KAG-5963
Fix: FTI-6406

Signed-off-by: tzssangglass <tzssangglass@gmail.com>
tzssangglass added a commit that referenced this pull request Dec 24, 2024
patch the req.set_header function to invalidate the relevant variable_index entry for the modified header. Specifically, after normalizing the header name, the corresponding variable_index entry is set to nil. This ensures that subsequent accesses to ngx.var.http_* variables will bypass the cached index and fetch the updated header value.

same fix way as: #59

Fix: KAG-5963
Fix: FTI-6406
Signed-off-by: tzssangglass <tzssangglass@gmail.com>
tzssangglass added a commit that referenced this pull request Dec 25, 2024
patch the req.set_header function to invalidate the relevant variable_index entry for the modified header. Specifically, after normalizing the header name, the corresponding variable_index entry is set to nil. This ensures that subsequent accesses to ngx.var.http_* variables will bypass the cached index and fetch the updated header value.

same fix way as: #59

Fix: KAG-5963
Fix: FTI-6406
Signed-off-by: tzssangglass <tzssangglass@gmail.com>
fffonion pushed a commit that referenced this pull request Dec 25, 2024
patch the req.set_header function to invalidate the relevant variable_index entry for the modified header. Specifically, after normalizing the header name, the corresponding variable_index entry is set to nil. This ensures that subsequent accesses to ngx.var.http_* variables will bypass the cached index and fetch the updated header value.

same fix way as: #59

Fix: KAG-5963
Fix: FTI-6406

Signed-off-by: tzssangglass <tzssangglass@gmail.com>
Co-authored-by: Samuele <samuele@konghq.com>
tzssangglass added a commit that referenced this pull request Dec 26, 2024
patch the `req.set_header` function to invalidate the relevant `variable_index` entry for the modified header.
Specifically, after normalizing the header name, the corresponding `variable_index` entry is set to `nil`.
This ensures that subsequent accesses to `ngx.var.http_*` variables will bypass the cached index and fetch
the updated header value.

same fix way as: #59

Fix: KAG-5963
Fix: FTI-6406

Signed-off-by: tzssangglass <tzssangglass@gmail.com>
ms2008 pushed a commit that referenced this pull request Jan 16, 2025
* fix(var): patch set_header (#97)

patch the `req.set_header` function to invalidate the relevant `variable_index` entry for the modified header.
Specifically, after normalizing the header name, the corresponding `variable_index` entry is set to `nil`.
This ensures that subsequent accesses to `ngx.var.http_*` variables will bypass the cached index and fetch
the updated header value.

same fix way as: #59

Fix: KAG-5963
Fix: FTI-6406

Signed-off-by: tzssangglass <tzssangglass@gmail.com>

* update KONG_VERSION in GitHub Actions workflow to release/3.7.x

Signed-off-by: tzssangglass <tzssangglass@gmail.com>

---------

Signed-off-by: tzssangglass <tzssangglass@gmail.com>
tzssangglass added a commit that referenced this pull request Jan 16, 2025
patch the `req.set_header` function to invalidate the relevant `variable_index` entry for the modified header.
Specifically, after normalizing the header name, the corresponding `variable_index` entry is set to `nil`.
This ensures that subsequent accesses to `ngx.var.http_*` variables will bypass the cached index and fetch
the updated header value.

same fix way as: #59

Fix: KAG-5963
Fix: FTI-6406

Signed-off-by: tzssangglass <tzssangglass@gmail.com>
tzssangglass added a commit that referenced this pull request Jan 16, 2025
patch the `req.set_header` function to invalidate the relevant `variable_index` entry for the modified header.
Specifically, after normalizing the header name, the corresponding `variable_index` entry is set to `nil`.
This ensures that subsequent accesses to `ngx.var.http_*` variables will bypass the cached index and fetch
the updated header value.

same fix way as: #59

Fix: KAG-5963
Fix: FTI-6406

Signed-off-by: tzssangglass <tzssangglass@gmail.com>
windmgc pushed a commit that referenced this pull request Jan 17, 2025
patch the `req.set_header` function to invalidate the relevant `variable_index` entry for the modified header.
Specifically, after normalizing the header name, the corresponding `variable_index` entry is set to `nil`.
This ensures that subsequent accesses to `ngx.var.http_*` variables will bypass the cached index and fetch
the updated header value.

same fix way as: #59

Fix: KAG-5963
Fix: FTI-6406

Signed-off-by: tzssangglass <tzssangglass@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants