summaryrefslogtreecommitdiff
path: root/tests/t0105-commit.sh
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2009-08-17 07:19:05 +0000
committerLars Hjemli <hjemli@gmail.com>2009-08-17 07:24:36 +0000
commit8a631b1173b1abecc5a737b0e21751ddbabf9df2 (patch)
tree93320a0e21c1f13e936ccac66d250b28fa87acc1 /tests/t0105-commit.sh
parentfdd559abd6e6ec5e522dc5496b2bcabd36d6ba9d (diff)
downloadcgit-8a631b1173b1abecc5a737b0e21751ddbabf9df2.tar
cgit-8a631b1173b1abecc5a737b0e21751ddbabf9df2.tar.gz
cgit-8a631b1173b1abecc5a737b0e21751ddbabf9df2.zip
ui-tag.c: do not segfault when id is missing from query-string
The purpose of the tag page is to print info about a specific tag, but if no tag was specified on the query-string cgit used to segfault. With this patch, cgit will fallback to the value of the 'h' parameter instead (which is never NULL due to prepare_repo_cmd() in cgit.c). It will now also verify that the specified tagname is in fact a valid ref in the 'refs/tags/' namespace, i.e. specifying 'id=master' will trigger a 'Bad tag reference' error. Noticed-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'tests/t0105-commit.sh')
0 files changed, 0 insertions, 0 deletions