AgeCommit message (Collapse)AuthorLines
Claim and test Lua 5.5 for every extensionBryce Kwon-2/+2
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.
Offer avatars at twice the size to dense screensBryce Kwon-7/+11
The 13 pixel icon came out blurred on the high density screens most phones and laptops have.
Hash avatar addresses with SHA-256Bryce Kwon-2/+3
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-4/+3
A screen reader announced the service's name before every author.
Unwrap an avatar address in linear timeBryce Kwon-3/+6
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-3/+4
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.
Trim avatar addresses in linear timeBryce Kwon-1/+15
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.
Trim the comments and dead code across the treeBryce Kwon-11/+8
Replace `nbsp` spacing with CSSBryce Kwon-2/+2
Lazy load the avatar iconsBryce Kwon-1/+5
Restyle the filter extension headers and markupBryce Kwon-47/+46
Trim the lua headers and fix the Scintillua notesBryce Kwon-6/+0
Reorganize the tree into vendor/ and custom/Bryce Kwon-0/+0
Guard the avatar filters and expose settingsBryce Kwon-12/+90
Reorganize into source, assets and librariesBryce Kwon-0/+0
The C sources move to source/, the served files to assets/, the bundled Git submodule to libraries/git and the filter scripts to extensions/. Everything the build generates now lands in build/, so a clean is a single remove and the tree stays clean.
filters: migrate from luacrypto to luaosslJason A. Donenfeld-4/+13
luaossl has no upstream anymore and doesn't support OpenSSL 1.1, whereas luaossl is quite active. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
filter: fix libravatar email-filter https issueChristian Hesse-1/+2
Serving cgit via https and getting avatar via http gives error messages about untrusted content. This decides whether or not to use https link by looking at the environment variable HTTPS, which is set in CGI.
filter: add libravatar email-filter lua scriptChristian Hesse-3/+3
email-gravatar: fix html syntax issuesChristian Hesse-1/+1
an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified
email-gravatar: do not scale icons upJason A. Donenfeld-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
filter: allow returning exit code from filterJason A. Donenfeld-0/+1
Filters can now indicate a status back to cgit by means of the exit code for exec, or the return value from close for Lua. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
email-gravatar: fix html syntax issuesChristian Hesse-1/+1
* make ampersand a html entity * add required alt attribute * add required img end tag
email-gravatar.lua: fix for lua 5.2Christian Hesse-1/+1
filter: add page source to email filterJason A. Donenfeld-1/+1
Since the email filter is called from lots of places, the script might benefit from knowing the origin. That way it can modify its contents and/or size depending. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
filter: add gravatar scriptsJason A. Donenfeld-0/+25
The lua one is hugely faster than the python one, but both are included for comparison. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>