Commit Diff


commit - 56997cd343fd0af81272d2bfbf2b3a272e01a1f3
commit + 9f33591a82266a25a3e1f1c1afe1550345a1d7a0
blob - d2f32183040cb8aa0c2d21cf2e3a9680059547a5
blob + ca4789ac8b830c2881726e2edfa84719053f4a4a
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
@@ -1440,7 +1440,12 @@ gw_tag(struct gw_trans *gw_trans)
 	if (error)
 		goto done;
 
-	khttp_puts(gw_trans->gw_req, header->commit_id);
+	if (gw_trans->commit_id == NULL) {
+		error = got_error_msg(GOT_ERR_QUERYSTRING,
+		    "commit required in querystring");
+		goto done;
+	}
+
 	error = gw_get_header(gw_trans, header, 1);
 	if (error)
 		goto done;
blob - 888f9dd8b23cf061c2e0cca1e727db4c9f4a4f1b
blob + ae6efb2fcf76c8ebb8e63f36b1aec2528dbae49a
--- include/got_error.h
+++ include/got_error.h
@@ -130,6 +130,7 @@
 #define GOT_ERR_GITCONFIG_SYNTAX 114
 #define GOT_ERR_REBASE_OUT_OF_DATE 115
 #define GOT_ERR_CACHE_DUP_ENTRY	116
+#define GOT_ERR_QUERYSTRING	117
 
 static const struct got_error {
 	int code;
@@ -267,6 +268,7 @@ static const struct got_error {
 	{ GOT_ERR_REBASE_OUT_OF_DATE, "work tree must be updated before it "
 	    "can be used to rebase a branch" },
 	{ GOT_ERR_CACHE_DUP_ENTRY, "duplicate cache entry" },
+	{ GOT_ERR_QUERYSTRING, "bad querystring" },
 };
 
 /*