util.paseto: Fix to decode footer before comparison
authorMatthew Wild <mwild1@gmail.com>
Mon, 11 Jul 2022 13:51:39 +0100
changeset 12713 b3f7c77c1f08
parent 12712 9953ac7b0c15
child 12714 2dbb3335cd34
util.paseto: Fix to decode footer before comparison
util/paseto.lua
--- a/util/paseto.lua	Mon Jul 11 13:49:47 2022 +0100
+++ b/util/paseto.lua	Mon Jul 11 13:51:39 2022 +0100
@@ -69,6 +69,7 @@
 	if not h then
 		return nil, "invalid-token-format";
 	end
+	f = f and unb64url(f) or nil;
 	if expected_f then
 		if not f or not secure_equals(expected_f, f) then
 			return nil, "invalid-footer";