Skip to content

Commit

Permalink
Fix bug with hash of empty query string
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-tech committed Oct 7, 2020
1 parent 6da264f commit 77f3cf8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package = "kong-upstream-jwt-extended"
version = "2.1.0-1"
version = "2.1.1-1"
source = {
url = "git+https://github.com/andrey-tech/kong-upstream-jwt-extended.git"
}
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion src/access.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ end
local function build_query_hash()
local req_query = kong.request.get_raw_query()
local query_digest = ""
if req_query then
if req_query and req_query ~= "" then
local sha256 = resty_sha256:new()
sha256:update(req_query)
query_digest = sha256:final()
Expand Down
2 changes: 1 addition & 1 deletion src/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ end

-- Changed © andrey-tech 2020
KongUpstreamJWTExtendedHandler.PRIORITY = 999 -- This plugin needs to run after auth plugins for `kong.client.get_consumer(), kong.client.get_credential()`
KongUpstreamJWTExtendedHandler.VERSION = "2.1.0"
KongUpstreamJWTExtendedHandler.VERSION = "2.1.1"

-- Changed © andrey-tech 2020
return KongUpstreamJWTExtendedHandler

0 comments on commit 77f3cf8

Please sign in to comment.