Hashtags: 1MB limit for attempting to link (#544)
This commit is contained in:
parent
eda6d6d785
commit
74a774e8e7
2 changed files with 5 additions and 0 deletions
|
@ -43,6 +43,10 @@ class Hashtag {
|
||||||
* @return string the filtered post-content
|
* @return string the filtered post-content
|
||||||
*/
|
*/
|
||||||
public static function the_content( $the_content ) {
|
public static function the_content( $the_content ) {
|
||||||
|
// small protection against execution timeouts: limit to 1 MB
|
||||||
|
if ( mb_strlen( $the_content ) > MB_IN_BYTES ) {
|
||||||
|
return $the_content;
|
||||||
|
}
|
||||||
$tag_stack = array();
|
$tag_stack = array();
|
||||||
$protected_tags = array(
|
$protected_tags = array(
|
||||||
'pre',
|
'pre',
|
||||||
|
|
|
@ -110,6 +110,7 @@ Project maintained on GitHub at [automattic/wordpress-activitypub](https://githu
|
||||||
* Improved: audio and video attachments are now supported!
|
* Improved: audio and video attachments are now supported!
|
||||||
* Improved: better error messages if remote profile is not accessible
|
* Improved: better error messages if remote profile is not accessible
|
||||||
* Improved: PHP 8.1 compatibility
|
* Improved: PHP 8.1 compatibility
|
||||||
|
* Fixed: don't try to parse mentions or hashtags for very large (>1MB) posts to prevent timeouts
|
||||||
|
|
||||||
= 1.0.10 =
|
= 1.0.10 =
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue