| Age | Commit message (Collapse) | Author | Lines |
|
The plain, snapshot and blob pages sent a name such as café.txt raw in
filename, which a client may read as ISO-8859-1. RFC 6266 has such a
name sent again as filename*, percent-encoded in UTF-8, for a client
that knows the form, with filename first for one that does not. The
extended form carries UTF-8 alone, so a name that is not valid UTF-8
keeps the plain filename by itself.
|
|
The test reads the index and the site about page, both drawn by
ui-repolist.c. Its site had no repositories, so the index it read was
the error page, and a readme printed below the list went unseen. The
shared repositories give it a real index.
|
|
|
|
|
|
Three tests exercised the single path check in about_fn, each through
one kind of readme, and none through a readme read from the head being
browsed.
|
|
|
|
Grouping folders first is tree page behaviour rather than a security
fix, so it joins the tree tests on a repository of its own.
|
|
No test gave a file name invalid UTF-8 or a control byte, which APFS
refuses on disk, so the tree is built through the index.
|
|
An unquoted $cgitbin breaks in a checkout whose path holds a space,
and head -c and head -1 are not POSIX. The status of the disconnected
request is still read right after its pipeline, which assumes the
shell waits for the left side as dash, bash, ksh and busybox ash all
do.
|
|
Nothing in tests/ read robots.txt, so dropping the trailing slashes
again went unnoticed.
|
|
Only a benign query had been redirected, so nothing showed that a
space, a control byte or a byte past ASCII in the query string is
encoded before it reaches the Location header.
|
|
The plain page's header was the only one fed a newline. A snapshot
asked for with h= keeps the name it was requested under, and a blob
fetched by id takes any path, so both put visitor bytes into
Content-Disposition.
|
|
The title claimed every page, but only the log, commit and atom pages
were asked for. The commit now changes a file, since the patch page
leaves out a commit with nothing to show, and its parent is read
before the printf, where a failed rev-parse would have gone unnoticed.
|
|
The allowlist was tested in two places, and the 404 alone did not show
the transport was live behind the auth filter, since a page that does
not exist answers the same. A loose object and HEAD now have to come
through, and the planted alternates file is removed even when the test
fails, where it used to leave rob borrowing foo's objects.
|
|
Both requests went through the shared page cache, and the clone one
only worked because clone pages are never stored, which is what the
cgitrc_copy comment warns of.
|
|
points-at-tree only ever matched its entry in the branch switcher, and
points-at-tag was never looked for. Every branch also shared one date,
so the age and name sorts gave the same rows, and nothing showed the
name setting had applied. The loose refs written by hand need the
files backend.
|
|
The check read the page the previous test had left, and it took any
hex where the commit goes and only two of the eight conversions.
|
|
Only a lowercase javascript url was tried, so a denylist of that one
spelling would have passed. The quote test also read the page the test
before it had left.
|
|
Only %zz%2 had been sent, so nothing showed that markup in the query,
the hidden inputs a form carries, the errors naming a refused value or
the Host header is escaped on its way back.
|
|
For a bare q=% only the status was checked, so a decoder that dropped
the sign passed.
|
|
No test gave a ref name, a commit or tag message, a note or an ident
any markup, and the one hostile file name never reached an attribute.
html_txt leaves quotes alone, so a name holding both a quote and a
bracket is what tells an attribute written as text.
|
|
Nothing showed that every leading slash goes, through url= or
PATH_INFO, and one left behind joins the virtual root into a
scheme-relative link to another host.
|
|
All three shipped server configs hand cgit the path as PATH_INFO,
already decoded, yet every hostile path in the tests went through url=
instead.
|
|
The name also sits in the breadcrumb and the title, so the test passed
with the source filter never run, and the missing marker proved
nothing. dump.sh echoes its arguments ahead of the body it upper-cases,
which shows the name arrived whole as one argument.
|
|
The links have been written through html_attr since b8adfd6, so with
the percent-encoding dropped a quote came out as an entity the absence
check could not match, and the presence check was met by the file
links above the diff. The test now reads the line links themselves,
for a name holding a hash and a question mark as well.
|
|
Only the commit page was checked, and only for onchange, though a site
policy without unsafe-inline blocks every inline handler on any page.
|
|
The escaped script tag alone matched either readme, so the markdown
page showing the text readme passed.
|
|
The test took any page holding the word top, with no status checked.
The refusal half lives in t0204, so the fixture now says why its limit
is set so low.
|
|
The refusal was read from a page the previous test had left, which
--run could skip, and both requests went through the shared page
cache. The marker is also named apart from the one the filter test
plants, so a failure in one cannot fail the other.
|
|
No test asserted the Content-Security-Policy header, though it is all
that keeps script in an SVG from running when the plain page serves it
under its own type.
|
|
The posted body was 22 bytes, so an unclamped read stopped at its end
and nothing overflowed, and the test could not fail. The filter now
counts what it was handed from a body larger than the buffer.
|
|
|
|
|
|
The one-line request wrappers go with them. Configs with several
repositories, a key out of place on purpose, the cache on or no
repository of their own stay written out.
|
|
Test bodies run in the main shell, so the target named in the fixture
reaches every check that greps for it.
|
|
|
|
|
|
|
|
The trash directory starts empty and setup.sh already made the cache,
the clamp check already fails on a short query, and the commit the setup
named is still there to pin.
|
|
t0103 already renders foo/log and finds commit 5, and its search for a
bracket fails the same way this literal search did if --fixed-strings
ever goes.
|
|
t0204 asks the tree, plain, blob and blame pages for one oversized blob
and checks the exact status and message, so the looser copy here went.
|
|
The object path check let any run of safe characters through, so a
spelling such as info//alternates or info/./alternates reached the
alternates file the exact name was refused for.
|
|
|
|
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.
|
|
Each class behind cgit's published advisories now has a check against
the current code, from a newline in a file name to shell syntax handed
to a filter. The feed also treated an ident with an empty name and an
empty address as present and wrote an empty person, which Atom forbids.
|
|
|
|
|
|
|
|
|
|
|