Commit Graph

9 Commits (d283e4ca1aeb6ca8cc0951c8495f778071076013)

Author SHA1 Message Date
Simon McVittie 4ba3c11592 git-cgi.t: Exercise an alphanumeric, but non-ASCII, root page
My previous attempt to reproduce this bug used a non-alphanumeric
ASCII character. This is not currently considered to be a valid
value for rootpage, although for a "do what I mean" approach, perhaps
we should accept it and pass it through titlepage() or linkpage().

Using Chinese characters (which are considered to match [[:alnum:]]
even though the Chinese script is not, strictly speaking, an alphabet),
as in the original bug report, reproduces the bug.

Signed-off-by: Simon McVittie <smcv@debian.org>
2019-02-03 13:27:00 +00:00
Simon McVittie 2bd72cd0e0 git-cgi.t: Add a failing test for a blog with a non-ASCII rootpage
This is one of several possible bug reports on
"doc/bugs/About %2F problem" (I'm not sure what the actual bug being
reported is).

Signed-off-by: Simon McVittie <smcv@debian.org>
2019-01-31 20:37:06 +00:00
Simon McVittie 9c0694b14c git-cgi.t: Add a simple test for blog posts from a root page
This is the working base case for "doc/bugs/About %2F problem".

Signed-off-by: Simon McVittie <smcv@debian.org>
2019-01-31 20:37:06 +00:00
Simon McVittie a10d86bbae git-cgi.t: Print query string as a TAP diagnostic
Signed-off-by: Simon McVittie <smcv@debian.org>
2019-01-31 20:37:06 +00:00
Simon McVittie 8b5c729b8b t/git-cgi.t: Wait 1 second before doing a revert that should succeed
This hopefully fixes a race condition in which the test failed
around 6% of the time.

If we don't wait, the mtime (which is rounded down to 1 second precision
in the APIs we use) will not necessarily change, so the update will not
necessarily cause the page to be refreshed.

Bug-Debian: https://bugs.debian.org/862494
2017-05-14 15:35:52 +01:00
Simon McVittie ca1b06d599 git-cgi.t: when committing directly, make sure we have a valid author
In the environment used on ci.debian.net, we have neither a name nor
an email address.
2017-01-09 13:07:24 +00:00
Simon McVittie 62c9df6721 t/git-cgi.t: fix race condition
We need the changes to take place at least 1 second after the first
rebuild, so that the changed files are seen to have changed.
2017-01-09 13:07:24 +00:00
Simon McVittie 29b91c970b git: Add test coverage for reverting attachments 2016-12-28 21:32:13 +00:00
Simon McVittie ad04dac19b Add automated test for using the CGI with git, including CVE-2016-10026 2016-12-28 21:32:12 +00:00