-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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(core): ensure ngx.ctx.host_port is a number (and not a string) #12806
Conversation
fe22744
to
0ff1b14
Compare
Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
0ff1b14
to
5bacbdc
Compare
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/2.8.x
git worktree add -d .worktree/backport-12806-to-release/2.8.x origin/release/2.8.x
cd .worktree/backport-12806-to-release/2.8.x
git switch --create backport-12806-to-release/2.8.x
git cherry-pick -x 72632106b61949de69ae4dd7b59deedea4ed7626 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.3.x
git worktree add -d .worktree/backport-12806-to-release/3.3.x origin/release/3.3.x
cd .worktree/backport-12806-to-release/3.3.x
git switch --create backport-12806-to-release/3.3.x
git cherry-pick -x 72632106b61949de69ae4dd7b59deedea4ed7626 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.4.x
git worktree add -d .worktree/backport-12806-to-release/3.4.x origin/release/3.4.x
cd .worktree/backport-12806-to-release/3.4.x
git switch --create backport-12806-to-release/3.4.x
git cherry-pick -x 72632106b61949de69ae4dd7b59deedea4ed7626 |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.5.x
git worktree add -d .worktree/backport-12806-to-release/3.5.x origin/release/3.5.x
cd .worktree/backport-12806-to-release/3.5.x
git switch --create backport-12806-to-release/3.5.x
git cherry-pick -x 72632106b61949de69ae4dd7b59deedea4ed7626 |
Successfully created cherry-pick PR for |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release/3.6.x
git worktree add -d .worktree/backport-12806-to-release/3.6.x origin/release/3.6.x
cd .worktree/backport-12806-to-release/3.6.x
git switch --create backport-12806-to-release/3.6.x
git cherry-pick -x 72632106b61949de69ae4dd7b59deedea4ed7626 |
…12806) Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
…12806) Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
…12806) Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
…12806) Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
…12806) Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
…12806) Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
We won't backport this further than 3.4 |
Summary
It turns out that
ngx.ctx.host_port
may be astring
in some cases, which leads to bugs elsewhere where it may be expected to be a number. This addstonumber
call to ensure that it is a number.This bug affects for example
PDK
functionkong.request.get_forwarded_port()
.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
https://konghq.atlassian.net/browse/KAG-4158