mirror of
https://git.zx2c4.com/cgit
synced 2025-06-27 12:08:55 +02:00
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 <Jason@zx2c4.com>
This commit is contained in:
parent
df00ab1096
commit
a431326e8f
6 changed files with 16 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue