diff options
| author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-01-14 14:53:28 +0100 | 
|---|---|---|
| committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-01-14 15:42:56 +0100 | 
| commit | c326f3eb026d67650f79a6dda9a1a42c55d10a25 (patch) | |
| tree | 51b94c63164ea924eb019c2e3c1e0b290509549b /cgit.c | |
| parent | ui-blob: set CSP just in case (diff) | |
| download | cgit-c326f3eb026d67650f79a6dda9a1a42c55d10a25.tar.gz cgit-c326f3eb026d67650f79a6dda9a1a42c55d10a25.tar.bz2 cgit-c326f3eb026d67650f79a6dda9a1a42c55d10a25.zip | |
ui-plain: add enable-html-serving flag
Unrestricts plain/ to contents likely to be executed by browser.
Diffstat (limited to '')
| -rw-r--r-- | cgit.c | 5 | 
1 files changed, 5 insertions, 0 deletions
| @@ -55,6 +55,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va  		repo->enable_remote_branches = atoi(value);  	else if (!strcmp(name, "enable-subject-links"))  		repo->enable_subject_links = atoi(value); +	else if (!strcmp(name, "enable-html-serving")) +		repo->enable_html_serving = atoi(value);  	else if (!strcmp(name, "branch-sort")) {  		if (!strcmp(value, "age"))  			repo->branch_sort = 1; @@ -170,6 +172,8 @@ static void config_cb(const char *name, const char *value)  		ctx.cfg.enable_remote_branches = atoi(value);  	else if (!strcmp(name, "enable-subject-links"))  		ctx.cfg.enable_subject_links = atoi(value); +	else if (!strcmp(name, "enable-html-serving")) +		ctx.cfg.enable_html_serving = atoi(value);  	else if (!strcmp(name, "enable-tree-linenumbers"))  		ctx.cfg.enable_tree_linenumbers = atoi(value);  	else if (!strcmp(name, "enable-git-config")) @@ -821,6 +825,7 @@ static void print_repo(FILE *f, struct cgit_repo *repo)  		fprintf(f, "repo.logo-link=%s\n", repo->logo_link);  	fprintf(f, "repo.enable-remote-branches=%d\n", repo->enable_remote_branches);  	fprintf(f, "repo.enable-subject-links=%d\n", repo->enable_subject_links); +	fprintf(f, "repo.enable-html-serving=%d\n", repo->enable_html_serving);  	if (repo->branch_sort == 1)  		fprintf(f, "repo.branch-sort=age\n");  	if (repo->commit_sort) { | 
