From cb0e788e98482b3cbf983bbecfb802a9cfaf2447 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Thu, 10 Feb 2022 03:45:16 +0100 Subject: git-receiver: pre-receive: validate ref prefix --- tests/blogc-git-receiver/check_pre_receive_parser.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/blogc-git-receiver/check_pre_receive_parser.c') diff --git a/tests/blogc-git-receiver/check_pre_receive_parser.c b/tests/blogc-git-receiver/check_pre_receive_parser.c index c431821..cad1421 100644 --- a/tests/blogc-git-receiver/check_pre_receive_parser.c +++ b/tests/blogc-git-receiver/check_pre_receive_parser.c @@ -43,6 +43,10 @@ test_pre_receive_parse(void **state) "4f1f932f6ef6d6c9770266775c2db072964d7a62 " "3fff4bb3172f77b292b0c913749e81bedd3545f3 " "refs/heads/master")); + assert_null(_bgr_pre_receive_parse( + "4f1f932f6ef6d6c9770266775c2db072964d7a62 " + "3fff4bb3172f77b292b0c913749e81bedd3545f3 " + "adgfdgdfgfdgdfgdfgdfgdfgdfg\n")); bc_trie_t *t; t = _bgr_pre_receive_parse( -- cgit v1.2.3-18-g5258