mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-15 01:55:03 +00:00
Merge pull request 'html.c: Don't let public get into timeline.html_' (#67) from yonle/snac2:master into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/67
This commit is contained in:
commit
510bd60cdf
1 changed files with 5 additions and 1 deletions
6
html.c
6
html.c
|
@ -1843,7 +1843,11 @@ int html_get_handler(const xs_dict *req, const char *q_path,
|
|||
xs *l = xs_split(p_path, "/");
|
||||
char *id = xs_list_get(l, 1);
|
||||
|
||||
if ((*body = history_get(&snac, id)) != NULL) {
|
||||
if (xs_endswith(id, "timeline.html_")) {
|
||||
// Don't let them in.
|
||||
*b_size = 0;
|
||||
status = 404;
|
||||
} else if ((*body = history_get(&snac, id)) != NULL) {
|
||||
*b_size = strlen(*body);
|
||||
status = 200;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue