Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 9090d40f authored by Rob Swindell's avatar Rob Swindell 💬

Don't support back-to-back marks in markup parsing

Addresses false-positive matches in URLs (e.g. https://minftn.net/) where the second slash was being interpreted as a the beginning of an italic markup.
parent 94ed3ee5
Pipeline #546 passed with stage
in 15 minutes and 11 seconds
......@@ -165,7 +165,7 @@ char sbbs_t::putmsgfrag(const char* buf, long* mode, long org_cols, JSObject* ob
if(mark == 0)
next = strchr(str + l + 1, str[l]);
char *blank = strstr(str + l + 1, "\n\r");
if(((l < 1 || IS_WHITESPACE(str[l - 1]) || IS_PUNCTUATION(str[l - 1]))
if(((l < 1 || ((IS_WHITESPACE(str[l - 1]) || IS_PUNCTUATION(str[l - 1])) && str[l - 1] != str[l]))
&& IS_ALPHANUMERIC(str[l + 1]) && mark == 0 && next != NULL && (*(next + 1) == '\0' || IS_WHITESPACE(*(next + 1)) || IS_PUNCTUATION(*(next+1)))
&& (blank == NULL || next < blank))
|| str[l] == mark) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment