mod_http_oauth2: Fix missing base64 part of base64url (Thanks KeyCloak)
Obligatory bugs in untested code.
--- a/mod_http_oauth2/mod_http_oauth2.lua Sun Apr 30 16:41:30 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua Sun Apr 30 16:42:04 2023 +0200
@@ -18,7 +18,7 @@
local st = require "util.stanza";
local function b64url(s)
- return (s:gsub("[+/=]", { ["+"] = "-", ["/"] = "_", ["="] = "" }))
+ return (base64.encode(s):gsub("[+/=]", { ["+"] = "-", ["/"] = "_", ["="] = "" }))
end
local function read_file(base_path, fn, required)