# HG changeset patch # User Kim Alvefur # Date 1682865724 -7200 # Node ID c0a6f39caf476e2a2e0dc956050582672bd4ff1b # Parent 4aedce4fb95d32f6a28b24938ada8b3ec5b3c39d mod_http_oauth2: Fix missing base64 part of base64url (Thanks KeyCloak) Obligatory bugs in untested code. diff -r 4aedce4fb95d -r c0a6f39caf47 mod_http_oauth2/mod_http_oauth2.lua --- 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)