AgeCommit message (Collapse)AuthorLines
Check settings below scan-path miss the scanBryce Kwon-3/+37
Check the manual's contents against its sectionsBryce Kwon-1/+12
Read any module-link path in the sample as one keyBryce Kwon-4/+3
The sample's example passed only because its path holds a slash, which the pattern for plain keys leaves out. A path without one was read as a key of its own and reported as undocumented, and a mimetype extension holding a character outside the pattern would have been dropped.
Describe every check in the docs test headerBryce Kwon-5/+5
Check the reference config changes nothingBryce Kwon-0/+21
Check the manual against the keys cgit acceptsBryce Kwon-0/+35
Drop the locale the test library already setsBryce Kwon-2/+2
test-lib exports LC_ALL=C for every test, so the two sorted checks said it again for nothing.
Cut the nginx config down to a generic drop-inBryce Kwon-16/+2
The old file was a complete nginx.conf with TLS, compression, catch-all hosts and security headers, and it had to be taken apart before it ran beside a distribution's own nginx.conf. A server block included from the http block leaves the user, the MIME types and the logs to the distribution. Its header gives one default path per thing, adjusted where a system differs, which leaves packagers a plain base to adapt rather than a table for each distribution. HTTPS and git-http-backend are commented examples, so the file serves plain HTTP as shipped. The backend takes only the three smart HTTP paths at cgit's own repository urls, so every page still reaches cgit. git refuses a repository another user owns, which failed every clone until safe.directory was set for the backend, and a 3 MB push got 413 until the location lifted nginx's body limit. The split empties SCRIPT_NAME because a second SCRIPT_NAME after the include reaches fcgiwrap as well, and cgit reads the first one, which put every link under the request path. cgit sends nosniff and a locked policy on raw output itself, so the configs no longer carry one. The t0004 check that all three agree goes here, with the first of them to drop it.
Skip the shared fixtures where nothing reads themBryce Kwon-0/+1
t0004 reads only the documents, and t0005 builds its own repository and configs, so each run of either built five repositories for none.
Move scan-path below the settings it inheritsBryce Kwon-3/+14
The quick start says to uncomment scan-path, and in its old place a scanned repository missed every setting below it, among them the filters, the snapshots and the enable flags.
Test the hardening passBryce Kwon-1/+2
Clean up the whole treeBryce Kwon-12/+6
Refresh the server configs and drop unsafe-inlineBryce Kwon-2/+16
style-src allowed inline styles only for the diffstat bars, which take their width from colspan instead. t0004 now checks that the three configs pin the same policy.
Trim the comments and dead code across the treeBryce Kwon-3/+1
Add a consistency test for the config documentsBryce Kwon-0/+54