AgeCommit message (Collapse)AuthorLines
Read the description file without repo.descBryce Kwon-14/+1
Only a scanned repository fell back to its description file, so one listed in cgitrc without repo.desc showed "[no description]" however its file read. repo.desc may follow repo.path, so the file is read where a page shows the description, which also spares every other request the reads.
Report a word where cgitrc expects a numberBryce Kwon-1/+7
atoi reads "yes" or "true" as 0, so repo.hide=yes, or cgit.hide true in a scanned repository's git config, silently did nothing. The values keep that meaning, since honouring them now would hide repositories on upgrade, but each one is logged with its file and line.
List scanned repositories in path orderBryce Kwon-4/+13
readdir hands entries back in whatever order the filesystem keeps them, so proj111 could come before proj105 and a section could start twice. section-sort is off by default to keep the order written in cgitrc, and a scan has none to keep.
Log an owner lookup only when it failsBryce Kwon-2/+6
getpwuid leaves errno alone for a uid with no passwd entry, so a scan logged "Unable to read the owner" with "Success" as the reason for each repository such a uid owns.
Drop cgit_read_first_line's unread size outputBryce Kwon-2/+1
Leave the scan's summary to its headerBryce Kwon-7/+3
Drop the scan's redundant stats and one-pass loopBryce Kwon-12/+11
The description and cgitrc readers already return when the file will not open, a repository's description is never NULL before it is read, and the owner lookup never went round a second time.
Strip a scanned path's suffixes with git's helpersBryce Kwon-10/+7
Let scan_tree choose the project list itselfBryce Kwon-2/+5
Three callers wrote out the same choice, and the header already says a scan visits only the listed paths when a project list is set.
Mark the parameters callbacks leave unusedBryce Kwon-1/+1
With these and the two changes before them, cgit builds under git's DEVELOPER=1 settings, which also annotate their own callbacks this way.
Name the right file and error in the scan logsBryce Kwon-2/+3
A failed stat logged the directory rather than the entry inside it, and a project list that failed to read printed strerror of the flag ferror returns, which names an unrelated error.
Gate a readme ending in a colon like a disk pathBryce Kwon-3/+3
trust-scan-config passed any readme holding a colon as a tracked file, while the parser takes one only when a path follows the colon, so a scanned repository could still name a file on disk outside itself.
Gate html serving behind trust-scan-configBryce Kwon-11/+15
enable-html-serving makes the plain page send a repository file as text/html on the site's own origin, with no nosniff and no policy, so a scanned repository could switch it on from its git config or cgitrc without trust-scan-config and run script against every visitor. The warning for a key read from git config also named a null repository, because repo->path was set only after that file had been read.
Align with spaces instead of tabsBryce Kwon-7/+7
Harden the request path, scan and error recoveryBryce Kwon-23/+94
Gate scanned filters with trust-scan-filtersBryce Kwon-2/+14
Clean up the whole treeBryce Kwon-20/+10
Trim the comments and dead code across the treeBryce Kwon-5/+6
Log scan lock failures that are not contentionBryce Kwon-7/+7
Remove the repository homepage featureBryce Kwon-2/+0
Restyle the sources and fix the audit's findingsBryce Kwon-118/+136
Settle the names, types and layout of the sourcesBryce Kwon-10/+11
Hide git's default repository descriptionBryce Kwon-0/+10
Strip the trailing slash before matching /.gitBryce Kwon-2/+5
Point the fork's links and credits at itselfBryce Kwon-1/+1
AUTHORS now records the upstream developers as the project's history rather than as maintainers of the fork.
Avoid an out-of-bounds read on short scan pathsBryce Kwon-1/+1
A relative path shorter than five bytes made the /.git suffix test read before the buffer.
Reorganise into source, assets and librariesBryce Kwon-0/+0
Everything the build generates now lands in build/, so a clean is a single remove and the source tree stays free of build output.