about summary refs log tree commit diff
path: root/ui-plain.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2009-08-17 09:19:05 +0200
committerLars Hjemli <hjemli@gmail.com>2009-08-17 09:24:36 +0200
commit8a631b1173b1abecc5a737b0e21751ddbabf9df2 (patch)
tree93320a0e21c1f13e936ccac66d250b28fa87acc1 /ui-plain.c
parentCGIT 0.8.2.1 (diff)
downloadcgit-pink-8a631b1173b1abecc5a737b0e21751ddbabf9df2.tar.gz
cgit-pink-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 '')
0 files changed, 0 insertions, 0 deletions
itle='2024-05-22 11:55:53 -0400'>2024-05-22Add photo descriptions from 05-03 and 05-06June McEnroe 2024-05-21Fix = precedence in whenJune McEnroecommit/ui.c?h=catgirl&id=c9590bab061fcaa3e11a94eea8c34026a6c7a880&follow=1'>Use time_t for save signatureJune McEnroe 2020-02-11Set self.nick to * initiallyJune McEnroe 2020-02-11Define ColorCap instead of hardcoding 100June McEnroe 2020-02-11Move hash to top of chat.hJune McEnroe 2020-02-11Move base64 out of chat.hJune McEnroe 2020-02-11Move XDG_SUBDIR out of chat.hJune McEnroe 2020-02-11Fix whois idle unit calculationJune McEnroe 2020-02-11Cast towupper to wchar_tJune McEnroe 2020-02-11Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroe