AgeCommit message (Collapse)AuthorLines
Name the auth cookie __Host- where it can beBryce Kwon-30/+71
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.
End a session when its account's hash changesBryce Kwon-62/+108
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-18/+63
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.
Say which hash kinds each system's crypt checksBryce Kwon-4/+27
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.
Spend a missing account's login on a real hashBryce Kwon-57/+99
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-2/+32
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-14/+52
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-14/+23
The 13 pixel icon came out blurred on the high density screens most phones and laptops have.
Hash avatar addresses with SHA-256Bryce Kwon-13/+16
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-11/+7
A screen reader announced the service's name before every author.
Unwrap an avatar address in linear timeBryce Kwon-6/+19
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-15/+41
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.
Drop the table loop's dead blank-line testBryce Kwon-1/+1
A line holding a pipe is never blank.
Compare the cached page with the uncached one wholeBryce Kwon-5/+1
The footer lost the time it was generated at in 2018, and both runs come from the same binary, so the two pages have nothing to differ in.
Give an empty repository's clone table its hooksBryce Kwon-10/+21
It was a bare table.list with no name, section or label, the one listing that broke what the README promises a theme.
Check every markup hook the README namesBryce Kwon-8/+84
The README promised that t0005 checked them all, while fourteen went unchecked, and three of its claims were too broad. A date shown in full carries no age hooks, line anchors follow enable-tree-linenumbers and cgit.css also styles html.cgit-standalone.
Complete the README's pages and query parametersBryce Kwon-3/+14
List everything make install puts in placeBryce Kwon-3/+4
Add blame to the source filter and line number docsBryce Kwon-15/+23
Name every trailer link-trailers.lua linksBryce Kwon-6/+6
Say that js may be given more than onceBryce Kwon-3/+24
Fix the sample cgitrc's defaults and value syntaxBryce Kwon-13/+16
Add html serving to the scanned cgitrc trust listBryce Kwon-3/+4
1456483 gated the key and named it under trust-scan-config, but this section kept the list from before.
Describe root-readme as the site's about pageBryce Kwon-18/+36
Say which filters get the repository variablesBryce Kwon-1/+15
Leave readme out of what scan-path fixesBryce Kwon-3/+15
Name the log link that enable-index-links addsBryce Kwon-3/+12
The manual has named the commit page since it was written in 2008, a year after the index started linking the log instead.
Give readme headings anchors like GitHub'sBryce Kwon-10/+58
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-4/+15
Let character references through to the browserBryce Kwon-2/+26
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-1/+12
Link the urls and addresses in angle bracketsBryce Kwon-1/+26
Keep a wrapped list item in its listBryce Kwon-8/+29
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-2/+18
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-13/+43
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-27/+35
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-11/+114
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-2/+36
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#".
Hand the about filter the tree url its links needBryce Kwon-43/+122
With nothing below the about page, a readme's relative links have to be written against the tree, and only cgit knows how this site spells the url of a tree page and which ref the readme was read from. Both reach the filter already escaped for a url, built by the same writer as cgit's own links.
Answer 404 for any path below the about pageBryce Kwon-135/+44
The about page served every file beside the readme as a page of its own, through the about filter, and answered 200 for directories and missing files alike. Images it passed through came from the root of the default branch whatever the readme's own directory and ref. A readme on disk exposed its whole directory this way.
Keep the age hook's directory group writableBryce Kwon-2/+31
The hook forced a 022 umask, so in a repository shared with a group the first pusher owned info/web and every other member's push failed to write the age file there.
Keep the cache hook's rm errors from pushersBryce Kwon-4/+38
Only the exit status was hidden, so a pusher without write access to the cache root saw a permission error per cached page, against what the hook's own comment promised.
Trim avatar addresses in linear timeBryce Kwon-2/+36
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-11/+27
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.
Put then on its own line in the release buildBryce Kwon-3/+6
Indent continuation lines with one tabBryce Kwon-7/+7
Share the max-blob-size check and its refusalBryce Kwon-27/+48
Five copies of the test and four of the error page had to agree by hand. The new check pins the four refusals, which no test covered.
Mark the parameters callbacks leave unusedBryce Kwon-6/+6
With these and the two changes before them, cgit builds under git's DEVELOPER=1 settings, which also annotate their own callbacks this way.
Pass callbacks to git by addressBryce Kwon-8/+20
ISO C has no conversion between a function pointer and void *, so the callbacks handed through git's data pointers and the write found by dlsym stopped the pedantic half of a DEVELOPER=1 build.
Keep string literals behind const pointersBryce Kwon-59/+53
Git's DEVELOPER=1 build turns on -Wwrite-strings as an error, and the literals stored through plain char pointers failed cgit's own objects there. The exec filter's argv takes the cast execvp needs once, the way git's run-command does.