Skip to content

Commit

Permalink
fix(key-auth): retain order of query arguments when hiding the creden…
Browse files Browse the repository at this point in the history
…tials

Fixes #12758 reported by @battlebyte.

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
  • Loading branch information
bungle committed Sep 4, 2024
1 parent c2459c7 commit e2aa888
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/fix-key-auth-retain-query-order.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: Fixed *key-auth* to retain order of query arguments when hiding the credentials.
type: bugfix
scope: Plugin
3 changes: 1 addition & 2 deletions kong/plugins/key-auth/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ local function do_authentication(conf)
key = v

if conf.hide_credentials then
query[name] = nil
kong.service.request.set_query(query)
kong.service.request.clear_query_arg(name)
kong.service.request.clear_header(name)

if conf.key_in_body then
Expand Down

0 comments on commit e2aa888

Please sign in to comment.