1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-06 22:45:02 +02:00

Merge pull request #6465 from LukeWCS/ticket/17076

[ticket/17076] Fix signature length calculation
This commit is contained in:
Marc Alexander 2023-02-28 20:26:07 +01:00
commit 4bf78fd7fd
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -1154,7 +1154,7 @@ class parse_message extends bbcode_firstpass
}
// Store message length...
$message_length = ($mode == 'post') ? utf8_strlen($this->message) : utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#ius', ' ', $this->message));
$message_length = ($mode == 'post') ? utf8_strlen($this->message) : utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(?:=\S+?)?\]#ius', '', $this->message));
// Maximum message length check. 0 disables this check completely.
if ((int) $config['max_' . $mode . '_chars'] > 0 && $message_length > (int) $config['max_' . $mode . '_chars'])