mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 11:40:27 +03:00
Shortened the maximum conversation levels.
Set to a compilation define in MAX_CONVERSATION_LEVELS.
This commit is contained in:
parent
c2fb2a4034
commit
093f4af282
@ -310,7 +310,7 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
if (level < 256 && !xs_is_null(*id)) {
|
||||
if (level < MAX_CONVERSATION_LEVELS && !xs_is_null(*id)) {
|
||||
xs *msg = NULL;
|
||||
|
||||
/* is the object already there? */
|
||||
|
5
html.c
5
html.c
@ -1334,8 +1334,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
|
||||
}
|
||||
|
||||
/* avoid too deep nesting, as it may be a loop */
|
||||
if (level >= 256)
|
||||
return NULL;
|
||||
if (level >= MAX_CONVERSATION_LEVELS)
|
||||
return xs_html_tag("mark",
|
||||
xs_html_text(L("Truncated (too deep)")));
|
||||
|
||||
if (strcmp(type, "Follow") == 0) {
|
||||
return xs_html_tag("div",
|
||||
|
Loading…
Reference in New Issue
Block a user