Author: Jason A. Donenfeld <Jason@zx2c4.com>
ui-blob: Do not accept mimetype from user
cgit.c | 2 -- cgit.h | 1 - ui-blob.c | 1 -
diff --git a/cgit.c b/cgit.c
index 05e5d5737d71cc302868ffd4f6388e8d1f947e9d..3ed1935c1eb4eb5561ccaed3f9d169b72286ca90 100644
--- a/cgit.c
+++ b/cgit.c
@@ -314,8 +314,6 @@ } else if (!strcmp(name, "path")) {
ctx.qry.path = trim_end(value, '/');
} else if (!strcmp(name, "name")) {
ctx.qry.name = xstrdup(value);
- } else if (!strcmp(name, "mimetype")) {
- ctx.qry.mimetype = xstrdup(value);
} else if (!strcmp(name, "s")) {
ctx.qry.sort = xstrdup(value);
} else if (!strcmp(name, "showmsg")) {
diff --git a/cgit.h b/cgit.h
index b7eccdd2bd982198df2971060002f3d6f155c783..4b4bcf4b9cb30bda303ac9b597313be667e93274 100644
--- a/cgit.h
+++ b/cgit.h
@@ -173,7 +173,6 @@ char *sha1;
char *sha2;
char *path;
char *name;
- char *mimetype;
char *url;
char *period;
int ofs;
diff --git a/ui-blob.c b/ui-blob.c
index 1ded8397f5d59d03cd8ecb17705c0c9f69e5e881..2cce11cb976d7bc49f3ec5c776f57043cab76647 100644
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -161,7 +161,6 @@ return;
}
buf[size] = '\0';
- ctx.page.mimetype = ctx.qry.mimetype;
if (!ctx.page.mimetype) {
if (buffer_is_binary(buf, size))
ctx.page.mimetype = "application/octet-stream";