AgeCommit message (Collapse)AuthorLines
End a session when its account's hash changesBryce Kwon-4/+20
A session stayed good for its whole week after the password changed or the account went away, which is when ending it matters most.
Load auth libraries only when a request needs oneBryce Kwon-0/+13
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.
Spend a missing account's login on a real hashBryce Kwon-36/+68
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.
Turn down passwords past 256 bytes uncheckedBryce Kwon-0/+22
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.
Read the auth cookie in linear timeBryce Kwon-0/+10
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.
Offer avatars at twice the size to dense screensBryce Kwon-0/+1
The 13 pixel icon came out blurred on the high density screens most phones and laptops have.
Hash avatar addresses with SHA-256Bryce Kwon-3/+5
Gravatar's documentation now describes SHA-256 hashes on gravatar.com alone, and Libravatar has long accepted them beside MD5.
Mark avatar icons as decorativeBryce Kwon-3/+1
A screen reader announced the service's name before every author.
Unwrap an avatar address in linear timeBryce Kwon-0/+7
An author email of 16,000 "<" took three quarters of a second per log row, and one of 64,000 took twelve seconds.
Draw no avatar when luaossl is missingBryce Kwon-2/+11
The require at the top raised as cgit loaded the filter, so every page that lists an author stopped at its first author cell with an error.
Give readme headings anchors like GitHub'sBryce Kwon-8/+21
A readme's links to its own sections, as in a table of contents, had nothing on the page to land on.
Keep underscores inside words out of emphasisBryce Kwon-0/+6
Let character references through to the browserBryce Kwon-0/+9
Decoding them here instead would mean carrying every named reference HTML defines, while the browser already knows them all.
Honour backslash escapes in readmesBryce Kwon-0/+9
Link the urls and addresses in angle bracketsBryce Kwon-0/+8
Keep a wrapped list item in its listBryce Kwon-0/+9
The item's second line became a paragraph of its own and the items after it a new list, so an ordered list started counting again.
Let a table cut a paragraph shortBryce Kwon-0/+3
A table written right under a line of text came out as more of the paragraph, pipes and all.
Run a paragraph's lines together like GitHubBryce Kwon-3/+10
GitHub shows a single newline in a markdown file as a space, and roff fills the lines of a man page the same way, so text wrapped in the source came out ragged on the about page.
Leave images and badges out of rendered readmesBryce Kwon-6/+7
A relative image loaded from below the about page, which answers 404 now, and a remote one had every visitor's browser call a third party. A badge also came out as a link to its own image, wrapped in stray brackets.
Lead a readme's relative links into the treeBryce Kwon-3/+44
A browser resolved them against the about page, where nothing lives now that the page answers 404 below itself. They resolve the way GitHub resolves a readme's links instead, from the readme's directory and on the branch it was read from.
Trim readme lines in linear timeBryce Kwon-0/+10
The heading pattern backtracked over a run of spaces in cubic time and the cell trim in quadratic time, so one crafted line in a readme could hold a request for half an hour, well inside the size cap. The heading rule now also keeps a sharp that ends a word, as in "# C#".
Trim avatar addresses in linear timeBryce Kwon-0/+6
The trim pattern backtracked over a run of spaces inside an address, which a commit can carry, and a log page runs the filter for every row. Forty thousand spaces took two seconds per row.
Refuse every repository when auth-file loses reposBryce Kwon-0/+13
A repos file the filter could not open read as listing nothing, so a permission slip or a mistyped path made every protected repository public. A line naming a repository with no groups was skipped the same way, where auth-inline's empty list denies everyone.
Align with spaces instead of tabsBryce Kwon-6/+6
Gate scanned filters with `trust-scan-filters`Bryce Kwon-1/+0
Add the link-trailers extensionBryce Kwon-0/+66
Clean up the whole treeBryce Kwon-166/+83
Trim the comments and dead code across the treeBryce Kwon-10/+3
Add a test suite for the shipped extensionsBryce Kwon-0/+1213