| Age | Commit message (Collapse) | Author | Lines |
|
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 names no repository with an empty string, never nil, 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.
|
|
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.
|
|
luaossl from release 20260910 and luaposix load under Lua 5.5, and cgit
renders the same pages under it as under LuaJIT. Running the suites
there already caught a write to a for loop's control variable, which
5.5 makes read-only.
|
|
|
|
Without the prefix any host under the same domain could set a cgitauth
cookie of its own, signing a visitor in as someone else or out.
|
|
A session stayed good for its whole week after the password changed or
the account went away, which is when ending it matters most.
|
|
Required at the top, a missing luaossl or luaposix failed every request
to the site, public pages included, and each public page paid to load
both.
|
|
The one recipe given, SHA-512 from Debian's mkpasswd, cannot log anyone
in on OpenBSD, whose crypt checks only bcrypt, or on macOS, and
libxcrypt, which most Linux distributions use, recommends yescrypt
instead.
|
|
The fixed SHA-512 stand-in matched only the documented setup, so a site
hashing with yescrypt, other rounds or bcrypt answered for missing and
real names in different times, and on OpenBSD it failed at once.
|
|
SHA-crypt hashes the password in most of its rounds, so the 4 KB that
cgit's POST limit lets through cost about fifteen ordinary logins per
anonymous attempt.
|
|
Splitting the header with patterns that backtrack over spaces cost a
quarter of a second per request at the 8 KB line most web servers
allow, and a second at 16 KB, without any login. auth-file's trim had
the same shape and now reads the cookie as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|