From 559a1efbfb6d2b296dc29108fe6d2e4692bfb67a Mon Sep 17 00:00:00 2001 From: Alex Trofimov Date: Mon, 6 Sep 2021 09:36:28 +1000 Subject: [PATCH] #3488 Composer: source code changes --- composer.lock | 1479 +++++++++++++++++ ...BxDolHTMLPurifierFilterAddBxLinksClass.php | 36 + .../BxDolHTMLPurifierFilterLocalIframe.php | 43 + .../BxDolHTMLPurifierFilterYouTube.php | 65 + .../BxDolHTMLPurifierFilterYoutubeIframe.php | 40 + inc/classes/BxDolImageResize.php | 10 - inc/classes/BxDolMinify.php | 6 - inc/classes/BxDolStorageS3.php | 2 +- inc/classes/BxDolStorageS3v4.php | 4 +- inc/classes/BxDolTemplate.php | 3 - inc/params.inc.php | 1 + inc/utils.inc.php | 11 +- install/classes/BxDolInstallView.php | 1 - install/index.php | 2 + .../antispam/classes/BxAntispamAkismet.php | 2 +- .../classes/BxAntispamProfanityFilter.php | 3 +- .../classes/BxFaceBookConnectModule.php | 2 - .../classes/BxPaymentProviderChargebee.php | 2 - .../classes/BxPaymentProviderPayPal.php | 2 +- .../classes/BxPaymentProviderPayPalApi.php | 2 - .../classes/BxPaymentProviderRecurly.php | 2 - .../classes/BxPaymentProviderStripeBasic.php | 2 - .../smtpmailer/classes/BxSMTPModule.php | 4 - .../classes/BxStripeConnectModule.php | 2 - .../classes/BxTwitterModule.php | 3 - studio/classes/BxDolStudioOAuthPlugin.php | 2 - 26 files changed, 1674 insertions(+), 57 deletions(-) create mode 100644 composer.lock create mode 100644 inc/classes/BxDolHTMLPurifierFilterAddBxLinksClass.php create mode 100644 inc/classes/BxDolHTMLPurifierFilterLocalIframe.php create mode 100644 inc/classes/BxDolHTMLPurifierFilterYouTube.php create mode 100644 inc/classes/BxDolHTMLPurifierFilterYoutubeIframe.php diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000000..dde116afd1 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1479 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "71819b221edd0942e4be2e8664b6e42b", + "packages": [ + { + "name": "achingbrain/php5-akismet", + "version": "0.5", + "source": { + "type": "git", + "url": "https://github.com/achingbrain/php5-akismet", + "reference": "master" + }, + "type": "library" + }, + { + "name": "akeeba/s3", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/akeeba/s3.git", + "reference": "96208915514b19e7789ea053c6a109b212864001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/akeeba/s3/zipball/96208915514b19e7789ea053c6a109b212864001", + "reference": "96208915514b19e7789ea053c6a109b212864001", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Akeeba\\Engine\\Postproc\\Connector\\S3v4\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-3.0+" + ], + "authors": [ + { + "name": "Nicholas K. Dionysopoulos", + "email": "nicholas_NO_SPAM_PLEASE@akeebabackup.com", + "homepage": "http://www.dionysopoulos.me", + "role": "Lead Developer" + } + ], + "description": "Akeeba Engine connector for Amazon S3", + "homepage": "https://github.com/akeeba/s3", + "keywords": [ + "s3" + ], + "support": { + "issues": "https://github.com/akeeba/s3/issues", + "source": "https://github.com/akeeba/s3/tree/1.0.0" + }, + "time": "2020-01-02T07:13:47+00:00" + }, + { + "name": "avto-dev/composer-cleanup-plugin", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/unaio/composer-cleanup-plugin.git", + "reference": "75187ca4854265174021765e3b67cb973dc37723" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/unaio/composer-cleanup-plugin/zipball/75187ca4854265174021765e3b67cb973dc37723", + "reference": "75187ca4854265174021765e3b67cb973dc37723", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "composer/composer": "^1.8.6 || ^2.0", + "phpstan/phpstan": "~0.12.34", + "phpunit/phpunit": "^8.5.4 || ^9.3" + }, + "default-branch": true, + "type": "composer-plugin", + "extra": { + "class": "AvtoDev\\Composer\\Cleanup\\Plugin" + }, + "autoload": { + "psr-4": { + "AvtoDev\\Composer\\Cleanup\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "AvtoDev\\Composer\\Cleanup\\Tests\\": "tests/" + } + }, + "scripts": { + "post-update-cmd": [ + "AvtoDev\\Composer\\Cleanup\\Plugin::cleanupAllPackages" + ], + "post-install-cmd": [ + "AvtoDev\\Composer\\Cleanup\\Plugin::cleanupAllPackages" + ], + "phpunit": [ + "@php ./vendor/bin/phpunit --no-coverage --colors=always" + ], + "phpunit-cover": [ + "@php ./vendor/bin/phpunit --coverage-html='./coverage/html'" + ], + "phpstan": [ + "@php ./vendor/bin/phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi" + ], + "test": [ + "@phpstan", + "@phpunit" + ], + "test-cover": [ + "@phpstan", + "@phpunit-cover" + ] + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "avto-dev", + "homepage": "https://github.com/avto-dev" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "A composer cleanup plugin, to remove tests and documentation to save space", + "support": { + "issues": "https://github.com/avto-dev/composer-cleanup-plugin/issues", + "source": "https://github.com/avto-dev/composer-cleanup-plugin" + }, + "time": "2021-09-04T13:12:22+00:00" + }, + { + "name": "bshaffer/oauth2-server-php", + "version": "v1.11.1", + "source": { + "type": "git", + "url": "https://github.com/bshaffer/oauth2-server-php.git", + "reference": "5a0c8000d4763b276919e2106f54eddda6bc50fa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bshaffer/oauth2-server-php/zipball/5a0c8000d4763b276919e2106f54eddda6bc50fa", + "reference": "5a0c8000d4763b276919e2106f54eddda6bc50fa", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "aws/aws-sdk-php": "~2.8", + "firebase/php-jwt": "~2.2", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^4.0", + "predis/predis": "dev-master", + "thobbs/phpcassa": "dev-master" + }, + "suggest": { + "aws/aws-sdk-php": "~2.8 is required to use DynamoDB storage", + "firebase/php-jwt": "~2.2 is required to use JWT features", + "mongodb/mongodb": "^1.1 is required to use MongoDB storage", + "predis/predis": "Required to use Redis storage", + "thobbs/phpcassa": "Required to use Cassandra storage" + }, + "type": "library", + "autoload": { + "psr-0": { + "OAuth2": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brent Shaffer", + "email": "bshafs@gmail.com", + "homepage": "http://brentertainment.com" + } + ], + "description": "OAuth2 Server for PHP", + "homepage": "http://github.com/bshaffer/oauth2-server-php", + "keywords": [ + "auth", + "oauth", + "oauth2" + ], + "support": { + "issues": "https://github.com/bshaffer/oauth2-server-php/issues", + "source": "https://github.com/bshaffer/oauth2-server-php/tree/master" + }, + "time": "2018-12-04T00:29:32+00:00" + }, + { + "name": "chargebee/chargebee-php", + "version": "v2.8.3", + "source": { + "type": "git", + "url": "https://github.com/chargebee/chargebee-php.git", + "reference": "e0819230cd7a8364337a0a228f7aecab80b6776b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/e0819230cd7a8364337a0a228f7aecab80b6776b", + "reference": "e0819230cd7a8364337a0a228f7aecab80b6776b", + "shasum": "" + }, + "type": "library", + "autoload": { + "files": [ + "lib/ChargeBee.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "ChargeBee API client implementation for PHP", + "homepage": "https://github.com/chargebee/chargebee-php", + "keywords": [ + "chargebee", + "payments", + "recurring billing", + "subscription billing" + ], + "support": { + "issues": "https://github.com/chargebee/chargebee-php/issues", + "source": "https://github.com/chargebee/chargebee-php/tree/v2.8.3" + }, + "time": "2021-07-22T06:25:07+00:00" + }, + { + "name": "curl/cacert", + "version": "0.0.1", + "dist": { + "type": "file", + "url": "https://curl.se/ca/cacert.pem" + }, + "type": "library" + }, + { + "name": "erusev/parsedown", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "6598f3860c2698fe2f0f1bc98212fc01d0a1893c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/6598f3860c2698fe2f0f1bc98212fc01d0a1893c", + "reference": "6598f3860c2698fe2f0f1bc98212fc01d0a1893c", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "support": { + "issues": "https://github.com/erusev/parsedown/issues", + "source": "https://github.com/erusev/parsedown/tree/master" + }, + "time": "2020-08-09T14:12:21+00:00" + }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.13.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75", + "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75", + "shasum": "" + }, + "require": { + "php": ">=5.2" + }, + "require-dev": { + "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd" + }, + "type": "library", + "autoload": { + "psr-0": { + "HTMLPurifier": "library/" + }, + "files": [ + "library/HTMLPurifier.composer.php" + ], + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/master" + }, + "time": "2020-06-29T00:56:53+00:00" + }, + { + "name": "facebook/graph-sdk", + "version": "5.7.0", + "source": { + "type": "git", + "url": "https://github.com/facebook/php-graph-sdk.git", + "reference": "2d8250638b33d73e7a87add65f47fabf91f8ad9b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facebook/php-graph-sdk/zipball/2d8250638b33d73e7a87add65f47fabf91f8ad9b", + "reference": "2d8250638b33d73e7a87add65f47fabf91f8ad9b", + "shasum": "" + }, + "require": { + "php": "^5.4|^7.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "~5.0", + "mockery/mockery": "~0.8", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "guzzlehttp/guzzle": "Allows for implementation of the Guzzle HTTP client", + "paragonie/random_compat": "Provides a better CSPRNG option in PHP 5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Facebook\\": "src/Facebook/" + }, + "files": [ + "src/Facebook/polyfills.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Facebook Platform" + ], + "authors": [ + { + "name": "Facebook", + "homepage": "https://github.com/facebook/php-graph-sdk/contributors" + } + ], + "description": "Facebook SDK for PHP", + "homepage": "https://github.com/facebook/php-graph-sdk", + "keywords": [ + "facebook", + "sdk" + ], + "support": { + "issues": "https://github.com/facebook/php-graph-sdk/issues", + "source": "https://github.com/facebook/php-graph-sdk/tree/5.7.0" + }, + "time": "2018-12-11T22:56:31+00:00" + }, + { + "name": "ffmpeg/ffmpeg", + "version": "4.4.0", + "dist": { + "type": "file", + "url": "https://github.com/eugeneware/ffmpeg-static/releases/download/b4.4/linux-x64" + }, + "type": "library" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "1dc8d9cba3897165e16d12bb13d813afb1eb3fe7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/1dc8d9cba3897165e16d12bb13d813afb1eb3fe7", + "reference": "1dc8d9cba3897165e16d12bb13d813afb1eb3fe7", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.0.0" + }, + "time": "2021-06-30T20:03:07+00:00" + }, + { + "name": "intervention/image", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/Intervention/image.git", + "reference": "0925f10b259679b5d8ca58f3a2add9255ffcda45" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Intervention/image/zipball/0925f10b259679b5d8ca58f3a2add9255ffcda45", + "reference": "0925f10b259679b5d8ca58f3a2add9255ffcda45", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "guzzlehttp/psr7": "~1.1 || ^2.0", + "php": ">=5.4.0" + }, + "require-dev": { + "mockery/mockery": "~0.9.2", + "phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15" + }, + "suggest": { + "ext-gd": "to use GD library based image processing.", + "ext-imagick": "to use Imagick based image processing.", + "intervention/imagecache": "Caching extension for the Intervention Image library" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + }, + "laravel": { + "providers": [ + "Intervention\\Image\\ImageServiceProvider" + ], + "aliases": { + "Image": "Intervention\\Image\\Facades\\Image" + } + } + }, + "autoload": { + "psr-4": { + "Intervention\\Image\\": "src/Intervention/Image" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Vogel", + "email": "oliver@olivervogel.com", + "homepage": "http://olivervogel.com/" + } + ], + "description": "Image handling and manipulation library with support for Laravel integration", + "homepage": "http://image.intervention.io/", + "keywords": [ + "gd", + "image", + "imagick", + "laravel", + "thumbnail", + "watermark" + ], + "support": { + "issues": "https://github.com/Intervention/image/issues", + "source": "https://github.com/Intervention/image/tree/2.6.1" + }, + "funding": [ + { + "url": "https://www.paypal.me/interventionphp", + "type": "custom" + }, + { + "url": "https://github.com/Intervention", + "type": "github" + } + ], + "time": "2021-07-22T14:31:53+00:00" + }, + { + "name": "lusitanian/oauth", + "version": "v0.8.11", + "source": { + "type": "git", + "url": "https://github.com/Lusitanian/PHPoAuthLib.git", + "reference": "fc11a53db4b66da555a6a11fce294f574a8374f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Lusitanian/PHPoAuthLib/zipball/fc11a53db4b66da555a6a11fce294f574a8374f9", + "reference": "fc11a53db4b66da555a6a11fce294f574a8374f9", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*", + "predis/predis": "0.8.*@dev", + "squizlabs/php_codesniffer": "2.*", + "symfony/http-foundation": "~2.1" + }, + "suggest": { + "ext-openssl": "Allows for usage of secure connections with the stream-based HTTP client.", + "predis/predis": "Allows using the Redis storage backend.", + "symfony/http-foundation": "Allows using the Symfony Session storage backend." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.1-dev" + } + }, + "autoload": { + "psr-0": { + "OAuth": "src", + "OAuth\\Unit": "tests" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Desberg", + "email": "david@daviddesberg.com" + }, + { + "name": "Elliot Chance", + "email": "elliotchance@gmail.com" + }, + { + "name": "Pieter Hordijk", + "email": "info@pieterhordijk.com" + } + ], + "description": "PHP 5.3+ oAuth 1/2 Library", + "keywords": [ + "Authentication", + "authorization", + "oauth", + "security" + ], + "support": { + "issues": "https://github.com/Lusitanian/PHPoAuthLib/issues", + "source": "https://github.com/Lusitanian/PHPoAuthLib/tree/master" + }, + "time": "2018-02-14T22:37:14+00:00" + }, + { + "name": "matthiasmullie/minify", + "version": "1.3.66", + "source": { + "type": "git", + "url": "https://github.com/matthiasmullie/minify.git", + "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", + "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "matthiasmullie/path-converter": "~1.1", + "php": ">=5.3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.0", + "matthiasmullie/scrapbook": "dev-master", + "phpunit/phpunit": ">=4.8" + }, + "suggest": { + "psr/cache-implementation": "Cache implementation to use with Minify::cache" + }, + "bin": [ + "bin/minifycss", + "bin/minifyjs" + ], + "type": "library", + "autoload": { + "psr-4": { + "MatthiasMullie\\Minify\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthias Mullie", + "email": "minify@mullie.eu", + "homepage": "http://www.mullie.eu", + "role": "Developer" + } + ], + "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", + "homepage": "http://www.minifier.org", + "keywords": [ + "JS", + "css", + "javascript", + "minifier", + "minify" + ], + "support": { + "issues": "https://github.com/matthiasmullie/minify/issues", + "source": "https://github.com/matthiasmullie/minify/tree/1.3.66" + }, + "funding": [ + { + "url": "https://github.com/[user1", + "type": "github" + }, + { + "url": "https://github.com/matthiasmullie] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.", + "type": "github" + }, + { + "url": "https://github.com/user2", + "type": "github" + } + ], + "time": "2021-01-06T15:18:10+00:00" + }, + { + "name": "matthiasmullie/path-converter", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/matthiasmullie/path-converter.git", + "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MatthiasMullie\\PathConverter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthias Mullie", + "email": "pathconverter@mullie.eu", + "homepage": "http://www.mullie.eu", + "role": "Developer" + } + ], + "description": "Relative path converter", + "homepage": "http://github.com/matthiasmullie/path-converter", + "keywords": [ + "converter", + "path", + "paths", + "relative" + ], + "support": { + "issues": "https://github.com/matthiasmullie/path-converter/issues", + "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" + }, + "time": "2019-02-05T23:41:09+00:00" + }, + { + "name": "paypal/paypal-checkout-sdk", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/paypal/Checkout-PHP-SDK.git", + "reference": "ed6a55075448308b87a8b59dcb7fedf04a048cb1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paypal/Checkout-PHP-SDK/zipball/ed6a55075448308b87a8b59dcb7fedf04a048cb1", + "reference": "ed6a55075448308b87a8b59dcb7fedf04a048cb1", + "shasum": "" + }, + "require": { + "paypal/paypalhttp": "1.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "PayPalCheckoutSdk\\": "lib/PayPalCheckoutSdk", + "Sample\\": "samples/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "https://github.com/paypal/Checkout-PHP-SDK/blob/master/LICENSE" + ], + "authors": [ + { + "name": "PayPal", + "homepage": "https://github.com/paypal/Checkout-PHP-SDK/contributors" + } + ], + "description": "PayPal's PHP SDK for Checkout REST APIs", + "homepage": "http://github.com/paypal/Checkout-PHP-SDK/", + "keywords": [ + "checkout", + "orders", + "payments", + "paypal", + "rest", + "sdk" + ], + "support": { + "issues": "https://github.com/paypal/Checkout-PHP-SDK/issues", + "source": "https://github.com/paypal/Checkout-PHP-SDK/tree/1.0.1" + }, + "time": "2019-11-07T23:16:44+00:00" + }, + { + "name": "paypal/paypalhttp", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/paypal/paypalhttp_php.git", + "reference": "1ad9b846a046f09d6135cbf2cbaa7701bbc630a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paypal/paypalhttp_php/zipball/1ad9b846a046f09d6135cbf2cbaa7701bbc630a3", + "reference": "1ad9b846a046f09d6135cbf2cbaa7701bbc630a3", + "shasum": "" + }, + "require": { + "ext-curl": "*" + }, + "require-dev": { + "phpunit/phpunit": "^5.7", + "wiremock-php/wiremock-php": "1.43.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PayPalHttp\\": "lib/PayPalHttp" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PayPal", + "homepage": "https://github.com/paypal/paypalhttp_php/contributors" + } + ], + "support": { + "issues": "https://github.com/paypal/paypalhttp_php/issues", + "source": "https://github.com/paypal/paypalhttp_php/tree/1.0.0" + }, + "abandoned": true, + "time": "2019-11-06T21:27:12+00:00" + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.5.1", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dd803df5ad7492e1b40637f7ebd258fee5ca7355", + "reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.2", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcompatibility/php-compatibility": "^9.3.5", + "roave/security-advisories": "dev-latest", + "squizlabs/php_codesniffer": "^3.6.0", + "yoast/phpunit-polyfills": "^1.0.0" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-only" + ], + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "support": { + "issues": "https://github.com/PHPMailer/PHPMailer/issues", + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.1" + }, + "funding": [ + { + "url": "https://github.com/Synchro", + "type": "github" + } + ], + "time": "2021-08-18T09:14:16+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2019-04-30T12:38:16+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "recurly/recurly-client", + "version": "2.10.7", + "source": { + "type": "git", + "url": "https://github.com/recurly/recurly-client-php.git", + "reference": "f60e9247b56617c9d5a9c6368b701a17b957992b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/recurly/recurly-client-php/zipball/f60e9247b56617c9d5a9c6368b701a17b957992b", + "reference": "f60e9247b56617c9d5a9c6368b701a17b957992b", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">= 5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "4.2.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "lib" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "The PHP client library for the Recurly API", + "homepage": "https://github.com/recurly/recurly-client-php", + "keywords": [ + "pay", + "payments", + "recurly" + ], + "support": { + "issues": "https://github.com/recurly/recurly-client-php/issues", + "source": "https://github.com/recurly/recurly-client-php/tree/2.10.7" + }, + "time": "2020-10-01T22:47:27+00:00" + }, + { + "name": "snipe/banbuilder", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/snipe/banbuilder.git", + "reference": "621d6d857400983d0fd6cd291f105a835a317748" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/snipe/banbuilder/zipball/621d6d857400983d0fd6cd291f105a835a317748", + "reference": "621d6d857400983d0fd6cd291f105a835a317748", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.0" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "Snipe\\BanBuilder\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0" + ], + "authors": [ + { + "name": "snipe", + "email": "snipe@snipe.net", + "role": "Creator & Developer" + } + ], + "description": "Library to easily handle profanity filtering in PHP projects.", + "homepage": "http://banbuilder.com", + "keywords": [ + "filter", + "language", + "profanity", + "strings", + "swear" + ], + "support": { + "issues": "https://github.com/snipe/banbuilder/issues", + "source": "https://github.com/snipe/banbuilder/tree/2.3.0" + }, + "time": "2018-08-30T22:45:56+00:00" + }, + { + "name": "stripe/stripe-php", + "version": "v7.95.0", + "source": { + "type": "git", + "url": "https://github.com/stripe/stripe-php.git", + "reference": "ed372a1f6430b06dda408bb33b27d2be35ceaf07" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/ed372a1f6430b06dda408bb33b27d2be35ceaf07", + "reference": "ed372a1f6430b06dda408bb33b27d2be35ceaf07", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "2.17.1", + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.3", + "symfony/process": "~3.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Stripe\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stripe and contributors", + "homepage": "https://github.com/stripe/stripe-php/contributors" + } + ], + "description": "Stripe PHP Library", + "homepage": "https://stripe.com/", + "keywords": [ + "api", + "payment processing", + "stripe" + ], + "support": { + "issues": "https://github.com/stripe/stripe-php/issues", + "source": "https://github.com/stripe/stripe-php/tree/v7.95.0" + }, + "time": "2021-09-02T02:30:40+00:00" + }, + { + "name": "tpyo/amazon-s3-php-class", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/unaio/amazon-s3-php-class.git", + "reference": "3f720a0144843c214b9444e626119dbe12ecc180" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/unaio/amazon-s3-php-class/zipball/3f720a0144843c214b9444e626119dbe12ecc180", + "reference": "3f720a0144843c214b9444e626119dbe12ecc180", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "default-branch": true, + "type": "library", + "autoload": { + "classmap": [ + "S3.php" + ] + }, + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Donovan Schönknecht", + "email": "don@tpyo.net" + } + ], + "description": "A standalone Amazon S3 (REST) client for PHP 5.2.x using CURL that does not require PEAR.", + "homepage": "https://github.com/tpyo/amazon-s3-php-class", + "support": { + "source": "https://github.com/unaio/amazon-s3-php-class/tree/master" + }, + "time": "2021-09-02T09:17:14+00:00" + }, + { + "name": "twilio/sdk", + "version": "5.42.2", + "source": { + "type": "git", + "url": "https://github.com/twilio/twilio-php.git", + "reference": "0cfcb871b18a9c427dd9e8f0ed7458d43009b48a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twilio/twilio-php/zipball/0cfcb871b18a9c427dd9e8f0ed7458d43009b48a", + "reference": "0cfcb871b18a9c427dd9e8f0ed7458d43009b48a", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "apigen/apigen": "^4.1", + "guzzlehttp/guzzle": "^6.3", + "phpunit/phpunit": ">=4.5" + }, + "suggest": { + "guzzlehttp/guzzle": "An HTTP client to execute the API requests" + }, + "type": "library", + "autoload": { + "psr-4": { + "Twilio\\": "src/Twilio/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Twilio API Team", + "email": "api@twilio.com" + } + ], + "description": "A PHP wrapper for Twilio's API", + "homepage": "http://github.com/twilio/twilio-php", + "keywords": [ + "api", + "sms", + "twilio" + ], + "support": { + "issues": "https://github.com/twilio/twilio-php/issues", + "source": "https://github.com/twilio/twilio-php/tree/5.42.2" + }, + "time": "2020-02-05T19:55:13+00:00" + }, + { + "name": "unaio/amazon-s3-php-class-hmac-v2", + "version": "0.5", + "source": { + "type": "git", + "url": "https://github.com/unaio/amazon-s3-php-class-hmac-v2", + "reference": "main" + }, + "type": "library" + }, + { + "name": "wikimedia/less.php", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/wikimedia/less.php.git", + "reference": "a486d78b9bd16b72f237fc6093aa56d69ce8bd13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wikimedia/less.php/zipball/a486d78b9bd16b72f237fc6093aa56d69ce8bd13", + "reference": "a486d78b9bd16b72f237fc6093aa56d69ce8bd13", + "shasum": "" + }, + "require": { + "php": ">=7.2.9" + }, + "require-dev": { + "mediawiki/mediawiki-codesniffer": "34.0.0", + "mediawiki/minus-x": "1.0.0", + "php-parallel-lint/php-console-highlighter": "0.5.0", + "php-parallel-lint/php-parallel-lint": "1.2.0", + "phpunit/phpunit": "^8.5" + }, + "bin": [ + "bin/lessc" + ], + "type": "library", + "autoload": { + "psr-0": { + "Less": "lib/" + }, + "classmap": [ + "lessc.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Josh Schmidt", + "homepage": "https://github.com/oyejorge" + }, + { + "name": "Matt Agar", + "homepage": "https://github.com/agar" + }, + { + "name": "Martin Jantošovič", + "homepage": "https://github.com/Mordred" + } + ], + "description": "PHP port of the Javascript version of LESS http://lesscss.org (Originally maintained by Josh Schmidt)", + "keywords": [ + "css", + "less", + "less.js", + "lesscss", + "php", + "stylesheet" + ], + "support": { + "issues": "https://github.com/wikimedia/less.php/issues", + "source": "https://github.com/wikimedia/less.php/tree/v3.1.0" + }, + "time": "2020-12-11T19:33:31+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "akeeba/s3": 20, + "tpyo/amazon-s3-php-class": 20, + "snipe/banbuilder": 20, + "erusev/parsedown": 20, + "avto-dev/composer-cleanup-plugin": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.1.0" +} diff --git a/inc/classes/BxDolHTMLPurifierFilterAddBxLinksClass.php b/inc/classes/BxDolHTMLPurifierFilterAddBxLinksClass.php new file mode 100644 index 0000000000..a7c1739ca9 --- /dev/null +++ b/inc/classes/BxDolHTMLPurifierFilterAddBxLinksClass.php @@ -0,0 +1,36 @@ +loadHTML('
' . $sHtml . '
'); + $xpath = new DOMXpath($dom); + + $oLinks = $xpath->evaluate('//a'); + for ($i = 0; $i < $oLinks->length; $i++) { + $oLink = $oLinks->item($i); + + $sClasses = $oLink->getAttribute('class'); + if (!$sClasses || false === strpos($sClasses, $this->class)) + $sClasses = ($sClasses ? $sClasses . ' ' : '') . $this->class; + + $oLink->removeAttribute('class'); + $oLink->setAttribute("class", $sClasses); + } + + if (false === ($s = $dom->saveXML($dom->getElementById($sId)))) // in case of error return original string + return $sHtml; + + return mb_substr($s, 52, -6); // strip added tags + } +} + diff --git a/inc/classes/BxDolHTMLPurifierFilterLocalIframe.php b/inc/classes/BxDolHTMLPurifierFilterLocalIframe.php new file mode 100644 index 0000000000..83bcecca38 --- /dev/null +++ b/inc/classes/BxDolHTMLPurifierFilterLocalIframe.php @@ -0,0 +1,43 @@ +", "", $sHtml); + if (preg_match_all("//si", $sHtml, $aResult)) { + foreach ($aResult[1] as $key => $sItem) { + preg_match('/width="([0-9]+)"/', $sItem, $width); + $iWidth = $width[1]; + preg_match('/height="([0-9]+)"/', $sItem, $height); + $iHeight = $height[1]; + $sDolUrl = preg_quote(BX_DOL_URL_ROOT); + $sIframeUrl = ''; + if (preg_match("#({$sDolUrl}[a-zA-Z0-9_=\-\?\&\/]+)#", $sItem, $aMatches)) + $sIframeUrl = $aMatches[1]; + if (preg_match("#src=\"(((?!//)(?![a-z]+://)(?![a-z]+://))[a-zA-Z0-9_=\-\?\&\/]+)#", $sItem, $aMatches)) + $sIframeUrl = $aMatches[1]; + if ($sIframeUrl) + $sHtml = str_replace($aResult[0][$key], '', $sHtml); + } + } + } + return $sHtml; + } + + public function postFilter($sHtml, $config, $context) + { + $sPostRegex = '#]+)>#'; + $sHtml = preg_replace_callback($sPostRegex, array($this, 'postFilterCallback'), $sHtml); + return $sHtml; + } + + protected function postFilterCallback($aMatches) + { + return ''; + } +} + diff --git a/inc/classes/BxDolHTMLPurifierFilterYouTube.php b/inc/classes/BxDolHTMLPurifierFilterYouTube.php new file mode 100644 index 0000000000..62171f4180 --- /dev/null +++ b/inc/classes/BxDolHTMLPurifierFilterYouTube.php @@ -0,0 +1,65 @@ +]+>.+?' . + '(?:http:)?//www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?#s'; + $pre_replace = '\1'; + return preg_replace($pre_regex, $pre_replace, $html); + } + + /** + * @param string $html + * @param HTMLPurifier_Config $config + * @param HTMLPurifier_Context $context + * @return string + */ + public function postFilter($html, $config, $context) + { + $post_regex = '#((?:v|cp)/[A-Za-z0-9\-_=]+)#'; + return preg_replace_callback($post_regex, array($this, 'postFilterCallback'), $html); + } + + /** + * @param $url + * @return string + */ + protected function armorUrl($url) + { + return str_replace('--', '--', $url); + } + + /** + * @param array $matches + * @return string + */ + protected function postFilterCallback($matches) + { + $url = $this->armorUrl($matches[1]); + return '' . + '' . + '' . + ''; + } +} + +// vim: et sw=4 sts=4 diff --git a/inc/classes/BxDolHTMLPurifierFilterYoutubeIframe.php b/inc/classes/BxDolHTMLPurifierFilterYoutubeIframe.php new file mode 100644 index 0000000000..2ce089b387 --- /dev/null +++ b/inc/classes/BxDolHTMLPurifierFilterYoutubeIframe.php @@ -0,0 +1,40 @@ +", "", $html); + if (preg_match_all("//si", $html, $result)) { + foreach ($result[1] as $key => $item) { + preg_match('/width="([0-9]+)"/', $item, $width); + $width = $width[1]; + preg_match('/height="([0-9]+)"/', $item, $height); + $height = $height[1]; + if (preg_match('/((\/\/www\.youtube\.com\/embed\/)|(\/\/www\.youtube-nocookie\.com\/embed\/)|(\/\/www.youtube.com\/v\/))([a-zA-Z0-9_-]+)/', $item, $id)) { + $id = $id[5]; + $sProto = 0 == strncmp('https', BX_DOL_URL_ROOT, 5) ? 'https' : 'http'; + $html = str_replace($result[0][$key], '', $html); + } + } + } + } + return $html; + } + + public function postFilter($html, $config, $context) + { + $post_regex = '#]+)>#'; + $html = preg_replace_callback($post_regex, array($this, 'postFilterCallback'), $html); + return $html; + } + + protected function postFilterCallback($matches) + { + return ''; + } +} + diff --git a/inc/classes/BxDolImageResize.php b/inc/classes/BxDolImageResize.php index 08fd08d62b..83ee4eb720 100644 --- a/inc/classes/BxDolImageResize.php +++ b/inc/classes/BxDolImageResize.php @@ -7,16 +7,6 @@ * @{ */ -spl_autoload_register(function ($sClass) { - // autoload Intervention Image files - $sClass = trim($sClass, '\\'); - if (0 === strncmp('Intervention', $sClass, 12)) { - $sFile = BX_DIRECTORY_PATH_PLUGINS . 'intervention-image/' . str_replace('\\', '/', $sClass) . '.php'; - if (file_exists($sFile)) - require_once($sFile); - } -}); - define('IMAGE_ERROR_SUCCESS', 0); ///< operation was successfull define('IMAGE_ERROR_WRONG_TYPE', 2); ///< operation failed, most probably because incorrect image format(or not image file) was provided diff --git a/inc/classes/BxDolMinify.php b/inc/classes/BxDolMinify.php index fe47caffa8..371d701b5d 100644 --- a/inc/classes/BxDolMinify.php +++ b/inc/classes/BxDolMinify.php @@ -9,12 +9,6 @@ use MatthiasMullie\Minify; -require_once(BX_DIRECTORY_PATH_PLUGINS . 'matthiasmullie/path-converter/ConverterInterface.php'); -require_once(BX_DIRECTORY_PATH_PLUGINS . 'matthiasmullie/path-converter/Converter.php'); -require_once(BX_DIRECTORY_PATH_PLUGINS . 'matthiasmullie/minify/Minify.php'); -require_once(BX_DIRECTORY_PATH_PLUGINS . 'matthiasmullie/minify/CSS.php'); -require_once(BX_DIRECTORY_PATH_PLUGINS . 'matthiasmullie/minify/JS.php'); - class BxDolMinify extends BxDolFactory implements iBxDolSingleton { protected function __construct() diff --git a/inc/classes/BxDolStorageS3.php b/inc/classes/BxDolStorageS3.php index 018b4280b9..12a448b792 100644 --- a/inc/classes/BxDolStorageS3.php +++ b/inc/classes/BxDolStorageS3.php @@ -42,7 +42,7 @@ public function __construct($aObject) protected function init ($aObject) { - require_once(BX_DIRECTORY_PATH_PLUGINS . 'amazon-s3/S3.php'); + require_once(BX_DIRECTORY_PATH_PLUGINS . 'unaio/amazon-s3-php-class-hmac-v2/S3.php'); $this->_s3 = new S3( getParam('sys_storage_s3_access_key'), getParam('sys_storage_s3_secret_key'), diff --git a/inc/classes/BxDolStorageS3v4.php b/inc/classes/BxDolStorageS3v4.php index 210d9273ec..29e588db2e 100644 --- a/inc/classes/BxDolStorageS3v4.php +++ b/inc/classes/BxDolStorageS3v4.php @@ -15,8 +15,8 @@ class BxDolStorageS3v4 extends BxDolStorageS3 { protected function init ($aObject) { - require_once(BX_DIRECTORY_PATH_PLUGINS . 'amazon-s3/S3.php'); - require_once(BX_DIRECTORY_PATH_PLUGINS . 'amazon-s3/S3v4.php'); + require_once(BX_DIRECTORY_PATH_PLUGINS . 'unaio/amazon-s3-php-class-hmac-v2/S3.php'); + require_once(BX_DIRECTORY_PATH_PLUGINS . 'tpyo/amazon-s3-php-class/S3.php'); // HMAC v4 $this->_s3 = new S3v4\S3( getParam('sys_storage_s3_access_key'), getParam('sys_storage_s3_secret_key'), diff --git a/inc/classes/BxDolTemplate.php b/inc/classes/BxDolTemplate.php index eadab61b6e..c067484c5e 100644 --- a/inc/classes/BxDolTemplate.php +++ b/inc/classes/BxDolTemplate.php @@ -2178,15 +2178,12 @@ function _compileCss($sAbsolutePath, &$aIncluded) */ function _lessCss($mixed) { - require_once(BX_DIRECTORY_PATH_PLUGINS . 'lessphp/Less.php'); - if(is_array($mixed) && isset($mixed['url']) && isset($mixed['path'])) { $sPathFile = realpath($mixed['path']); $aInfoFile = pathinfo($sPathFile); if (!isset($aInfoFile['extension']) || $aInfoFile['extension'] != 'less') return $mixed; - require_once(BX_DIRECTORY_PATH_PLUGINS . 'lessphp/Cache.php'); $aFiles = array($mixed['path'] => $mixed['url']); $aOptions = array('cache_dir' => $this->_sCachePublicFolderPath, 'prefix' => $this->_sCssLessPrefix); $sFile = Less_Cache::Get($aFiles, $aOptions, $this->_oTemplateConfig->aLessConfig); diff --git a/inc/params.inc.php b/inc/params.inc.php index 859933db29..70a3d5057f 100644 --- a/inc/params.inc.php +++ b/inc/params.inc.php @@ -98,6 +98,7 @@ require_once(BX_DIRECTORY_PATH_INC . 'version.inc.php'); spl_autoload_register('bx_autoload'); +require BX_DIRECTORY_PATH_PLUGINS . 'autoload.php'; BxDolDb::getInstance()->cacheParams(); diff --git a/inc/utils.inc.php b/inc/utils.inc.php index 1f10e568cc..26482c93d6 100644 --- a/inc/utils.inc.php +++ b/inc/utils.inc.php @@ -573,8 +573,6 @@ function clear_xss($val) global $oHtmlPurifier; if (!isset($oHtmlPurifier) && !$GLOBALS['logged']['admin']) { - require_once( BX_DIRECTORY_PATH_PLUGINS . 'htmlpurifier/HTMLPurifier.standalone.php' ); - HTMLPurifier_Bootstrap::registerAutoload(); $oConfig = HTMLPurifier_Config::createDefault(); @@ -593,7 +591,7 @@ function clear_xss($val) $oConfig->set('HTML.Nofollow', 'true'); } - $oConfig->set('Filter.Custom', array (new HTMLPurifier_Filter_YouTube(), new HTMLPurifier_Filter_YoutubeIframe(), new HTMLPurifier_Filter_AddBxLinksClass(), new HTMLPurifier_Filter_LocalIframe())); + $oConfig->set('Filter.Custom', array (new BxDolHTMLPurifierFilterYouTube(), new BxDolHTMLPurifierFilterYoutubeIframe(), new BxDolHTMLPurifierFilterAddBxLinksClass(), new BxDolHTMLPurifierFilterLocalIframe())); $oConfig->set('HTML.DefinitionID', 'html5-definitions'); $oConfig->set('HTML.DefinitionRev', 1); @@ -781,11 +779,6 @@ function bx_autoload($sClassName) { if (0 === strncmp($sClassName, 'BxDol', 5) || 0 === strncmp($sClassName, 'BxBase', 6) || 0 === strncmp($sClassName, 'BxTempl', 7)) bx_import($sClassName); - else { - if (0 === strpos($sClassName, 'Akeeba\Engine\Postproc\Connector\S3v4')) { - require_once(BX_DIRECTORY_PATH_PLUGINS . 'akeeba-s3/src' . str_replace('\\', '/', substr($sClassName, 37)) . '.php'); - } - } } /** @@ -953,7 +946,7 @@ function bx_file_get_contents($sFileUrl, $aParams = array(), $sMethod = 'get', $ $sResult = curl_exec($rConnect); if (curl_errno($rConnect) == 60) { // CURLE_SSL_CACERT - curl_setopt($rConnect, CURLOPT_CAINFO, BX_DIRECTORY_PATH_PLUGINS . 'curl/cacert.pem'); + curl_setopt($rConnect, CURLOPT_CAINFO, BX_DIRECTORY_PATH_PLUGINS . 'curl/cacert/cacert.pem'); $sResult = curl_exec($rConnect); } diff --git a/install/classes/BxDolInstallView.php b/install/classes/BxDolInstallView.php index ed3b0c12b5..ca218343b6 100644 --- a/install/classes/BxDolInstallView.php +++ b/install/classes/BxDolInstallView.php @@ -93,7 +93,6 @@ protected function _getFilesJS() protected function _getInlineCSS() { - require_once($this->_sDirPlugins . 'lessphp/Less.php'); $oLessParser = new Less_Parser(); $oConfigBase = new BxBaseConfig(); diff --git a/install/index.php b/install/index.php index 80c62624f8..86d0b8f559 100644 --- a/install/index.php +++ b/install/index.php @@ -49,6 +49,8 @@ require_once(BX_INSTALL_DIR_CLASSES . 'BxDolInstallLang.php'); require_once(BX_INSTALL_DIR_CLASSES . 'BxDolInstallSiteConfig.php'); +require BX_INSTALL_DIR_PLUGINS . 'autoload.php'; + $oController = new BxDolInstallController (); $oController->run(isset($_REQUEST['action']) ? $_REQUEST['action'] : ''); diff --git a/modules/boonex/antispam/classes/BxAntispamAkismet.php b/modules/boonex/antispam/classes/BxAntispamAkismet.php index c0b79c399a..cb8ea8a4d9 100644 --- a/modules/boonex/antispam/classes/BxAntispamAkismet.php +++ b/modules/boonex/antispam/classes/BxAntispamAkismet.php @@ -21,7 +21,7 @@ public function __construct($iAccoutId = 0) parent::__construct(); $sKey = getParam('bx_antispam_akismet_api_key'); if ($sKey && $oAccount = BxDolAccount::getInstance((int)$iAccoutId)) { - require_once (BX_DIRECTORY_PATH_PLUGINS . 'akismet/Akismet.class.php'); + require_once (BX_DIRECTORY_PATH_PLUGINS . 'achingbrain/php5-akismet/src/main/php/net/achingbrain/Akismet.class.php'); $this->oAkismet = new Akismet(BX_DOL_URL_ROOT, $sKey); $oProfile = BxDolProfile::getInstanceByAccount((int)$iAccoutId); diff --git a/modules/boonex/antispam/classes/BxAntispamProfanityFilter.php b/modules/boonex/antispam/classes/BxAntispamProfanityFilter.php index 5a168914f1..197bd761f1 100644 --- a/modules/boonex/antispam/classes/BxAntispamProfanityFilter.php +++ b/modules/boonex/antispam/classes/BxAntispamProfanityFilter.php @@ -20,13 +20,12 @@ class BxAntispamProfanityFilter extends BxDol { protected $oProfanityFilter = null; - protected $sPluginPath = BX_DIRECTORY_PATH_PLUGINS . 'banbuilder/src/'; + protected $sPluginPath = BX_DIRECTORY_PATH_PLUGINS . 'snipe/banbuilder/src/'; public function __construct() { parent::__construct(); - require_once ($this->sPluginPath .'CensorWords.php'); $sClassName = 'Snipe\BanBuilder\CensorWords'; $this->oProfanityFilter = new $sClassName; diff --git a/modules/boonex/facebook_connect/classes/BxFaceBookConnectModule.php b/modules/boonex/facebook_connect/classes/BxFaceBookConnectModule.php index 1362c91225..58e9f3db9e 100644 --- a/modules/boonex/facebook_connect/classes/BxFaceBookConnectModule.php +++ b/modules/boonex/facebook_connect/classes/BxFaceBookConnectModule.php @@ -31,8 +31,6 @@ function __construct(&$aModule) { parent::__construct($aModule); - require_once(BX_DIRECTORY_PATH_PLUGINS . 'facebook-php-sdk/src/Facebook/autoload.php'); - // Create our Application instance. $this -> oFacebook = null; diff --git a/modules/boonex/payment/classes/BxPaymentProviderChargebee.php b/modules/boonex/payment/classes/BxPaymentProviderChargebee.php index 8e388ebe9a..81747b1df1 100644 --- a/modules/boonex/payment/classes/BxPaymentProviderChargebee.php +++ b/modules/boonex/payment/classes/BxPaymentProviderChargebee.php @@ -9,8 +9,6 @@ * @{ */ -require_once(BX_DIRECTORY_PATH_PLUGINS . 'chargebee/ChargeBee.php'); - define('CBEE_MODE_LIVE', 1); define('CBEE_MODE_TEST', 2); diff --git a/modules/boonex/payment/classes/BxPaymentProviderPayPal.php b/modules/boonex/payment/classes/BxPaymentProviderPayPal.php index d18028bd5a..375be25427 100644 --- a/modules/boonex/payment/classes/BxPaymentProviderPayPal.php +++ b/modules/boonex/payment/classes/BxPaymentProviderPayPal.php @@ -262,7 +262,7 @@ protected function _readValidationData($sConnectionUrl, $sRequest) $sResponse = curl_exec($rConnect); if(curl_errno($rConnect) == 60) { // CURLE_SSL_CACERT - curl_setopt($rConnect, CURLOPT_CAINFO, BX_DIRECTORY_PATH_PLUGINS . 'curl/cacert.pem'); + curl_setopt($rConnect, CURLOPT_CAINFO, BX_DIRECTORY_PATH_PLUGINS . 'curl/cacert/cacert.pem'); $sResponse = curl_exec($rConnect); } diff --git a/modules/boonex/payment/classes/BxPaymentProviderPayPalApi.php b/modules/boonex/payment/classes/BxPaymentProviderPayPalApi.php index f899f1d8b1..1973175329 100644 --- a/modules/boonex/payment/classes/BxPaymentProviderPayPalApi.php +++ b/modules/boonex/payment/classes/BxPaymentProviderPayPalApi.php @@ -35,8 +35,6 @@ * */ -require_once(BX_DIRECTORY_PATH_PLUGINS . 'paypal/autoload.php'); - use PayPalCheckoutSdk\Core\PayPalHttpClient; use PayPalCheckoutSdk\Core\SandboxEnvironment; use PayPalCheckoutSdk\Core\ProductionEnvironment; diff --git a/modules/boonex/payment/classes/BxPaymentProviderRecurly.php b/modules/boonex/payment/classes/BxPaymentProviderRecurly.php index 0d04cb4c65..cfa8141b19 100644 --- a/modules/boonex/payment/classes/BxPaymentProviderRecurly.php +++ b/modules/boonex/payment/classes/BxPaymentProviderRecurly.php @@ -9,8 +9,6 @@ * @{ */ -require_once(BX_DIRECTORY_PATH_PLUGINS . 'recurly/recurly.php'); - define('RCRL_MODE_LIVE', 1); define('RCRL_MODE_TEST', 2); diff --git a/modules/boonex/payment/classes/BxPaymentProviderStripeBasic.php b/modules/boonex/payment/classes/BxPaymentProviderStripeBasic.php index 470d733fc4..c7e7012db4 100644 --- a/modules/boonex/payment/classes/BxPaymentProviderStripeBasic.php +++ b/modules/boonex/payment/classes/BxPaymentProviderStripeBasic.php @@ -9,8 +9,6 @@ * @{ */ -require_once(BX_DIRECTORY_PATH_PLUGINS . 'stripe/init.php'); - define('STRP_MODE_LIVE', 1); define('STRP_MODE_TEST', 2); diff --git a/modules/boonex/smtpmailer/classes/BxSMTPModule.php b/modules/boonex/smtpmailer/classes/BxSMTPModule.php index b260227e9b..495010a8a4 100644 --- a/modules/boonex/smtpmailer/classes/BxSMTPModule.php +++ b/modules/boonex/smtpmailer/classes/BxSMTPModule.php @@ -9,10 +9,6 @@ * @{ */ -require_once (BX_DIRECTORY_PATH_PLUGINS . "phpmailer/Exception.php"); -require_once (BX_DIRECTORY_PATH_PLUGINS . "phpmailer/PHPMailer.php"); -require_once (BX_DIRECTORY_PATH_PLUGINS . "phpmailer/SMTP.php"); - class BxSMTPModule extends BxDolModule { function __construct(&$aModule) diff --git a/modules/boonex/stripe_connect/classes/BxStripeConnectModule.php b/modules/boonex/stripe_connect/classes/BxStripeConnectModule.php index 72b9eb5de2..5b6f5eaf83 100644 --- a/modules/boonex/stripe_connect/classes/BxStripeConnectModule.php +++ b/modules/boonex/stripe_connect/classes/BxStripeConnectModule.php @@ -9,8 +9,6 @@ * @{ */ -require_once(BX_DIRECTORY_PATH_PLUGINS . 'stripe/init.php'); - define('BX_STRIPE_CONNECT_MODE_LIVE', 'live'); define('BX_STRIPE_CONNECT_MODE_TEST', 'test'); diff --git a/modules/boonex/twitter_connect/classes/BxTwitterModule.php b/modules/boonex/twitter_connect/classes/BxTwitterModule.php index 9ced0f1cb8..3da1675335 100644 --- a/modules/boonex/twitter_connect/classes/BxTwitterModule.php +++ b/modules/boonex/twitter_connect/classes/BxTwitterModule.php @@ -13,9 +13,6 @@ use OAuth\Common\Storage\Session; use OAuth\Common\Consumer\Credentials; -require_once (BX_DIRECTORY_PATH_PLUGINS . 'OAuth/bootstrap.php'); -require_once (BX_DIRECTORY_PATH_PLUGINS . 'OAuth/ServiceFactory.php'); - class BxTwitterModule extends BxBaseModConnectModule { protected $_oStorage; diff --git a/studio/classes/BxDolStudioOAuthPlugin.php b/studio/classes/BxDolStudioOAuthPlugin.php index 3f8bbbe64d..5b6c112ede 100644 --- a/studio/classes/BxDolStudioOAuthPlugin.php +++ b/studio/classes/BxDolStudioOAuthPlugin.php @@ -15,8 +15,6 @@ use OAuth\Common\Storage\Exception\TokenNotFoundException; use OAuth\Common\Consumer\Credentials; -require_once (BX_DIRECTORY_PATH_PLUGINS . 'OAuth/bootstrap.php'); - class BxDolStudioOAuthPlugin extends BxDolStudioOAuthOAuth1 implements iBxDolSingleton { protected $sService;