@matheusbsbs / matheus-bagliano / commits / 0eba60c9b7
Fork 0

t9502: pass along all arguments in xss helper

This function is just a thin wrapper around gitweb_run(), which takes multiple arguments. But we only pass along "$1". Let's pass everything we get, which will let a future patch add an XSS test that affects PATH_INFO (which gitweb_run() takes as $2). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Nov 15, 2019 at 04:05 UTC 0eba60c9b781ce8169f1288a73b538f1ecf3b615
1 file changed +2 -2
t/t9502-gitweb-standalone-parse-output.sh
+2 -2
@@ -188,8 +188,8 @@ test_expect_success 'forks: project_index lists all projects (incl. forks)' '
188 '
189
190 xss() {
191 - echo >&2 "Checking $1..." &&
192 - gitweb_run "$1" &&
191 + echo >&2 "Checking $*..." &&
192 + gitweb_run "$@" &&
193 if grep "$TAG" gitweb.body; then
194 echo >&2 "xss: $TAG should have been quoted in output"
195 return 1