From a431326e8fab8153905fbde036dd3c9fb4cc8eaa Mon Sep 17 00:00:00 2001 From: Jason A. Donenfeld Date: Thu, 16 Jan 2014 23:21:54 +0100 Subject: auth: have cgit calculate login address This way we're sure to use virtual root, or any other strangeness encountered. Signed-off-by: Jason A. Donenfeld --- filters/simple-authentication.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'filters') diff --git a/filters/simple-authentication.lua b/filters/simple-authentication.lua index 5c4f074..9291302 100644 --- a/filters/simple-authentication.lua +++ b/filters/simple-authentication.lua @@ -122,12 +122,7 @@ function filter_open(...) cgit["repo"] = select(9, ...) cgit["page"] = select(10, ...) cgit["url"] = select(11, ...) - - cgit["login"] = "" - for _ in cgit["url"]:gfind("/") do - cgit["login"] = cgit["login"] .. "../" - end - cgit["login"] = cgit["login"] .. "?p=login" + cgit["login"] = select(12, ...) end -- cgit v1.2.3-70-g09d2