| Age | Commit message (Collapse) | Author | Lines |
|
is_safe_redirect looked at the first two characters alone, so it
accepted https://evil.example/ and javascript:x. Neither could be
signed today only because cgit always signs a url that starts with
virtual-root, and nothing tested that. A target now has to start with
a single slash, which needs virtual-root to be a path for logins to
work, as it is by default.
|
|
A repeat's count was keyed on the bare text, so a heading whose text
already ended in that count took the same anchor, as "Twice 1" did
after two of "Twice", and "About 1" after "About". A link to either
then landed on the first. The count now goes on up past any anchor
already handed out, the way GitHub's slugger does.
|
|
The icons came from Gravatar or Libravatar with the page's url as the
Referer, so the service learned which repositories and commits each
visitor looked at.
|
|
Without one a repository has no about tab and its about url redirects
to the summary, so a site that sets only about-filter never sees the
renderer run.
|
|
|
|
Debian, Ubuntu, Fedora and Alpine package luaossl, luaposix and lpeg
for the Lua versions they ship, which leaves LuaRocks for the rest.
Scintillua comes as a release zip whose lexers directory is what the
filter looks for, so its steps say where to put that.
|
|
|
|
The login posts outside any repository, so the log line names the
repository by the page its signed way back leads to.
|
|
Only HTTPS=on counts, the same test cgit makes before it writes an
https link of its own.
|
|
|
|
The way back was signed part way through the form, so while the secret's
directory did not exist, or a library was missing, cgit's error landed
inside the hidden input and the page broke off there with no fields.
|
|
|
|
A list keyed on the name the index shows matched nothing, so the
repository it meant to protect stayed public.
|
|
make install copies every filter into the filters directory with mode
0644, so an edited auth-inline.lua there lost its lists on the next
install, which turned every protected repository public, and until then
showed its password hashes to every local user.
|
|
Scintillua's detect() matches an extension by its case, and the fallback
e227d1f dropped had lowercased it, so MAIN.C and SETUP.PY lost their
colour. The fake lexer now answers only for the suffixes it knows, as
Scintillua does, which is what lets the check see it.
|
|
|
|
|
|
|
|
filter_close already runs highlight under pcall and serves the escaped
text when it fails, so the pcalls around detect, load and lex inside it
only turned a raise into the same fallback a step earlier.
|
|
On Lua 5.3 and later a length worked out with a fraction, such as
1.5 * 24 * 60 * 60, is a float, so the signed expiry came out as
1793609024.0, which validate_value refuses, and every login failed.
Max-Age took the same .0, which makes a browser ignore it.
|
|
|
|
The lookups were never the only difference, since the configuration
and trim's place differ as well. The configuration is now set off by
blank lines, as in the other extensions, instead of a heading.
|
|
cgit passes an empty string, never nil, when a request names no
repository, so the check that the index stays up proved nothing, and
auth-file in fact refuses the index too while its repos file cannot be
read. A session_seconds of 0 signs a session that has expired by the
time it comes back, so it needs no branch of its own in set_cookie.
|
|
set_cookie only ever writes an empty value or a token secure_value
built from url-encoded text, digits and hex, so stripping it changed
nothing.
|
|
Every caller hands the helpers a string, and a value with a line break
is refused by validate_value whether or not CR LF is folded on the way.
|
|
Seven of the twelve fields filter_open stored were never read. Naming
all twelve parameters keeps the order cgit passes them in on record.
|
|
The loop let a valid cookie through with a field appended, a doubled
separator or a zero in front of its expiry. The payload now carries the
expiry as written, so only the spelling secure_value issues verifies.
|
|
The table of extensions and the second lookup served only a Scintillua
with no detect(), which now leaves every file uncoloured but escaped.
The fake detect() names a lexer after the file's suffix, so every test
lexer is reached through it.
|
|
|
|
lpeg's constant, query and numbered captures already do what the token
helpers did, and nothing ever read the tokens of an escape that draws
nothing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Without lpeg both renderers stay nil, and the handler lookup already
falls back to plain text for a format it has no renderer for.
|
|
Everything that can raise already runs inside the parse and emit pcalls,
so the outer one in filter_close could only ever have sent the page a
second time.
|
|
|
|
A table capture of a pattern repeated zero or more times matches every
string, the empty one included, so the inline grammars never return nil.
|
|
Nothing in assets/ or in README's list of hooks reads a fenced block's
data-lang or the manpage class on a man page's wrapper.
|
|
DocBook, pod2man and hand written pages leaked roff onto the page. Font
escapes inside no fill blocks, comments, layout escapes such as \% and
\c, the colours and half line moves around DocBook's links, and the
requests and macro definitions their preambles open with all showed
through. Those now draw nothing, the common named characters and strings
render, .EX and pod2man's .Vb read as code, a .TP tag takes a line of
its own and the alternating font macros switch fonts between their
arguments. Anything rarer still falls back to its text.
|
|
A line of equals signs or dashes under a paragraph now makes a heading
of it, as on GitHub, instead of running into its text, and any other
rule ends the paragraph. Four spaces or a tab start a code block, and an
escaped pipe stays in its table cell. A link opening with two slashes
or backslashes in any mix leads to another site, so it renders as text
like the plain scheme relative one already did.
|
|
cgit takes filter output through a C string sink that stops at the
first NUL, so a readme holding one lost everything after it. Each NUL
now shows as U+FFFD, as a browser would show it.
|
|
A wrong password sent the reader back to the same empty form, which
looked no different from a crash. The redirect now carries a flag the
form reads, the same for an unknown user as for a wrong password, and
the form leaves the flag out of the way back it signs.
|
|
Scintillua's css lexer tags them with names the map had no row for, so
they came out as plain text.
|
|
A lexer may hand back the bytes of one separator, or the CR and LF of a
line ending, in different tokens, so line endings become line feeds
before lexing and the separators are escaped once the tokens are joined.
|