From 534ebf6615beaea9b8627b927718c8f5c20c3dc2 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sun, 1 Nov 2020 18:56:15 +1300 Subject: [PATCH] Fix encode_base64 fixer Minetest's encode_base64() doesn't add padding. --- core.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.lua b/core.lua index c0dbf4f..03c284c 100644 --- a/core.lua +++ b/core.lua @@ -53,7 +53,7 @@ if token then local auth = minetest.encode_base64(raw) headers = { -- minetest.encode_base64() doesn't add padding - 'Authorization: Basic ' .. auth .. ('='):rep(4 - #auth % 4), + 'Authorization: Basic ' .. auth .. ('='):rep((4 - #auth) % 4), 'Content-Type: application/json', 'X-Force-OK: true' }