From aafecd9d1e2b5ff442f0a34eecf074db902086ae Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 23 Sep 2019 09:12:05 +0000 Subject: composer update ezyang/htmlpurifier (cherry picked from commit 38cb094ede8a389ef0b8bb331c1e6a3befd666a8) --- .../schema/Core.AllowParseManyTags.txt | 12 +++ vendor/ezyang/htmlpurifier/maintenance/flush.sh | 8 ++ vendor/ezyang/htmlpurifier/update-for-release | 110 +++++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowParseManyTags.txt create mode 100644 vendor/ezyang/htmlpurifier/maintenance/flush.sh create mode 100644 vendor/ezyang/htmlpurifier/update-for-release (limited to 'vendor') diff --git a/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowParseManyTags.txt b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowParseManyTags.txt new file mode 100644 index 000000000..06278f82a --- /dev/null +++ b/vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema/schema/Core.AllowParseManyTags.txt @@ -0,0 +1,12 @@ +Core.AllowParseManyTags +TYPE: bool +DEFAULT: false +VERSION: 4.10.1 +--DESCRIPTION-- +

+ This directive allows parsing of many nested tags. + If you set true, relaxes any hardcoded limit from the parser. + However, in that case it may cause a Dos attack. + Be careful when enabling it. +

+--# vim: et sw=4 sts=4 diff --git a/vendor/ezyang/htmlpurifier/maintenance/flush.sh b/vendor/ezyang/htmlpurifier/maintenance/flush.sh new file mode 100644 index 000000000..65ef6f8cc --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/flush.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -ex +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +php "$DIR/generate-includes.php" +php "$DIR/generate-schema-cache.php" +php "$DIR/flush-definition-cache.php" +php "$DIR/generate-standalone.php" +php "$DIR/config-scanner.php" diff --git a/vendor/ezyang/htmlpurifier/update-for-release b/vendor/ezyang/htmlpurifier/update-for-release new file mode 100644 index 000000000..32709d25e --- /dev/null +++ b/vendor/ezyang/htmlpurifier/update-for-release @@ -0,0 +1,110 @@ + 1) { + echo 'More than one release declaration in NEWS replaced' . PHP_EOL; + exit; + } + file_put_contents('NEWS', $news_c); +} + +// ...in Doxyfile +$doxyfile_c = preg_replace( + '/(?<=PROJECT_NUMBER {9}= )[^\s]+/m', // brittle + $version, + file_get_contents('Doxyfile'), + 1, $c +); +if (!$c) { + echo 'Could not update Doxyfile, missing PROJECT_NUMBER.' . PHP_EOL; + exit; +} +file_put_contents('Doxyfile', $doxyfile_c); + +// ...in HTMLPurifier.php +$htmlpurifier_c = file_get_contents('library/HTMLPurifier.php'); +$htmlpurifier_c = preg_replace( + '/HTML Purifier .+? - /', + "HTML Purifier $version - ", + $htmlpurifier_c, + 1, $c +); +if (!$c) { + echo 'Could not update HTMLPurifier.php, missing HTML Purifier [version] header.' . PHP_EOL; + exit; +} +$htmlpurifier_c = preg_replace( + '/public \$version = \'.+?\';/', + "public \$version = '$version';", + $htmlpurifier_c, + 1, $c +); +if (!$c) { + echo 'Could not update HTMLPurifier.php, missing public $version.' . PHP_EOL; + exit; +} +$htmlpurifier_c = preg_replace( + '/const VERSION = \'.+?\';/', + "const VERSION = '$version';", + $htmlpurifier_c, + 1, $c +); +if (!$c) { + echo 'Could not update HTMLPurifier.php, missing const $version.' . PHP_EOL; + exit; +} +file_put_contents('library/HTMLPurifier.php', $htmlpurifier_c); + +$config_c = file_get_contents('library/HTMLPurifier/Config.php'); +$config_c = preg_replace( + '/public \$version = \'.+?\';/', + "public \$version = '$version';", + $config_c, + 1, $c +); +if (!$c) { + echo 'Could not update Config.php, missing public $version.' . PHP_EOL; + exit; +} +file_put_contents('library/HTMLPurifier/Config.php', $config_c); + +passthru('maintenance/flush.sh'); + +if ($is_dev) echo "Review changes, write something in WHATSNEW and FOCUS, and then commit with log 'Release $version.'" . PHP_EOL; +else echo "Numbers updated to dev, no other modifications necessary!"; + +// vim: et sw=4 sts=4 -- cgit v1.2.3