| Age | Commit message (Collapse) | Author | Lines |
|
mv asks before replacing a file it cannot write when stdin is a
terminal, and the age hook sends the question to /dev/null. git always
gives a hook a pipe, but a hook run by hand from a terminal waited on
an answer no one could see and then kept the old date.
|
|
README tells a visitor to write a plus in the query form as %2b, and
cgit caches such a page under the raw query, but the hook compared that
query with the url as it stands. A push to foo+bar.git left its pages
under url=foo%2bbar.git/ and r=foo%2Bbar.git cached and stale until
their ttl ran out. Decoding in sh would take more than the hook is
worth, so a query with a % or a + now counts as stale, which costs
another repository's page at most a refill.
|
|
The header said a file the pusher cannot write stays as it was, but the
hook replaces it through mv, which needs only the directory, and with
stdin not a terminal mv does so without asking. That is the useful
behaviour, so the header now says so, and a test holds the hook to it.
Only a directory the pusher cannot write keeps the old file, which was
the one case tested.
|
|
is_safe_redirect looked at the first two characters alone, so it
accepted https://evil.example/ and javascript:x. Neither could be
signed today only because cgit always signs a url that starts with
virtual-root, and nothing tested that. A target now has to start with
a single slash, which needs virtual-root to be a path for logins to
work, as it is by default.
|
|
A repeat's count was keyed on the bare text, so a heading whose text
already ended in that count took the same anchor, as "Twice 1" did
after two of "Twice", and "About 1" after "About". A link to either
then landed on the first. The count now goes on up past any anchor
already handed out, the way GitHub's slugger does.
|
|
The icons came from Gravatar or Libravatar with the page's url as the
Referer, so the service learned which repositories and commits each
visitor looked at.
|
|
The old file was a complete lighttpd.conf with its own user, modules
and MIME table. As a snippet it takes those from the distribution and
loads only the three modules it uses, which lighttpd skips when the
main config loads them already. It takes the nginx config's header and
commented examples. The host block matches on every socket, so HTTPS
needs only the socket, and the redirect is a condition on the scheme
inside it.
The stock lighttpd.conf on Debian, Alpine and Fedora refuses urls
ending in ~ or .inc, so a repository's config.inc answered 403 until
the host block cleared the list.
git-http-backend's cgi.assign sits outside the url condition because
lighttpd checks it after splitting the path, when that condition no
longer matches, and inside it the program itself was served as a file.
|
|
The old file was a complete httpd.conf that named RHEL's paths and
user and loaded its own modules, so on Debian it had to be rewritten
before Apache would start. As a virtual host it leaves all of that to
the distribution, and it takes the nginx config's header and commented
examples. For HTTPS the one virtual host moves to port 443 rather than
a second host repeating its routing, and a small host on port 80 sends
plain HTTP on to it.
|
|
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.
|
|
|
|
Without one a repository has no about tab and its about url redirects
to the summary, so a site that sets only about-filter never sees the
renderer run.
|
|
|
|
link-trailers.lua has shipped its Closes and Bug rules commented out
since b4e780a, as they need a tracker address, but both docs still
promised those links.
|
|
The header asked for write access for the pushing user, but MANUAL.txt
keeps the cache root at mode 0700 for the web server and cgit writes
its slots at 0600, so a pusher could at best drop every page rather
than only its own.
|
|
|
|
|
|
|
|
The rule was written down only under scan-path, so a setting such as
enable-blame=1 added at the end of cgitrc silently did nothing.
|
|
Any css or js line replaces the default rather than adding to it, so a
theme set with a single css line, as the README implied, left every
page unstyled.
|
|
Debian, Ubuntu, Fedora and Alpine package luaossl, luaposix and lpeg
for the Lua versions they ship, which leaves LuaRocks for the rest.
Scintillua comes as a release zip whose lexers directory is what the
filter looks for, so its steps say where to put that.
|
|
|
|
The login posts outside any repository, so the log line names the
repository by the page its signed way back leads to.
|
|
Only HTTPS=on counts, the same test cgit makes before it writes an
https link of its own.
|
|
|
|
The way back was signed part way through the form, so while the secret's
directory did not exist, or a library was missing, cgit's error landed
inside the hidden input and the page broke off there with no fields.
|
|
|
|
A list keyed on the name the index shows matched nothing, so the
repository it meant to protect stayed public.
|
|
make install copies every filter into the filters directory with mode
0644, so an edited auth-inline.lua there lost its lists on the next
install, which turned every protected repository public, and until then
showed its password hashes to every local user.
|
|
Scintillua's detect() matches an extension by its case, and the fallback
e227d1f dropped had lowercased it, so MAIN.C and SETUP.PY lost their
colour. The fake lexer now answers only for the suffixes it knows, as
Scintillua does, which is what lets the check see it.
|
|
|
|
|
|
Behind an auth filter every page carries Cache-Control: private and the
login page no-store, so only the missing expiry holds on every site.
|
|
cgit_snapshot_prefix falls back to the basename of the repository url,
and print_object sends a binary blob as application/octet-stream.
|
|
|
|
|
|
Each takes the form its option name or most of the prose already uses,
as in case-sensitive-sort and side-by-side-diffs.
|
|
The head section loses its capitals too, since HEAD elsewhere in the
manual is git's.
|
|
Names keep their own spelling, so the URL trailer and CGIT_REPO_URL
stay in capitals.
|
|
|
|
|
|
filter_close already runs highlight under pcall and serves the escaped
text when it fails, so the pcalls around detect, load and lex inside it
only turned a raise into the same fallback a step earlier.
|
|
On Lua 5.3 and later a length worked out with a fraction, such as
1.5 * 24 * 60 * 60, is a float, so the signed expiry came out as
1793609024.0, which validate_value refuses, and every login failed.
Max-Age took the same .0, which makes a browser ignore it.
|
|
|
|
The lookups were never the only difference, since the configuration
and trim's place differ as well. The configuration is now set off by
blank lines, as in the other extensions, instead of a heading.
|
|
cgit passes an empty string, never nil, when a request names no
repository, so the check that the index stays up proved nothing, and
auth-file in fact refuses the index too while its repos file cannot be
read. A session_seconds of 0 signs a session that has expired by the
time it comes back, so it needs no branch of its own in set_cookie.
|
|
set_cookie only ever writes an empty value or a token secure_value
built from url-encoded text, digits and hex, so stripping it changed
nothing.
|
|
Every caller hands the helpers a string, and a value with a line break
is refused by validate_value whether or not CR LF is folded on the way.
|
|
Seven of the twelve fields filter_open stored were never read. Naming
all twelve parameters keeps the order cgit passes them in on record.
|
|
The loop let a valid cookie through with a field appended, a doubled
separator or a zero in front of its expiry. The payload now carries the
expiry as written, so only the spelling secure_value issues verifies.
|
|
The table of extensions and the second lookup served only a Scintillua
with no detect(), which now leaves every file uncoloured but escaped.
The fake detect() names a lexer after the file's suffix, so every test
lexer is reached through it.
|