summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2018-10-24 22:01:09 +0200
committerHugo Hörnquist <hugo@hornquist.se>2018-10-24 22:01:09 +0200
commit1def8b70683df9dd195a4ad3c02aa27c3c6b3e29 (patch)
treea99bf9199096fde8fe3f4f30af19bddcfcd3cf95
parentInitial commit. (diff)
downloadcgit-filters-1def8b70683df9dd195a4ad3c02aa27c3c6b3e29.tar.gz
cgit-filters-1def8b70683df9dd195a4ad3c02aa27c3c6b3e29.tar.xz
Add better debug info.
-rw-r--r--hugo-authentication.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/hugo-authentication.lua b/hugo-authentication.lua
index 658e9d3..6f99df5 100644
--- a/hugo-authentication.lua
+++ b/hugo-authentication.lua
@@ -56,6 +56,8 @@ function printenv(arg)
-- print "!!!"
-- html ("!!!")
-- print ("<h3>body</h3><table border=1 style='border-collapse: collapse;'><tr><th>Key</th><th>Value</th></tr>")
+ io.stderr:write(os.time(os.date("!*t")))
+ io.stderr:write("\n")
io.stderr:write(arg);
for _, attr in pairs(keys) do
local l = os.getenv(attr)
@@ -82,6 +84,7 @@ end
-- TODO invalid login also kinda breaks the page... Not found should return the
-- user to the login page with an error messsage displaed.
function authenticate_post()
+ printenv("Authenticate Post\n=================\n");
local password = users[post["username"]]
local redirect = validate_value("redirect", post["redirect"])