From 49dde388fef7bb2153f031b06935dafaa2e8232d Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 30 Apr 2021 19:57:32 +0900 Subject: [PATCH] Update composer dependencies --- composer.lock | 55 +- vendor/composer/InstalledVersions.php | 34 +- vendor/composer/ca-bundle/composer.json | 12 +- vendor/composer/ca-bundle/phpstan.neon.dist | 5 + vendor/composer/ca-bundle/res/cacert.pem | 146 ++-- vendor/composer/ca-bundle/src/CaBundle.php | 44 +- vendor/composer/installed.json | 92 +- vendor/composer/installed.php | 34 +- vendor/guzzlehttp/promises/CHANGELOG.md | 3 + .../guzzlehttp/promises/phpstan-baseline.neon | 7 - vendor/guzzlehttp/promises/phpstan.neon.dist | 10 - vendor/guzzlehttp/promises/psalm.xml | 15 - .../guzzlehttp/promises/src/EachPromise.php | 11 +- .../guzzlehttp/psr7/.github/workflows/bc.yml | 16 + .../guzzlehttp/psr7/.github/workflows/ci.yml | 30 + .../psr7/.github/workflows/integration.yml | 37 + .../psr7/.github/workflows/static.yml | 29 + .../{promises => psr7}/.php_cs.dist | 42 +- vendor/guzzlehttp/psr7/CHANGELOG.md | 30 +- vendor/guzzlehttp/psr7/src/AppendStream.php | 2 + vendor/guzzlehttp/psr7/src/BufferStream.php | 2 + vendor/guzzlehttp/psr7/src/CachingStream.php | 6 +- vendor/guzzlehttp/psr7/src/DroppingStream.php | 2 + vendor/guzzlehttp/psr7/src/FnStream.php | 3 + vendor/guzzlehttp/psr7/src/InflateStream.php | 3 + vendor/guzzlehttp/psr7/src/LazyOpenStream.php | 4 +- vendor/guzzlehttp/psr7/src/LimitStream.php | 5 +- .../guzzlehttp/psr7/src/MultipartStream.php | 8 +- vendor/guzzlehttp/psr7/src/NoSeekStream.php | 4 +- vendor/guzzlehttp/psr7/src/PumpStream.php | 18 +- vendor/guzzlehttp/psr7/src/Query.php | 9 +- vendor/guzzlehttp/psr7/src/Request.php | 4 +- vendor/guzzlehttp/psr7/src/Response.php | 2 +- vendor/guzzlehttp/psr7/src/Rfc7230.php | 1 + vendor/guzzlehttp/psr7/src/ServerRequest.php | 11 +- .../psr7/src/StreamDecoratorTrait.php | 1 + vendor/guzzlehttp/psr7/src/StreamWrapper.php | 2 + vendor/guzzlehttp/psr7/src/UploadedFile.php | 29 +- vendor/guzzlehttp/psr7/src/Uri.php | 61 +- vendor/guzzlehttp/psr7/src/UriNormalizer.php | 2 + vendor/guzzlehttp/psr7/src/UriResolver.php | 2 + vendor/guzzlehttp/psr7/src/Utils.php | 44 +- vendor/guzzlehttp/psr7/src/functions.php | 7 +- vendor/rmccue/requests/.codecov.yml | 21 + vendor/rmccue/requests/.coveralls.yml | 4 - vendor/rmccue/requests/.gitignore | 6 - vendor/rmccue/requests/.travis.yml | 58 -- vendor/rmccue/requests/CHANGELOG.md | 523 ++++++++--- vendor/rmccue/requests/README.md | 74 +- .../requests/bin/create_pear_package.php | 55 -- vendor/rmccue/requests/composer.json | 28 +- vendor/rmccue/requests/docs/README.md | 28 - .../requests/docs/authentication-custom.md | 44 - vendor/rmccue/requests/docs/authentication.md | 31 - vendor/rmccue/requests/docs/goals.md | 29 - vendor/rmccue/requests/docs/hooks.md | 96 -- vendor/rmccue/requests/docs/proxy.md | 23 - vendor/rmccue/requests/docs/usage-advanced.md | 74 -- vendor/rmccue/requests/docs/usage.md | 154 ---- vendor/rmccue/requests/docs/why-requests.md | 192 ---- .../rmccue/requests/examples/basic-auth.php | 16 - vendor/rmccue/requests/examples/cookie.php | 16 - .../rmccue/requests/examples/cookie_jar.php | 20 - vendor/rmccue/requests/examples/get.php | 13 - vendor/rmccue/requests/examples/multiple.php | 45 - vendor/rmccue/requests/examples/post.php | 13 - vendor/rmccue/requests/examples/proxy.php | 18 - vendor/rmccue/requests/examples/session.php | 24 - vendor/rmccue/requests/examples/timeout.php | 17 - vendor/rmccue/requests/library/Requests.php | 187 ++-- .../rmccue/requests/library/Requests/Auth.php | 4 +- .../requests/library/Requests/Auth/Basic.php | 8 +- .../requests/library/Requests/Cookie.php | 37 +- .../requests/library/Requests/Cookie/Jar.php | 10 +- .../requests/library/Requests/Exception.php | 2 +- .../library/Requests/Exception/HTTP.php | 2 +- .../library/Requests/Exception/HTTP/304.php | 2 +- .../library/Requests/Exception/HTTP/400.php | 2 +- .../library/Requests/Exception/HTTP/401.php | 2 +- .../library/Requests/Exception/HTTP/402.php | 2 +- .../library/Requests/Exception/HTTP/403.php | 2 +- .../library/Requests/Exception/HTTP/404.php | 2 +- .../library/Requests/Exception/HTTP/405.php | 2 +- .../library/Requests/Exception/HTTP/406.php | 2 +- .../library/Requests/Exception/HTTP/407.php | 2 +- .../library/Requests/Exception/HTTP/408.php | 2 +- .../library/Requests/Exception/HTTP/409.php | 2 +- .../library/Requests/Exception/HTTP/410.php | 2 +- .../library/Requests/Exception/HTTP/411.php | 2 +- .../library/Requests/Exception/HTTP/412.php | 2 +- .../library/Requests/Exception/HTTP/413.php | 2 +- .../library/Requests/Exception/HTTP/414.php | 2 +- .../library/Requests/Exception/HTTP/415.php | 2 +- .../library/Requests/Exception/HTTP/416.php | 2 +- .../library/Requests/Exception/HTTP/417.php | 2 +- .../library/Requests/Exception/HTTP/418.php | 2 +- .../library/Requests/Exception/HTTP/428.php | 2 +- .../library/Requests/Exception/HTTP/429.php | 2 +- .../library/Requests/Exception/HTTP/431.php | 2 +- .../library/Requests/Exception/HTTP/500.php | 2 +- .../library/Requests/Exception/HTTP/501.php | 2 +- .../library/Requests/Exception/HTTP/502.php | 2 +- .../library/Requests/Exception/HTTP/503.php | 2 +- .../library/Requests/Exception/HTTP/504.php | 2 +- .../library/Requests/Exception/HTTP/505.php | 2 +- .../library/Requests/Exception/HTTP/511.php | 2 +- .../Requests/Exception/HTTP/Unknown.php | 2 +- .../Requests/Exception/Transport/cURL.php | 2 +- .../requests/library/Requests/Hooker.php | 2 +- .../requests/library/Requests/Hooks.php | 2 +- .../requests/library/Requests/IDNAEncoder.php | 119 ++- .../rmccue/requests/library/Requests/IPv6.php | 24 +- .../rmccue/requests/library/Requests/IRI.php | 26 +- .../requests/library/Requests/Proxy.php | 4 +- .../requests/library/Requests/Proxy/HTTP.php | 18 +- .../requests/library/Requests/Response.php | 3 +- .../library/Requests/Response/Headers.php | 4 +- .../rmccue/requests/library/Requests/SSL.php | 14 +- .../requests/library/Requests/Session.php | 6 +- .../requests/library/Requests/Transport.php | 2 +- .../library/Requests/Transport/cURL.php | 115 ++- .../library/Requests/Transport/cacert.pem | 489 ++++------- .../library/Requests/Transport/fsockopen.php | 57 +- .../Utility/CaseInsensitiveDictionary.php | 4 +- .../Requests/Utility/FilteredIterator.php | 22 +- vendor/rmccue/requests/package.xml.tpl | 60 -- vendor/rmccue/requests/phpunit.xml.dist | 43 + vendor/rmccue/requests/tests/Auth/Basic.php | 87 -- .../rmccue/requests/tests/ChunkedEncoding.php | 93 -- vendor/rmccue/requests/tests/Cookies.php | 642 -------------- vendor/rmccue/requests/tests/Encoding.php | 94 -- vendor/rmccue/requests/tests/IDNAEncoder.php | 102 --- vendor/rmccue/requests/tests/IRI.php | 413 --------- vendor/rmccue/requests/tests/Proxy/HTTP.php | 131 --- vendor/rmccue/requests/tests/Requests.php | 162 ---- .../requests/tests/Response/Headers.php | 55 -- vendor/rmccue/requests/tests/SSL.php | 108 --- vendor/rmccue/requests/tests/Session.php | 213 ----- .../rmccue/requests/tests/Transport/Base.php | 826 ------------------ .../rmccue/requests/tests/Transport/cURL.php | 5 - .../requests/tests/Transport/fsockopen.php | 5 - vendor/rmccue/requests/tests/bootstrap.php | 155 ---- vendor/rmccue/requests/tests/phpunit.xml.dist | 39 - .../requests/tests/utils/proxy/proxy.py | 5 - .../requests/tests/utils/proxy/start.sh | 11 - .../rmccue/requests/tests/utils/proxy/stop.sh | 5 - vendor/swiftmailer/swiftmailer/CHANGES | 18 + vendor/swiftmailer/swiftmailer/LICENSE | 2 +- vendor/swiftmailer/swiftmailer/README.md | 2 +- vendor/swiftmailer/swiftmailer/composer.json | 2 +- .../swiftmailer/swiftmailer/doc/sending.rst | 21 +- .../swiftmailer/lib/classes/Swift.php | 2 +- .../ByteStream/TemporaryFileByteStream.php | 10 + .../classes/Swift/Events/EventDispatcher.php | 2 - .../classes/Swift/KeyCache/DiskKeyCache.php | 5 + .../lib/classes/Swift/MailTransport.php | 47 - .../ContentEncoder/NullContentEncoder.php | 6 +- .../Mime/Headers/IdentificationHeader.php | 5 +- .../classes/Swift/Mime/SimpleHeaderSet.php | 2 +- .../classes/Swift/Mime/SimpleMimeEntity.php | 6 + .../lib/classes/Swift/SmtpTransport.php | 5 +- .../Swift/Transport/AbstractSmtpTransport.php | 27 +- .../classes/Swift/Transport/MailTransport.php | 294 ------- 163 files changed, 1765 insertions(+), 5676 deletions(-) create mode 100644 vendor/composer/ca-bundle/phpstan.neon.dist delete mode 100644 vendor/guzzlehttp/promises/phpstan-baseline.neon delete mode 100644 vendor/guzzlehttp/promises/phpstan.neon.dist delete mode 100644 vendor/guzzlehttp/promises/psalm.xml create mode 100644 vendor/guzzlehttp/psr7/.github/workflows/bc.yml create mode 100644 vendor/guzzlehttp/psr7/.github/workflows/ci.yml create mode 100644 vendor/guzzlehttp/psr7/.github/workflows/integration.yml create mode 100644 vendor/guzzlehttp/psr7/.github/workflows/static.yml rename vendor/guzzlehttp/{promises => psr7}/.php_cs.dist (50%) create mode 100644 vendor/rmccue/requests/.codecov.yml delete mode 100755 vendor/rmccue/requests/.coveralls.yml delete mode 100644 vendor/rmccue/requests/.gitignore delete mode 100644 vendor/rmccue/requests/.travis.yml delete mode 100755 vendor/rmccue/requests/bin/create_pear_package.php delete mode 100644 vendor/rmccue/requests/docs/README.md delete mode 100644 vendor/rmccue/requests/docs/authentication-custom.md delete mode 100644 vendor/rmccue/requests/docs/authentication.md delete mode 100644 vendor/rmccue/requests/docs/goals.md delete mode 100644 vendor/rmccue/requests/docs/hooks.md delete mode 100644 vendor/rmccue/requests/docs/proxy.md delete mode 100644 vendor/rmccue/requests/docs/usage-advanced.md delete mode 100644 vendor/rmccue/requests/docs/usage.md delete mode 100644 vendor/rmccue/requests/docs/why-requests.md delete mode 100644 vendor/rmccue/requests/examples/basic-auth.php delete mode 100644 vendor/rmccue/requests/examples/cookie.php delete mode 100644 vendor/rmccue/requests/examples/cookie_jar.php delete mode 100644 vendor/rmccue/requests/examples/get.php delete mode 100644 vendor/rmccue/requests/examples/multiple.php delete mode 100644 vendor/rmccue/requests/examples/post.php delete mode 100644 vendor/rmccue/requests/examples/proxy.php delete mode 100644 vendor/rmccue/requests/examples/session.php delete mode 100644 vendor/rmccue/requests/examples/timeout.php delete mode 100644 vendor/rmccue/requests/package.xml.tpl create mode 100644 vendor/rmccue/requests/phpunit.xml.dist delete mode 100644 vendor/rmccue/requests/tests/Auth/Basic.php delete mode 100644 vendor/rmccue/requests/tests/ChunkedEncoding.php delete mode 100644 vendor/rmccue/requests/tests/Cookies.php delete mode 100644 vendor/rmccue/requests/tests/Encoding.php delete mode 100644 vendor/rmccue/requests/tests/IDNAEncoder.php delete mode 100644 vendor/rmccue/requests/tests/IRI.php delete mode 100644 vendor/rmccue/requests/tests/Proxy/HTTP.php delete mode 100644 vendor/rmccue/requests/tests/Requests.php delete mode 100644 vendor/rmccue/requests/tests/Response/Headers.php delete mode 100644 vendor/rmccue/requests/tests/SSL.php delete mode 100644 vendor/rmccue/requests/tests/Session.php delete mode 100644 vendor/rmccue/requests/tests/Transport/Base.php delete mode 100644 vendor/rmccue/requests/tests/Transport/cURL.php delete mode 100644 vendor/rmccue/requests/tests/Transport/fsockopen.php delete mode 100644 vendor/rmccue/requests/tests/bootstrap.php delete mode 100644 vendor/rmccue/requests/tests/phpunit.xml.dist delete mode 100755 vendor/rmccue/requests/tests/utils/proxy/proxy.py delete mode 100755 vendor/rmccue/requests/tests/utils/proxy/start.sh delete mode 100755 vendor/rmccue/requests/tests/utils/proxy/stop.sh delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php diff --git a/composer.lock b/composer.lock index 5ab045a81..1805a66e4 100644 --- a/composer.lock +++ b/composer.lock @@ -69,16 +69,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.2.8", + "version": "1.2.9", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "8a7ecad675253e4654ea05505233285377405215" + "reference": "78a0e288fdcebf92aa2318a8d3656168da6ac1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215", - "reference": "8a7ecad675253e4654ea05505233285377405215", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/78a0e288fdcebf92aa2318a8d3656168da6ac1a5", + "reference": "78a0e288fdcebf92aa2318a8d3656168da6ac1a5", "shasum": "" }, "require": { @@ -87,14 +87,15 @@ "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8", + "phpstan/phpstan": "^0.12.55", "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "1.x-dev" } }, "autoload": { @@ -124,7 +125,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.2.8" + "source": "https://github.com/composer/ca-bundle/tree/1.2.9" }, "funding": [ { @@ -140,7 +141,7 @@ "type": "tidelift" } ], - "time": "2020-08-23T12:54:47+00:00" + "time": "2021-01-12T12:10:35+00:00" }, { "name": "coolsms/php-sdk", @@ -508,16 +509,16 @@ }, { "name": "guzzlehttp/promises", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "60d379c243457e073cff02bc323a2a86cb355631" + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", - "reference": "60d379c243457e073cff02bc323a2a86cb355631", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "shasum": "" }, "require": { @@ -557,22 +558,22 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.0" + "source": "https://github.com/guzzle/promises/tree/1.4.1" }, - "time": "2020-09-30T07:37:28+00:00" + "time": "2021-03-07T09:25:29+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.7.0", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" + "reference": "dc960a912984efb74d0a90222870c72c87f10c91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", + "reference": "dc960a912984efb74d0a90222870c72c87f10c91", "shasum": "" }, "require": { @@ -632,9 +633,9 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.7.0" + "source": "https://github.com/guzzle/psr7/tree/1.8.2" }, - "time": "2020-09-30T07:37:11+00:00" + "time": "2021-04-26T09:17:50+00:00" }, { "name": "hautelook/phpass", @@ -1331,20 +1332,20 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.4", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e" + "reference": "15f7faf8508e04471f666633addacf54c0ab5933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", - "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/15f7faf8508e04471f666633addacf54c0ab5933", + "reference": "15f7faf8508e04471f666633addacf54c0ab5933", "shasum": "" }, "require": { - "egulias/email-validator": "^2.0", + "egulias/email-validator": "^2.0|^3.1", "php": ">=7.0.0", "symfony/polyfill-iconv": "^1.0", "symfony/polyfill-intl-idn": "^1.10", @@ -1390,7 +1391,7 @@ ], "support": { "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.4" + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.7" }, "funding": [ { @@ -1402,7 +1403,7 @@ "type": "tidelift" } ], - "time": "2020-12-08T18:02:06+00:00" + "time": "2021-03-09T12:30:35+00:00" }, { "name": "symfony/polyfill-iconv", diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index b348d832f..a55519e1e 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -29,7 +29,7 @@ private static $installed = array ( 'aliases' => array ( ), - 'reference' => 'f4ad0dbb480ca125af4020782f9895b65e545cfb', + 'reference' => 'f99b38192ba8724d4b58a645423b035ab7a02493', 'name' => 'rhymix/rhymix', ), 'versions' => @@ -45,12 +45,12 @@ private static $installed = array ( ), 'composer/ca-bundle' => array ( - 'pretty_version' => '1.2.8', - 'version' => '1.2.8.0', + 'pretty_version' => '1.2.9', + 'version' => '1.2.9.0', 'aliases' => array ( ), - 'reference' => '8a7ecad675253e4654ea05505233285377405215', + 'reference' => '78a0e288fdcebf92aa2318a8d3656168da6ac1a5', ), 'coolsms/php-sdk' => array ( @@ -108,21 +108,21 @@ private static $installed = array ( ), 'guzzlehttp/promises' => array ( - 'pretty_version' => '1.4.0', - 'version' => '1.4.0.0', + 'pretty_version' => '1.4.1', + 'version' => '1.4.1.0', 'aliases' => array ( ), - 'reference' => '60d379c243457e073cff02bc323a2a86cb355631', + 'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d', ), 'guzzlehttp/psr7' => array ( - 'pretty_version' => '1.7.0', - 'version' => '1.7.0.0', + 'pretty_version' => '1.8.2', + 'version' => '1.8.2.0', 'aliases' => array ( ), - 'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3', + 'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91', ), 'hautelook/phpass' => array ( @@ -228,16 +228,16 @@ private static $installed = array ( 'aliases' => array ( ), - 'reference' => 'f4ad0dbb480ca125af4020782f9895b65e545cfb', + 'reference' => 'f99b38192ba8724d4b58a645423b035ab7a02493', ), 'rmccue/requests' => array ( - 'pretty_version' => 'v1.7.0', - 'version' => '1.7.0.0', + 'pretty_version' => 'v1.8.0', + 'version' => '1.8.0.0', 'aliases' => array ( ), - 'reference' => '87932f52ffad70504d93f04f15690cf16a089546', + 'reference' => 'afbe4790e4def03581c4a0963a1e8aa01f6030f1', ), 'scssphp/scssphp' => array ( @@ -250,12 +250,12 @@ private static $installed = array ( ), 'swiftmailer/swiftmailer' => array ( - 'pretty_version' => 'v6.2.4', - 'version' => '6.2.4.0', + 'pretty_version' => 'v6.2.7', + 'version' => '6.2.7.0', 'aliases' => array ( ), - 'reference' => '56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e', + 'reference' => '15f7faf8508e04471f666633addacf54c0ab5933', ), 'symfony/polyfill-iconv' => array ( diff --git a/vendor/composer/ca-bundle/composer.json b/vendor/composer/ca-bundle/composer.json index 22de0a892..5213e9763 100644 --- a/vendor/composer/ca-bundle/composer.json +++ b/vendor/composer/ca-bundle/composer.json @@ -27,7 +27,8 @@ "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8", + "symfony/phpunit-bridge": "^4.2 || ^5", + "phpstan/phpstan": "^0.12.55", "psr/log": "^1.0", "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" }, @@ -43,12 +44,11 @@ }, "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "1.x-dev" } }, - "config": { - "platform": { - "php": "5.3.9" - } + "scripts": { + "test": "SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 vendor/bin/simple-phpunit", + "phpstan": "vendor/bin/phpstan analyse" } } diff --git a/vendor/composer/ca-bundle/phpstan.neon.dist b/vendor/composer/ca-bundle/phpstan.neon.dist new file mode 100644 index 000000000..1cd333bd1 --- /dev/null +++ b/vendor/composer/ca-bundle/phpstan.neon.dist @@ -0,0 +1,5 @@ +parameters: + level: 8 + paths: + - src + - tests diff --git a/vendor/composer/ca-bundle/res/cacert.pem b/vendor/composer/ca-bundle/res/cacert.pem index f9bd706b4..3a08fd8db 100644 --- a/vendor/composer/ca-bundle/res/cacert.pem +++ b/vendor/composer/ca-bundle/res/cacert.pem @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Wed Jul 22 03:12:14 2020 GMT +## Certificate data from Mozilla as of: Tue Dec 8 04:12:05 2020 GMT ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates @@ -14,7 +14,7 @@ ## Just configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.28. -## SHA256: cc6408bd4be7fbfb8699bdb40ccb7f6de5780d681d87785ea362646e4dad5e8e +## SHA256: d820b8696d8ffe42064a1384a56a8981cdc7e7e198036bbb5fa04a6c282dd9a2 ## @@ -448,36 +448,6 @@ KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 QBFGmh95DmK/D5fs4C8fF5Q= -----END CERTIFICATE----- -Taiwan GRCA -=========== ------BEGIN CERTIFICATE----- -MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG -EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X -DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv -dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD -ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN -w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5 -BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O -1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO -htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov -J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7 -Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHKYS1t -B6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoHEgKXTiCQ8P8NHuJB -O9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThNXo+EHWbNxWCWtFJaBYmOlXqYwZE8 -lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1UdDgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNV -HRMEBTADAQH/MDkGBGcqBwAEMTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg2 -09yewDL7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ -TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj -Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2 -Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU -D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz -DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk -Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk -7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ -CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy -+fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS ------END CERTIFICATE----- - DigiCert Assured ID Root CA =========================== -----BEGIN CERTIFICATE----- @@ -806,29 +776,6 @@ FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= -----END CERTIFICATE----- -OISTE WISeKey Global Root GA CA -=============================== ------BEGIN CERTIFICATE----- -MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE -BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG -A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH -bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD -VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw -IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5 -IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9 -Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg -Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD -d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ -/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R -LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw -AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ -KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm -MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4 -+vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa -hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY -okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= ------END CERTIFICATE----- - Certigna ======== -----BEGIN CERTIFICATE----- @@ -1709,30 +1656,6 @@ P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw== -----END CERTIFICATE----- -EE Certification Centre Root CA -=============================== ------BEGIN CERTIFICATE----- -MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG -EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy -dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw -MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB -UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy -ZSBSb290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUyeuuOF0+W2Ap7kaJjbMeM -TC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvObntl8jixwKIy72KyaOBhU8E2lf/slLo2 -rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIwWFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw -93X2PaRka9ZP585ArQ/dMtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtN -P2MbRMNE1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYDVR0T -AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/zQas8fElyalL1BSZ -MEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEF -BQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEFBQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+Rj -xY6hUFaTlrg4wCQiZrxTFGGVv9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqM -lIpPnTX/dqQGE5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u -uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU -3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM -dcGWxZ0= ------END CERTIFICATE----- - D-TRUST Root Class 3 CA 2 2009 ============================== -----BEGIN CERTIFICATE----- @@ -3445,3 +3368,68 @@ Sxfj03k9bWtJySgOLnRQvwzZRjoQhsmnP+mg7H/rpXdYaXHmgwo38oZJar55CJD2AhZkPuXaTH4M NMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE1LlSVHJ7liXMvGnjSG4N 0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MXQRBdJ3NghVdJIgc= -----END CERTIFICATE----- + +Trustwave Global Certification Authority +======================================== +-----BEGIN CERTIFICATE----- +MIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJV +UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2 +ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTAeFw0xNzA4MjMxOTM0MTJaFw00MjA4MjMxOTM0MTJaMIGIMQswCQYDVQQGEwJV +UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2 +ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALldUShLPDeS0YLOvR29 +zd24q88KPuFd5dyqCblXAj7mY2Hf8g+CY66j96xz0XznswuvCAAJWX/NKSqIk4cXGIDtiLK0thAf +LdZfVaITXdHG6wZWiYj+rDKd/VzDBcdu7oaJuogDnXIhhpCujwOl3J+IKMujkkkP7NAP4m1ET4Bq +stTnoApTAbqOl5F2brz81Ws25kCI1nsvXwXoLG0R8+eyvpJETNKXpP7ScoFDB5zpET71ixpZfR9o +WN0EACyW80OzfpgZdNmcc9kYvkHHNHnZ9GLCQ7mzJ7Aiy/k9UscwR7PJPrhq4ufogXBeQotPJqX+ +OsIgbrv4Fo7NDKm0G2x2EOFYeUY+VM6AqFcJNykbmROPDMjWLBz7BegIlT1lRtzuzWniTY+HKE40 +Cz7PFNm73bZQmq131BnW2hqIyE4bJ3XYsgjxroMwuREOzYfwhI0Vcnyh78zyiGG69Gm7DIwLdVcE +uE4qFC49DxweMqZiNu5m4iK4BUBjECLzMx10coos9TkpoNPnG4CELcU9402x/RpvumUHO1jsQkUm ++9jaJXLE9gCxInm943xZYkqcBW89zubWR2OZxiRvchLIrH+QtAuRcOi35hYQcRfO3gZPSEF9NUqj +ifLJS3tBEW1ntwiYTOURGa5CgNz7kAXU+FDKvuStx8KU1xad5hePrzb7AgMBAAGjQjBAMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFJngGWcNYtt2s9o9uFvo/ULSMQ6HMA4GA1UdDwEB/wQEAwIB +BjANBgkqhkiG9w0BAQsFAAOCAgEAmHNw4rDT7TnsTGDZqRKGFx6W0OhUKDtkLSGm+J1WE2pIPU/H +PinbbViDVD2HfSMF1OQc3Og4ZYbFdada2zUFvXfeuyk3QAUHw5RSn8pk3fEbK9xGChACMf1KaA0H +ZJDmHvUqoai7PF35owgLEQzxPy0QlG/+4jSHg9bP5Rs1bdID4bANqKCqRieCNqcVtgimQlRXtpla +4gt5kNdXElE1GYhBaCXUNxeEFfsBctyV3lImIJgm4nb1J2/6ADtKYdkNy1GTKv0WBpanI5ojSP5R +vbbEsLFUzt5sQa0WZ37b/TjNuThOssFgy50X31ieemKyJo90lZvkWx3SD92YHJtZuSPTMaCm/zjd +zyBP6VhWOmfD0faZmZ26NraAL4hHT4a/RDqA5Dccprrql5gR0IRiR2Qequ5AvzSxnI9O4fKSTx+O +856X3vOmeWqJcU9LJxdI/uz0UA9PSX3MReO9ekDFQdxhVicGaeVyQYHTtgGJoC86cnn+OjC/QezH +Yj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu +3R3y4G5OBVixwJAWKqQ9EEC+j2Jjg6mcgn0tAumDMHzLJ8n9HmYAsC7TIS+OMxZsmO0QqAfWzJPP +29FpHOTKyeC2nOnOcXHebD8WpHk= +-----END CERTIFICATE----- + +Trustwave Global ECC P256 Certification Authority +================================================= +-----BEGIN CERTIFICATE----- +MIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYDVQQGEwJVUzER +MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI +b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1NiBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM1MTBaFw00MjA4MjMxOTM1MTBaMIGRMQswCQYD +VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy +dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1 +NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH77bOYj +43MyCMpg5lOcunSNGLB4kFKA3TjASh3RqMyTpJcGOMoNFWLGjgEqZZ2q3zSRLoHB5DOSMcT9CTqm +P62jQzBBMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt +0UrrdaVKEJmzsaGLSvcwCgYIKoZIzj0EAwIDRwAwRAIgB+ZU2g6gWrKuEZ+Hxbb/ad4lvvigtwjz +RM4q3wghDDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7 +-----END CERTIFICATE----- + +Trustwave Global ECC P384 Certification Authority +================================================= +-----BEGIN CERTIFICATE----- +MIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYDVQQGEwJVUzER +MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI +b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4NCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM2NDNaFw00MjA4MjMxOTM2NDNaMIGRMQswCQYD +VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy +dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4 +NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGvaDXU1CDFH +Ba5FmVXxERMuSvgQMSOjfoPTfygIOiYaOs+Xgh+AtycJj9GOMMQKmw6sWASr9zZ9lCOkmwqKi6vr +/TklZvFe/oyujUF5nQlgziip04pt89ZF1PKYhDhloKNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNV +HQ8BAf8EBQMDBwYAMB0GA1UdDgQWBBRVqYSJ0sEyvRjLbKYHTsjnnb6CkDAKBggqhkjOPQQDAwNn +ADBkAjA3AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsCMGcl +CrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVuSw== +-----END CERTIFICATE----- diff --git a/vendor/composer/ca-bundle/src/CaBundle.php b/vendor/composer/ca-bundle/src/CaBundle.php index ea8d7934f..0109ba037 100644 --- a/vendor/composer/ca-bundle/src/CaBundle.php +++ b/vendor/composer/ca-bundle/src/CaBundle.php @@ -20,8 +20,11 @@ use Symfony\Component\Process\PhpProcess; */ class CaBundle { + /** @var string|null */ private static $caPath; + /** @var array */ private static $caFileValidity = array(); + /** @var bool|null */ private static $useOpensslParse; /** @@ -68,7 +71,6 @@ class CaBundle } $caBundlePaths = array(); - // If SSL_CERT_FILE env variable points to a valid certificate/bundle, use that. // This mimics how OpenSSL uses the SSL_CERT_FILE env variable. $caBundlePaths[] = self::getEnvVariable('SSL_CERT_FILE'); @@ -102,11 +104,11 @@ class CaBundle $caBundlePaths = array_merge($caBundlePaths, $otherLocations); foreach ($caBundlePaths as $caBundle) { - if (self::caFileUsable($caBundle, $logger)) { + if ($caBundle && self::caFileUsable($caBundle, $logger)) { return self::$caPath = $caBundle; } - if (self::caDirUsable($caBundle)) { + if ($caBundle && self::caDirUsable($caBundle)) { return self::$caPath = $caBundle; } } @@ -128,8 +130,13 @@ class CaBundle // cURL does not understand 'phar://' paths // see https://github.com/composer/ca-bundle/issues/10 if (0 === strpos($caBundleFile, 'phar://')) { + $tempCaBundleFile = tempnam(sys_get_temp_dir(), 'openssl-ca-bundle-'); + if (false === $tempCaBundleFile) { + throw new \RuntimeException('Could not create a temporary file to store the bundled CA file'); + } + file_put_contents( - $tempCaBundleFile = tempnam(sys_get_temp_dir(), 'openssl-ca-bundle-'), + $tempCaBundleFile, file_get_contents($caBundleFile) ); @@ -173,9 +180,16 @@ class CaBundle } $isValid = !empty($contents); - } else { + } elseif (is_string($contents) && strlen($contents) > 0) { $contents = preg_replace("/^(\\-+(?:BEGIN|END))\\s+TRUSTED\\s+(CERTIFICATE\\-+)\$/m", '$1 $2', $contents); - $isValid = (bool) openssl_x509_parse($contents); + if (null === $contents) { + // regex extraction failed + $isValid = false; + } else { + $isValid = (bool) openssl_x509_parse($contents); + } + } else { + $isValid = false; } if ($logger) { @@ -210,7 +224,7 @@ class CaBundle if ( (PHP_VERSION_ID < 50400 && PHP_VERSION_ID >= 50328) || (PHP_VERSION_ID < 50500 && PHP_VERSION_ID >= 50423) - || (PHP_VERSION_ID < 50600 && PHP_VERSION_ID >= 50507) + || PHP_VERSION_ID >= 50507 ) { // This version of PHP has the fix for CVE-2013-6420 applied. return self::$useOpensslParse = true; @@ -277,7 +291,8 @@ EOT; $errorOutput = trim($process->getErrorOutput()); if ( - count($output) === 3 + is_array($output) + && count($output) === 3 && $output[0] === sprintf('string(%d) "%s"', strlen(PHP_VERSION), PHP_VERSION) && $output[1] === 'string(27) "stefan.esser@sektioneins.de"' && $output[2] === 'int(-1)' @@ -292,6 +307,7 @@ EOT; /** * Resets the static caches + * @return void */ public static function reset() { @@ -300,6 +316,10 @@ EOT; self::$useOpensslParse = null; } + /** + * @param string $name + * @return string|false + */ private static function getEnvVariable($name) { if (isset($_SERVER[$name])) { @@ -313,11 +333,19 @@ EOT; return false; } + /** + * @param string|false $certFile + * @return bool + */ private static function caFileUsable($certFile, LoggerInterface $logger = null) { return $certFile && @is_file($certFile) && @is_readable($certFile) && static::validateCaFile($certFile, $logger); } + /** + * @param string|false $certDir + * @return bool + */ private static function caDirUsable($certDir) { return $certDir && @is_dir($certDir) && @is_readable($certDir) && glob($certDir . '/*'); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 5cdcd1a2d..d25cb595a 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -66,17 +66,17 @@ }, { "name": "composer/ca-bundle", - "version": "1.2.8", - "version_normalized": "1.2.8.0", + "version": "1.2.9", + "version_normalized": "1.2.9.0", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "8a7ecad675253e4654ea05505233285377405215" + "reference": "78a0e288fdcebf92aa2318a8d3656168da6ac1a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215", - "reference": "8a7ecad675253e4654ea05505233285377405215", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/78a0e288fdcebf92aa2318a8d3656168da6ac1a5", + "reference": "78a0e288fdcebf92aa2318a8d3656168da6ac1a5", "shasum": "" }, "require": { @@ -85,15 +85,16 @@ "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8", + "phpstan/phpstan": "^0.12.55", "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" }, - "time": "2020-08-23T12:54:47+00:00", + "time": "2021-01-12T12:10:35+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "1.x-dev" } }, "installation-source": "dist", @@ -124,7 +125,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.2.8" + "source": "https://github.com/composer/ca-bundle/tree/1.2.9" }, "funding": [ { @@ -518,17 +519,17 @@ }, { "name": "guzzlehttp/promises", - "version": "1.4.0", - "version_normalized": "1.4.0.0", + "version": "1.4.1", + "version_normalized": "1.4.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "60d379c243457e073cff02bc323a2a86cb355631" + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", - "reference": "60d379c243457e073cff02bc323a2a86cb355631", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "shasum": "" }, "require": { @@ -537,7 +538,7 @@ "require-dev": { "symfony/phpunit-bridge": "^4.4 || ^5.1" }, - "time": "2020-09-30T07:37:28+00:00", + "time": "2021-03-07T09:25:29+00:00", "type": "library", "extra": { "branch-alias": { @@ -570,23 +571,23 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.0" + "source": "https://github.com/guzzle/promises/tree/1.4.1" }, "install-path": "../guzzlehttp/promises" }, { "name": "guzzlehttp/psr7", - "version": "1.7.0", - "version_normalized": "1.7.0.0", + "version": "1.8.2", + "version_normalized": "1.8.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" + "reference": "dc960a912984efb74d0a90222870c72c87f10c91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", + "reference": "dc960a912984efb74d0a90222870c72c87f10c91", "shasum": "" }, "require": { @@ -604,7 +605,7 @@ "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, - "time": "2020-09-30T07:37:11+00:00", + "time": "2021-04-26T09:17:50+00:00", "type": "library", "extra": { "branch-alias": { @@ -648,7 +649,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.7.0" + "source": "https://github.com/guzzle/psr7/tree/1.8.2" }, "install-path": "../guzzlehttp/psr7" }, @@ -1230,26 +1231,33 @@ }, { "name": "rmccue/requests", - "version": "v1.7.0", - "version_normalized": "1.7.0.0", + "version": "v1.8.0", + "version_normalized": "1.8.0.0", "source": { "type": "git", - "url": "https://github.com/rmccue/Requests.git", - "reference": "87932f52ffad70504d93f04f15690cf16a089546" + "url": "https://github.com/WordPress/Requests.git", + "reference": "afbe4790e4def03581c4a0963a1e8aa01f6030f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rmccue/Requests/zipball/87932f52ffad70504d93f04f15690cf16a089546", - "reference": "87932f52ffad70504d93f04f15690cf16a089546", + "url": "https://api.github.com/repos/WordPress/Requests/zipball/afbe4790e4def03581c4a0963a1e8aa01f6030f1", + "reference": "afbe4790e4def03581c4a0963a1e8aa01f6030f1", "shasum": "" }, "require": { "php": ">=5.2" }, "require-dev": { - "requests/test-server": "dev-master" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "php-parallel-lint/php-console-highlighter": "^0.5.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcompatibility/php-compatibility": "^9.0", + "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5", + "requests/test-server": "dev-master", + "squizlabs/php_codesniffer": "^3.5", + "wp-coding-standards/wpcs": "^2.0" }, - "time": "2016-10-13T00:11:37+00:00", + "time": "2021-04-27T11:05:25+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1268,7 +1276,7 @@ } ], "description": "A HTTP library written in PHP, for human beings.", - "homepage": "http://github.com/rmccue/Requests", + "homepage": "http://github.com/WordPress/Requests", "keywords": [ "curl", "fsockopen", @@ -1278,6 +1286,10 @@ "iri", "sockets" ], + "support": { + "issues": "https://github.com/WordPress/Requests/issues", + "source": "https://github.com/WordPress/Requests/tree/v1.8.0" + }, "install-path": "../rmccue/requests" }, { @@ -1352,21 +1364,21 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.4", - "version_normalized": "6.2.4.0", + "version": "v6.2.7", + "version_normalized": "6.2.7.0", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e" + "reference": "15f7faf8508e04471f666633addacf54c0ab5933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", - "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/15f7faf8508e04471f666633addacf54c0ab5933", + "reference": "15f7faf8508e04471f666633addacf54c0ab5933", "shasum": "" }, "require": { - "egulias/email-validator": "^2.0", + "egulias/email-validator": "^2.0|^3.1", "php": ">=7.0.0", "symfony/polyfill-iconv": "^1.0", "symfony/polyfill-intl-idn": "^1.10", @@ -1379,7 +1391,7 @@ "suggest": { "ext-intl": "Needed to support internationalized email addresses" }, - "time": "2020-12-08T18:02:06+00:00", + "time": "2021-03-09T12:30:35+00:00", "type": "library", "extra": { "branch-alias": { @@ -1414,7 +1426,7 @@ ], "support": { "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.4" + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.7" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 81b4fa73e..ccb2bc107 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -6,7 +6,7 @@ 'aliases' => array ( ), - 'reference' => 'f4ad0dbb480ca125af4020782f9895b65e545cfb', + 'reference' => 'f99b38192ba8724d4b58a645423b035ab7a02493', 'name' => 'rhymix/rhymix', ), 'versions' => @@ -22,12 +22,12 @@ ), 'composer/ca-bundle' => array ( - 'pretty_version' => '1.2.8', - 'version' => '1.2.8.0', + 'pretty_version' => '1.2.9', + 'version' => '1.2.9.0', 'aliases' => array ( ), - 'reference' => '8a7ecad675253e4654ea05505233285377405215', + 'reference' => '78a0e288fdcebf92aa2318a8d3656168da6ac1a5', ), 'coolsms/php-sdk' => array ( @@ -85,21 +85,21 @@ ), 'guzzlehttp/promises' => array ( - 'pretty_version' => '1.4.0', - 'version' => '1.4.0.0', + 'pretty_version' => '1.4.1', + 'version' => '1.4.1.0', 'aliases' => array ( ), - 'reference' => '60d379c243457e073cff02bc323a2a86cb355631', + 'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d', ), 'guzzlehttp/psr7' => array ( - 'pretty_version' => '1.7.0', - 'version' => '1.7.0.0', + 'pretty_version' => '1.8.2', + 'version' => '1.8.2.0', 'aliases' => array ( ), - 'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3', + 'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91', ), 'hautelook/phpass' => array ( @@ -205,16 +205,16 @@ 'aliases' => array ( ), - 'reference' => 'f4ad0dbb480ca125af4020782f9895b65e545cfb', + 'reference' => 'f99b38192ba8724d4b58a645423b035ab7a02493', ), 'rmccue/requests' => array ( - 'pretty_version' => 'v1.7.0', - 'version' => '1.7.0.0', + 'pretty_version' => 'v1.8.0', + 'version' => '1.8.0.0', 'aliases' => array ( ), - 'reference' => '87932f52ffad70504d93f04f15690cf16a089546', + 'reference' => 'afbe4790e4def03581c4a0963a1e8aa01f6030f1', ), 'scssphp/scssphp' => array ( @@ -227,12 +227,12 @@ ), 'swiftmailer/swiftmailer' => array ( - 'pretty_version' => 'v6.2.4', - 'version' => '6.2.4.0', + 'pretty_version' => 'v6.2.7', + 'version' => '6.2.7.0', 'aliases' => array ( ), - 'reference' => '56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e', + 'reference' => '15f7faf8508e04471f666633addacf54c0ab5933', ), 'symfony/polyfill-iconv' => array ( diff --git a/vendor/guzzlehttp/promises/CHANGELOG.md b/vendor/guzzlehttp/promises/CHANGELOG.md index 4b63b2c74..14796c472 100644 --- a/vendor/guzzlehttp/promises/CHANGELOG.md +++ b/vendor/guzzlehttp/promises/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 1.4.1 - 2021-02-18 + +- Fixed `each_limit` skipping promises and failing ## 1.4.0 - 2020-09-30 diff --git a/vendor/guzzlehttp/promises/phpstan-baseline.neon b/vendor/guzzlehttp/promises/phpstan-baseline.neon deleted file mode 100644 index 26012c2d4..000000000 --- a/vendor/guzzlehttp/promises/phpstan-baseline.neon +++ /dev/null @@ -1,7 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Parameter \\#1 \\$function of function register_shutdown_function expects callable\\(\\)\\: void, Closure\\(\\)\\: mixed given\\.$#" - count: 1 - path: src/TaskQueue.php - diff --git a/vendor/guzzlehttp/promises/phpstan.neon.dist b/vendor/guzzlehttp/promises/phpstan.neon.dist deleted file mode 100644 index b533a8c99..000000000 --- a/vendor/guzzlehttp/promises/phpstan.neon.dist +++ /dev/null @@ -1,10 +0,0 @@ -includes: - - phpstan-baseline.neon - -parameters: - level: 5 - paths: - - src - - ignoreErrors: - - "#^Dead catch - Exception is already caught by Throwable above\\.$#" diff --git a/vendor/guzzlehttp/promises/psalm.xml b/vendor/guzzlehttp/promises/psalm.xml deleted file mode 100644 index 3e4e3d085..000000000 --- a/vendor/guzzlehttp/promises/psalm.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/vendor/guzzlehttp/promises/src/EachPromise.php b/vendor/guzzlehttp/promises/src/EachPromise.php index fbb8876c7..748f4712c 100644 --- a/vendor/guzzlehttp/promises/src/EachPromise.php +++ b/vendor/guzzlehttp/promises/src/EachPromise.php @@ -10,6 +10,8 @@ class EachPromise implements PromisorInterface { private $pending = []; + private $nextPendingIndex = 0; + /** @var \Iterator|null */ private $iterable; @@ -121,6 +123,7 @@ class EachPromise implements PromisorInterface $clearFn = function () { $this->iterable = $this->concurrency = $this->pending = null; $this->onFulfilled = $this->onRejected = null; + $this->nextPendingIndex = 0; }; $this->aggregate->then($clearFn, $clearFn); @@ -163,11 +166,9 @@ class EachPromise implements PromisorInterface $promise = Create::promiseFor($this->iterable->current()); $key = $this->iterable->key(); - // Iterable keys may not be unique, so we add the promises at the end - // of the pending array and retrieve the array index being used - $this->pending[] = null; - end($this->pending); - $idx = key($this->pending); + // Iterable keys may not be unique, so we use a counter to + // guarantee uniqueness + $idx = $this->nextPendingIndex++; $this->pending[$idx] = $promise->then( function ($value) use ($idx, $key) { diff --git a/vendor/guzzlehttp/psr7/.github/workflows/bc.yml b/vendor/guzzlehttp/psr7/.github/workflows/bc.yml new file mode 100644 index 000000000..9eaedbce7 --- /dev/null +++ b/vendor/guzzlehttp/psr7/.github/workflows/bc.yml @@ -0,0 +1,16 @@ +name: BC Check + +on: + pull_request: + +jobs: + roave-bc-check: + name: Roave BC Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Roave BC Check + uses: docker://nyholm/roave-bc-check-ga diff --git a/vendor/guzzlehttp/psr7/.github/workflows/ci.yml b/vendor/guzzlehttp/psr7/.github/workflows/ci.yml new file mode 100644 index 000000000..da7414e57 --- /dev/null +++ b/vendor/guzzlehttp/psr7/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + pull_request: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + strategy: + max-parallel: 10 + matrix: + php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: 'none' + extensions: mbstring + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: composer update --no-interaction --no-progress --prefer-dist + + - name: Run tests + run: make test diff --git a/vendor/guzzlehttp/psr7/.github/workflows/integration.yml b/vendor/guzzlehttp/psr7/.github/workflows/integration.yml new file mode 100644 index 000000000..b6e0eb241 --- /dev/null +++ b/vendor/guzzlehttp/psr7/.github/workflows/integration.yml @@ -0,0 +1,37 @@ +name: Integration + +on: + pull_request: + +jobs: + + build: + name: Test + runs-on: ubuntu-latest + strategy: + max-parallel: 10 + matrix: + php: ['7.2', '7.3', '7.4', '8.0'] + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Download dependencies + uses: ramsey/composer-install@v1 + with: + composer-options: --no-interaction --prefer-dist --optimize-autoloader + + - name: Start server + run: php -S 127.0.0.1:10002 tests/Integration/server.php & + + - name: Run tests + env: + TEST_SERVER: 127.0.0.1:10002 + run: ./vendor/bin/phpunit --testsuite Integration diff --git a/vendor/guzzlehttp/psr7/.github/workflows/static.yml b/vendor/guzzlehttp/psr7/.github/workflows/static.yml new file mode 100644 index 000000000..ab4d68ba3 --- /dev/null +++ b/vendor/guzzlehttp/psr7/.github/workflows/static.yml @@ -0,0 +1,29 @@ +name: Static analysis + +on: + pull_request: + +jobs: + php-cs-fixer: + name: PHP-CS-Fixer + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + coverage: none + extensions: mbstring + + - name: Download dependencies + run: composer update --no-interaction --no-progress + + - name: Download PHP CS Fixer + run: composer require "friendsofphp/php-cs-fixer:2.18.4" + + - name: Execute PHP CS Fixer + run: vendor/bin/php-cs-fixer fix --diff-format udiff --dry-run diff --git a/vendor/guzzlehttp/promises/.php_cs.dist b/vendor/guzzlehttp/psr7/.php_cs.dist similarity index 50% rename from vendor/guzzlehttp/promises/.php_cs.dist rename to vendor/guzzlehttp/psr7/.php_cs.dist index a321876e8..e4f0bd535 100644 --- a/vendor/guzzlehttp/promises/.php_cs.dist +++ b/vendor/guzzlehttp/psr7/.php_cs.dist @@ -5,57 +5,34 @@ $config = PhpCsFixer\Config::create() ->setRules([ '@PSR2' => true, 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => ['operators' => ['=>' => null]], - 'blank_line_after_opening_tag' => true, - 'class_attributes_separation' => ['elements' => ['method']], - 'compact_nullable_typehint' => true, 'concat_space' => ['spacing' => 'one'], - 'declare_equal_normalize' => ['space' => 'none'], 'declare_strict_types' => false, - 'dir_constant' => true, 'final_static_access' => true, 'fully_qualified_strict_types' => true, - 'function_to_constant' => true, - 'function_typehint_space' => true, 'header_comment' => false, - 'is_null' => ['use_yoda_style' => false], - 'list_syntax' => ['syntax' => 'short'], + 'is_null' => ['use_yoda_style' => true], + 'list_syntax' => ['syntax' => 'long'], 'lowercase_cast' => true, 'magic_method_casing' => true, 'modernize_types_casting' => true, 'multiline_comment_opening_closing' => true, - //'native_constant_invocation' => true, 'no_alias_functions' => true, 'no_alternative_syntax' => true, 'no_blank_lines_after_phpdoc' => true, 'no_empty_comment' => true, 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, 'no_extra_blank_lines' => true, 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_spaces_around_offset' => true, - 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true], 'no_trailing_comma_in_singleline_array' => true, - 'no_unneeded_control_parentheses' => true, 'no_unset_cast' => true, 'no_unused_imports' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, 'no_whitespace_in_blank_line' => true, - 'normalize_index_brace' => true, 'ordered_imports' => true, - 'php_unit_construct' => true, - 'php_unit_dedicate_assert' => ['target' => 'newest'], - 'php_unit_dedicate_assert_internal_type' => ['target' => 'newest'], - 'php_unit_expectation' => ['target' => 'newest'], - 'php_unit_mock' => ['target' => 'newest'], - 'php_unit_mock_short_will_return' => true, - 'php_unit_no_expectation_annotation' => ['target' => 'newest'], + 'php_unit_ordered_covers' => true, 'php_unit_test_annotation' => ['style' => 'prefix'], - //'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], + 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], 'phpdoc_align' => ['align' => 'vertical'], - //'phpdoc_line_span' => ['method' => 'multi', 'property' => 'multi'], - 'phpdoc_no_package' => true, 'phpdoc_no_useless_inheritdoc' => true, 'phpdoc_scalar' => true, 'phpdoc_separation' => true, @@ -65,17 +42,8 @@ $config = PhpCsFixer\Config::create() 'phpdoc_types' => true, 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], 'phpdoc_var_without_name' => true, - 'return_assignment' => true, - 'short_scalar_cast' => true, 'single_trait_insert_per_statement' => true, 'standardize_not_equals' => true, - //'static_lambda' => true, - 'ternary_to_null_coalescing' => true, - 'trim_array_spaces' => true, - 'visibility_required' => true, - 'yoda_style' => false, - // 'native_function_invocation' => true, - 'braces' => ['allow_single_line_closure'=>true], ]) ->setFinder( PhpCsFixer\Finder::create() diff --git a/vendor/guzzlehttp/psr7/CHANGELOG.md b/vendor/guzzlehttp/psr7/CHANGELOG.md index b441d3666..6a6b7bf98 100644 --- a/vendor/guzzlehttp/psr7/CHANGELOG.md +++ b/vendor/guzzlehttp/psr7/CHANGELOG.md @@ -7,9 +7,34 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased] +## Unreleased -## [1.7.0] - 2020-09-30 +## 1.8.2 - 2021-04-26 + +### Fixed + +- Handle possibly unset `url` in `stream_get_meta_data` + +## 1.8.1 - 2021-03-21 + +### Fixed + +- Issue parsing IPv6 URLs +- Issue modifying ServerRequest lost all its attributes + +## 1.8.0 - 2021-03-21 + +### Added + +- Locale independent URL parsing +- Most classes got a `@final` annotation to prepare for 2.0 + +### Fixed + +- Issue when creating stream from `php://input` and curl-ext is not installed +- Broken `Utils::tryFopen()` on PHP 8 + +## 1.7.0 - 2020-09-30 ### Added @@ -253,7 +278,6 @@ Currently unsupported: -[Unreleased]: https://github.com/guzzle/psr7/compare/1.6.0...HEAD [1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0 [1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2 [1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1 diff --git a/vendor/guzzlehttp/psr7/src/AppendStream.php b/vendor/guzzlehttp/psr7/src/AppendStream.php index 86e7a23ba..fa9153d78 100644 --- a/vendor/guzzlehttp/psr7/src/AppendStream.php +++ b/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -8,6 +8,8 @@ use Psr\Http\Message\StreamInterface; * Reads from multiple streams, one after the other. * * This is a read-only stream decorator. + * + * @final */ class AppendStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/BufferStream.php b/vendor/guzzlehttp/psr7/src/BufferStream.php index 627e4a5f1..783859c19 100644 --- a/vendor/guzzlehttp/psr7/src/BufferStream.php +++ b/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -11,6 +11,8 @@ use Psr\Http\Message\StreamInterface; * This stream returns a "hwm" metadata value that tells upstream consumers * what the configured high water mark of the stream is, or the maximum * preferred size of the buffer. + * + * @final */ class BufferStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/CachingStream.php b/vendor/guzzlehttp/psr7/src/CachingStream.php index 244d2a063..fe749e981 100644 --- a/vendor/guzzlehttp/psr7/src/CachingStream.php +++ b/vendor/guzzlehttp/psr7/src/CachingStream.php @@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface; /** * Stream decorator that can cache previously read bytes from a sequentially * read stream. + * + * @final */ class CachingStream implements StreamInterface { @@ -21,7 +23,7 @@ class CachingStream implements StreamInterface /** * We will treat the buffer object as the body of the stream * - * @param StreamInterface $stream Stream to cache + * @param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream. * @param StreamInterface $target Optionally specify where data is cached */ public function __construct( @@ -29,7 +31,7 @@ class CachingStream implements StreamInterface StreamInterface $target = null ) { $this->remoteStream = $stream; - $this->stream = $target ?: new Stream(fopen('php://temp', 'r+')); + $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+')); } public function getSize() diff --git a/vendor/guzzlehttp/psr7/src/DroppingStream.php b/vendor/guzzlehttp/psr7/src/DroppingStream.php index e125642d3..9f7420c40 100644 --- a/vendor/guzzlehttp/psr7/src/DroppingStream.php +++ b/vendor/guzzlehttp/psr7/src/DroppingStream.php @@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface; /** * Stream decorator that begins dropping data once the size of the underlying * stream becomes too full. + * + * @final */ class DroppingStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/FnStream.php b/vendor/guzzlehttp/psr7/src/FnStream.php index 407577a37..76a8cc7ba 100644 --- a/vendor/guzzlehttp/psr7/src/FnStream.php +++ b/vendor/guzzlehttp/psr7/src/FnStream.php @@ -9,6 +9,8 @@ use Psr\Http\Message\StreamInterface; * * Allows for easy testing and extension of a provided stream without needing * to create a concrete class for a simple extension point. + * + * @final */ class FnStream implements StreamInterface { @@ -56,6 +58,7 @@ class FnStream implements StreamInterface /** * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. + * * @throws \LogicException */ public function __wakeup() diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php index c98b96f25..0cbd2cce2 100644 --- a/vendor/guzzlehttp/psr7/src/InflateStream.php +++ b/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -14,6 +14,8 @@ use Psr\Http\Message\StreamInterface; * * @link http://tools.ietf.org/html/rfc1952 * @link http://php.net/manual/en/filters.compression.php + * + * @final */ class InflateStream implements StreamInterface { @@ -34,6 +36,7 @@ class InflateStream implements StreamInterface /** * @param StreamInterface $stream * @param $header + * * @return int */ private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) diff --git a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php index 13c7af5c8..911e127d3 100644 --- a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php +++ b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface; /** * Lazily reads or writes to a file that is opened only after an IO operation * take place on the stream. + * + * @final */ class LazyOpenStream implements StreamInterface { @@ -15,7 +17,7 @@ class LazyOpenStream implements StreamInterface /** @var string File to open */ private $filename; - /** @var string $mode */ + /** @var string */ private $mode; /** diff --git a/vendor/guzzlehttp/psr7/src/LimitStream.php b/vendor/guzzlehttp/psr7/src/LimitStream.php index bef9161ea..1173ec40d 100644 --- a/vendor/guzzlehttp/psr7/src/LimitStream.php +++ b/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -4,9 +4,10 @@ namespace GuzzleHttp\Psr7; use Psr\Http\Message\StreamInterface; - /** - * Decorator used to return only a subset of a stream + * Decorator used to return only a subset of a stream. + * + * @final */ class LimitStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php index 0cbfea35d..5a6079a89 100644 --- a/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -7,6 +7,8 @@ use Psr\Http\Message\StreamInterface; /** * Stream that when read returns bytes for a streaming multipart or * multipart/form-data stream. + * + * @final */ class MultipartStream implements StreamInterface { @@ -115,9 +117,11 @@ class MultipartStream implements StreamInterface $disposition = $this->getHeader($headers, 'content-disposition'); if (!$disposition) { $headers['Content-Disposition'] = ($filename === '0' || $filename) - ? sprintf('form-data; name="%s"; filename="%s"', + ? sprintf( + 'form-data; name="%s"; filename="%s"', $name, - basename($filename)) + basename($filename) + ) : "form-data; name=\"{$name}\""; } diff --git a/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/vendor/guzzlehttp/psr7/src/NoSeekStream.php index 4b04b4c0a..d66bdde46 100644 --- a/vendor/guzzlehttp/psr7/src/NoSeekStream.php +++ b/vendor/guzzlehttp/psr7/src/NoSeekStream.php @@ -5,7 +5,9 @@ namespace GuzzleHttp\Psr7; use Psr\Http\Message\StreamInterface; /** - * Stream decorator that prevents a stream from being seeked + * Stream decorator that prevents a stream from being seeked. + * + * @final */ class NoSeekStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/PumpStream.php b/vendor/guzzlehttp/psr7/src/PumpStream.php index fbd8726b4..44c7b582c 100644 --- a/vendor/guzzlehttp/psr7/src/PumpStream.php +++ b/vendor/guzzlehttp/psr7/src/PumpStream.php @@ -13,6 +13,8 @@ use Psr\Http\Message\StreamInterface; * returned by the provided callable is buffered internally until drained using * the read() function of the PumpStream. The provided callable MUST return * false when there is no more data to read. + * + * @final */ class PumpStream implements StreamInterface { @@ -32,14 +34,14 @@ class PumpStream implements StreamInterface private $buffer; /** - * @param callable $source Source of the stream data. The callable MAY - * accept an integer argument used to control the - * amount of data to return. The callable MUST - * return a string when called, or false on error - * or EOF. - * @param array $options Stream options: - * - metadata: Hash of metadata to use with stream. - * - size: Size of the stream, if known. + * @param callable $source Source of the stream data. The callable MAY + * accept an integer argument used to control the + * amount of data to return. The callable MUST + * return a string when called, or false on error + * or EOF. + * @param array $options Stream options: + * - metadata: Hash of metadata to use with stream. + * - size: Size of the stream, if known. */ public function __construct(callable $source, array $options = []) { diff --git a/vendor/guzzlehttp/psr7/src/Query.php b/vendor/guzzlehttp/psr7/src/Query.php index 99e093050..5a7cc0359 100644 --- a/vendor/guzzlehttp/psr7/src/Query.php +++ b/vendor/guzzlehttp/psr7/src/Query.php @@ -34,7 +34,9 @@ final class Query } elseif ($urlEncoding === PHP_QUERY_RFC1738) { $decoder = 'urldecode'; } else { - $decoder = function ($str) { return $str; }; + $decoder = function ($str) { + return $str; + }; } foreach (explode('&', $str) as $kvp) { @@ -65,6 +67,7 @@ final class Query * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 * to encode using RFC3986, or PHP_QUERY_RFC1738 * to encode using RFC1738. + * * @return string */ public static function build(array $params, $encoding = PHP_QUERY_RFC3986) @@ -74,7 +77,9 @@ final class Query } if ($encoding === false) { - $encoder = function ($str) { return $str; }; + $encoder = function ($str) { + return $str; + }; } elseif ($encoding === PHP_QUERY_RFC3986) { $encoder = 'rawurlencode'; } elseif ($encoding === PHP_QUERY_RFC1738) { diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php index 89fbb1e62..c1cdaebff 100644 --- a/vendor/guzzlehttp/psr7/src/Request.php +++ b/vendor/guzzlehttp/psr7/src/Request.php @@ -17,7 +17,7 @@ class Request implements RequestInterface /** @var string */ private $method; - /** @var null|string */ + /** @var string|null */ private $requestTarget; /** @var UriInterface */ @@ -27,7 +27,7 @@ class Request implements RequestInterface * @param string $method HTTP method * @param string|UriInterface $uri URI * @param array $headers Request headers - * @param string|null|resource|StreamInterface $body Request body + * @param string|resource|StreamInterface|null $body Request body * @param string $version Protocol version */ public function __construct( diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php index 36b85fb78..8c01a0f5a 100644 --- a/vendor/guzzlehttp/psr7/src/Response.php +++ b/vendor/guzzlehttp/psr7/src/Response.php @@ -83,7 +83,7 @@ class Response implements ResponseInterface /** * @param int $status Status code * @param array $headers Response headers - * @param string|null|resource|StreamInterface $body Response body + * @param string|resource|StreamInterface|null $body Response body * @param string $version Protocol version * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) */ diff --git a/vendor/guzzlehttp/psr7/src/Rfc7230.php b/vendor/guzzlehttp/psr7/src/Rfc7230.php index 505e4742b..51b571f24 100644 --- a/vendor/guzzlehttp/psr7/src/Rfc7230.php +++ b/vendor/guzzlehttp/psr7/src/Rfc7230.php @@ -11,6 +11,7 @@ final class Rfc7230 * Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons. * * @link https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15 + * * @license https://github.com/amphp/http/blob/v1.0.1/LICENSE */ const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php index 72c5566cf..e6d26f5ff 100644 --- a/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -4,9 +4,9 @@ namespace GuzzleHttp\Psr7; use InvalidArgumentException; use Psr\Http\Message\ServerRequestInterface; -use Psr\Http\Message\UriInterface; use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UploadedFileInterface; +use Psr\Http\Message\UriInterface; /** * Server-side HTTP request @@ -35,7 +35,7 @@ class ServerRequest extends Request implements ServerRequestInterface private $cookieParams = []; /** - * @var null|array|object + * @var array|object|null */ private $parsedBody; @@ -58,7 +58,7 @@ class ServerRequest extends Request implements ServerRequestInterface * @param string $method HTTP method * @param string|UriInterface $uri URI * @param array $headers Request headers - * @param string|null|resource|StreamInterface $body Request body + * @param string|resource|StreamInterface|null $body Request body * @param string $version Protocol version * @param array $serverParams Typically the $_SERVER superglobal */ @@ -111,6 +111,7 @@ class ServerRequest extends Request implements ServerRequestInterface * delegate to normalizeNestedFileSpec() and return that return value. * * @param array $value $_FILES struct + * * @return array|UploadedFileInterface */ private static function createUploadedFileFromSpec(array $value) @@ -135,6 +136,7 @@ class ServerRequest extends Request implements ServerRequestInterface * UploadedFileInterface instances. * * @param array $files + * * @return UploadedFileInterface[] */ private static function normalizeNestedFileSpec(array $files = []) @@ -184,7 +186,7 @@ class ServerRequest extends Request implements ServerRequestInterface private static function extractHostAndPortFromAuthority($authority) { - $uri = 'http://'.$authority; + $uri = 'http://' . $authority; $parts = parse_url($uri); if (false === $parts) { return [null, null]; @@ -245,7 +247,6 @@ class ServerRequest extends Request implements ServerRequestInterface return $uri; } - /** * {@inheritdoc} */ diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php index 093023b1c..5025dd67b 100644 --- a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -6,6 +6,7 @@ use Psr\Http\Message\StreamInterface; /** * Stream decorator trait + * * @property StreamInterface stream */ trait StreamDecoratorTrait diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php index eac653539..fc7cb969b 100644 --- a/vendor/guzzlehttp/psr7/src/StreamWrapper.php +++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -6,6 +6,8 @@ use Psr\Http\Message\StreamInterface; /** * Converts Guzzle streams into PHP stream resources. + * + * @final */ class StreamWrapper { diff --git a/vendor/guzzlehttp/psr7/src/UploadedFile.php b/vendor/guzzlehttp/psr7/src/UploadedFile.php index a0ea59e09..bf342c4de 100644 --- a/vendor/guzzlehttp/psr7/src/UploadedFile.php +++ b/vendor/guzzlehttp/psr7/src/UploadedFile.php @@ -39,7 +39,7 @@ class UploadedFile implements UploadedFileInterface private $error; /** - * @var null|string + * @var string|null */ private $file; @@ -60,10 +60,10 @@ class UploadedFile implements UploadedFileInterface /** * @param StreamInterface|string|resource $streamOrFile - * @param int $size - * @param int $errorStatus - * @param string|null $clientFilename - * @param string|null $clientMediaType + * @param int $size + * @param int $errorStatus + * @param string|null $clientFilename + * @param string|null $clientMediaType */ public function __construct( $streamOrFile, @@ -144,7 +144,8 @@ class UploadedFile implements UploadedFileInterface /** * @param mixed $param - * @return boolean + * + * @return bool */ private function isStringOrNull($param) { @@ -153,7 +154,8 @@ class UploadedFile implements UploadedFileInterface /** * @param mixed $param - * @return boolean + * + * @return bool */ private function isStringNotEmpty($param) { @@ -195,7 +197,7 @@ class UploadedFile implements UploadedFileInterface /** * Return true if there is no upload error * - * @return boolean + * @return bool */ private function isOk() { @@ -203,7 +205,7 @@ class UploadedFile implements UploadedFileInterface } /** - * @return boolean + * @return bool */ public function isMoved() { @@ -248,10 +250,10 @@ class UploadedFile implements UploadedFileInterface * * @param string $targetPath Path to which to move the uploaded file. * - * @throws RuntimeException if the upload was not successful. + * @throws RuntimeException if the upload was not successful. * @throws InvalidArgumentException if the $path specified is invalid. - * @throws RuntimeException on any error during the move operation, or on - * the second or subsequent call to the method. + * @throws RuntimeException on any error during the move operation, or on + * the second or subsequent call to the method. */ public function moveTo($targetPath) { @@ -297,6 +299,7 @@ class UploadedFile implements UploadedFileInterface * {@inheritdoc} * * @see http://php.net/manual/en/features.file-upload.errors.php + * * @return int One of PHP's UPLOAD_ERR_XXX constants. */ public function getError() @@ -308,7 +311,7 @@ class UploadedFile implements UploadedFileInterface * {@inheritdoc} * * @return string|null The filename sent by the client or null if none - * was provided. + * was provided. */ public function getClientFilename() { diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php index a0d73917e..0f9f020d3 100644 --- a/vendor/guzzlehttp/psr7/src/Uri.php +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -67,7 +67,7 @@ class Uri implements UriInterface { // weak type check to also accept null until we can add scalar type hints if ($uri != '') { - $parts = parse_url($uri); + $parts = self::parse($uri); if ($parts === false) { throw new \InvalidArgumentException("Unable to parse URI: $uri"); } @@ -75,6 +75,49 @@ class Uri implements UriInterface } } + /** + * UTF-8 aware \parse_url() replacement. + * + * The internal function produces broken output for non ASCII domain names + * (IDN) when used with locales other than "C". + * + * On the other hand, cURL understands IDN correctly only when UTF-8 locale + * is configured ("C.UTF-8", "en_US.UTF-8", etc.). + * + * @see https://bugs.php.net/bug.php?id=52923 + * @see https://www.php.net/manual/en/function.parse-url.php#114817 + * @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING + * + * @param string $url + * + * @return array|false + */ + private static function parse($url) + { + // If IPv6 + $prefix = ''; + if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) { + $prefix = $matches[1]; + $url = $matches[2]; + } + + $encodedUrl = preg_replace_callback( + '%[^:/@?&=#]+%usD', + static function ($matches) { + return urlencode($matches[0]); + }, + $url + ); + + $result = parse_url($prefix . $encodedUrl); + + if ($result === false) { + return false; + } + + return array_map('urldecode', $result); + } + public function __toString() { return self::composeComponents( @@ -167,6 +210,7 @@ class Uri implements UriInterface * @param UriInterface $uri * * @return bool + * * @see Uri::isNetworkPathReference * @see Uri::isAbsolutePathReference * @see Uri::isRelativePathReference @@ -185,6 +229,7 @@ class Uri implements UriInterface * @param UriInterface $uri * * @return bool + * * @link https://tools.ietf.org/html/rfc3986#section-4.2 */ public static function isNetworkPathReference(UriInterface $uri) @@ -200,6 +245,7 @@ class Uri implements UriInterface * @param UriInterface $uri * * @return bool + * * @link https://tools.ietf.org/html/rfc3986#section-4.2 */ public static function isAbsolutePathReference(UriInterface $uri) @@ -218,6 +264,7 @@ class Uri implements UriInterface * @param UriInterface $uri * * @return bool + * * @link https://tools.ietf.org/html/rfc3986#section-4.2 */ public static function isRelativePathReference(UriInterface $uri) @@ -238,6 +285,7 @@ class Uri implements UriInterface * @param UriInterface|null $base An optional base URI to compare against * * @return bool + * * @link https://tools.ietf.org/html/rfc3986#section-4.4 */ public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) @@ -358,6 +406,7 @@ class Uri implements UriInterface * @param array $parts * * @return UriInterface + * * @link http://php.net/manual/en/function.parse-url.php * * @throws \InvalidArgumentException If the components do not form a valid URI. @@ -576,7 +625,7 @@ class Uri implements UriInterface throw new \InvalidArgumentException('Scheme must be a string'); } - return strtolower($scheme); + return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); } /** @@ -612,7 +661,7 @@ class Uri implements UriInterface throw new \InvalidArgumentException('Host must be a string'); } - return strtolower($host); + return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); } /** @@ -641,7 +690,7 @@ class Uri implements UriInterface /** * @param UriInterface $uri * @param array $keys - * + * * @return array */ private static function getFilteredQueryString(UriInterface $uri, array $keys) @@ -662,7 +711,7 @@ class Uri implements UriInterface /** * @param string $key * @param string|null $value - * + * * @return string */ private static function generateQueryString($key, $value) @@ -754,7 +803,7 @@ class Uri implements UriInterface 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', E_USER_DEPRECATED ); - $this->path = '/'. $this->path; + $this->path = '/' . $this->path; //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); } } diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php index 2b9174a5e..81419ead4 100644 --- a/vendor/guzzlehttp/psr7/src/UriNormalizer.php +++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -115,6 +115,7 @@ final class UriNormalizer * @param int $flags A bitmask of normalizations to apply, see constants * * @return UriInterface The normalized URI + * * @link https://tools.ietf.org/html/rfc3986#section-6.2 */ public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS) @@ -171,6 +172,7 @@ final class UriNormalizer * @param int $normalizations A bitmask of normalizations to apply, see constants * * @return bool + * * @link https://tools.ietf.org/html/rfc3986#section-6.1 */ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php index 26cecd53a..a3cb15d57 100644 --- a/vendor/guzzlehttp/psr7/src/UriResolver.php +++ b/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -19,6 +19,7 @@ final class UriResolver * @param string $path * * @return string + * * @link http://tools.ietf.org/html/rfc3986#section-5.2.4 */ public static function removeDotSegments($path) @@ -58,6 +59,7 @@ final class UriResolver * @param UriInterface $rel Relative URI * * @return UriInterface + * * @link http://tools.ietf.org/html/rfc3986#section-5.2 */ public static function resolve(UriInterface $base, UriInterface $rel) diff --git a/vendor/guzzlehttp/psr7/src/Utils.php b/vendor/guzzlehttp/psr7/src/Utils.php index 86960dde2..6b6c8cced 100644 --- a/vendor/guzzlehttp/psr7/src/Utils.php +++ b/vendor/guzzlehttp/psr7/src/Utils.php @@ -75,6 +75,7 @@ final class Utils * @param StreamInterface $stream Stream to read * @param int $maxLen Maximum number of bytes to read. Pass -1 * to read the entire stream. + * * @return string * * @throws \RuntimeException on error. @@ -181,7 +182,7 @@ final class Utils $standardPorts = ['http' => 80, 'https' => 443]; $scheme = $changes['uri']->getScheme(); if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':'.$port; + $changes['set_headers']['Host'] .= ':' . $port; } } } @@ -202,7 +203,7 @@ final class Utils } if ($request instanceof ServerRequestInterface) { - return (new ServerRequest( + $new = (new ServerRequest( isset($changes['method']) ? $changes['method'] : $request->getMethod(), $uri, $headers, @@ -216,6 +217,12 @@ final class Utils ->withQueryParams($request->getQueryParams()) ->withCookieParams($request->getCookieParams()) ->withUploadedFiles($request->getUploadedFiles()); + + foreach ($request->getAttributes() as $key => $value) { + $new = $new->withAttribute($key, $value); + } + + return $new; } return new Request( @@ -286,7 +293,7 @@ final class Utils * number of requested bytes are available. Any additional bytes will be * buffered and used in subsequent reads. * - * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data + * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data * @param array $options Additional options * * @return StreamInterface @@ -296,7 +303,7 @@ final class Utils public static function streamFor($resource = '', array $options = []) { if (is_scalar($resource)) { - $stream = fopen('php://temp', 'r+'); + $stream = self::tryFopen('php://temp', 'r+'); if ($resource !== '') { fwrite($stream, $resource); fseek($stream, 0); @@ -306,6 +313,17 @@ final class Utils switch (gettype($resource)) { case 'resource': + /* + * The 'php://input' is a special stream with quirks and inconsistencies. + * We avoid using that stream by reading it into php://temp + */ + $metaData = \stream_get_meta_data($resource); + if (isset($metaData['uri']) && $metaData['uri'] === 'php://input') { + $stream = self::tryFopen('php://temp', 'w+'); + fwrite($stream, stream_get_contents($resource)); + fseek($stream, 0); + $resource = $stream; + } return new Stream($resource, $options); case 'object': if ($resource instanceof StreamInterface) { @@ -324,7 +342,7 @@ final class Utils } break; case 'NULL': - return new Stream(fopen('php://temp', 'r+'), $options); + return new Stream(self::tryFopen('php://temp', 'r+'), $options); } if (is_callable($resource)) { @@ -352,14 +370,26 @@ final class Utils $ex = null; set_error_handler(function () use ($filename, $mode, &$ex) { $ex = new \RuntimeException(sprintf( - 'Unable to open %s using mode %s: %s', + 'Unable to open "%s" using mode "%s": %s', $filename, $mode, func_get_args()[1] )); + + return true; }); - $handle = fopen($filename, $mode); + try { + $handle = fopen($filename, $mode); + } catch (\Throwable $e) { + $ex = new \RuntimeException(sprintf( + 'Unable to open "%s" using mode "%s": %s', + $filename, + $mode, + $e->getMessage() + ), 0, $e); + } + restore_error_handler(); if ($ex) { diff --git a/vendor/guzzlehttp/psr7/src/functions.php b/vendor/guzzlehttp/psr7/src/functions.php index e4cc13619..b0901fadd 100644 --- a/vendor/guzzlehttp/psr7/src/functions.php +++ b/vendor/guzzlehttp/psr7/src/functions.php @@ -70,7 +70,7 @@ function uri_for($uri) * number of requested bytes are available. Any additional bytes will be * buffered and used in subsequent reads. * - * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data + * @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data * @param array $options Additional options * * @return StreamInterface @@ -187,6 +187,7 @@ function try_fopen($filename, $mode) * @param StreamInterface $stream Stream to read * @param int $maxLen Maximum number of bytes to read. Pass -1 * to read the entire stream. + * * @return string * * @throws \RuntimeException on error. @@ -311,6 +312,7 @@ function parse_query($str, $urlEncoding = true) * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 * to encode using RFC3986, or PHP_QUERY_RFC1738 * to encode using RFC1738. + * * @return string * * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead. @@ -361,6 +363,7 @@ function mimetype_from_extension($extension) * @return array * * @internal + * * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead. */ function _parse_message($message) @@ -377,6 +380,7 @@ function _parse_message($message) * @return string * * @internal + * * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead. */ function _parse_request_uri($path, array $headers) @@ -409,6 +413,7 @@ function get_message_body_summary(MessageInterface $message, $truncateAt = 120) * @return array * * @internal + * * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead. */ function _caseless_remove($keys, array $data) diff --git a/vendor/rmccue/requests/.codecov.yml b/vendor/rmccue/requests/.codecov.yml new file mode 100644 index 000000000..63f22d276 --- /dev/null +++ b/vendor/rmccue/requests/.codecov.yml @@ -0,0 +1,21 @@ +codecov: + notify: + after_n_builds: 2 + +coverage: + round: nearest + # Status will be green when coverage is between 85 and 100%. + range: "85...100" + status: + project: + default: + threshold: 1% + paths: + - "library" + patch: + default: + threshold: 0% + paths: + - "library" + +comment: false diff --git a/vendor/rmccue/requests/.coveralls.yml b/vendor/rmccue/requests/.coveralls.yml deleted file mode 100755 index 243fef67a..000000000 --- a/vendor/rmccue/requests/.coveralls.yml +++ /dev/null @@ -1,4 +0,0 @@ -src_dir: library -coverage_clover: tests/clover.xml -json_path: tests/coveralls.json -service_name: travis-ci \ No newline at end of file diff --git a/vendor/rmccue/requests/.gitignore b/vendor/rmccue/requests/.gitignore deleted file mode 100644 index 3b596264d..000000000 --- a/vendor/rmccue/requests/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Ignore coverage report -tests/coverage/* - -# Ignore composer related files -/composer.lock -/vendor diff --git a/vendor/rmccue/requests/.travis.yml b/vendor/rmccue/requests/.travis.yml deleted file mode 100644 index 07252b625..000000000 --- a/vendor/rmccue/requests/.travis.yml +++ /dev/null @@ -1,58 +0,0 @@ -language: php -matrix: - fast_finish: true - include: - - php: 5.2 - - php: 5.3 - - php: 5.4 - - php: 5.5 - - php: 5.6 - env: TEST_COVERAGE=1 - - php: 7.0 - - php: hhvm - -# Use new container infrastructure -sudo: false - -cache: - directories: - - $HOME/.cache/pip - - $HOME/.composer/cache - - vendor - -install: - # Setup the test server - - phpenv local 5.5 - - composer install --dev --no-interaction - - TESTPHPBIN=$(phpenv which php) - - phpenv local --unset - - # Setup the proxy - - pip install --user mitmproxy~=0.15 - -before_script: - - PHPBIN=$TESTPHPBIN PORT=8080 vendor/bin/start.sh - - export REQUESTS_TEST_HOST_HTTP="localhost:8080" - - # Work out of the tests directory - - cd tests - - PROXYBIN="$HOME/.local/bin/mitmdump" PORT=9002 utils/proxy/start.sh - - PROXYBIN="$HOME/.local/bin/mitmdump" PORT=9003 AUTH="test:pass" utils/proxy/start.sh - - export REQUESTS_HTTP_PROXY="localhost:9002" - - export REQUESTS_HTTP_PROXY_AUTH="localhost:9003" - - export REQUESTS_HTTP_PROXY_AUTH_USER="test" - - export REQUESTS_HTTP_PROXY_AUTH_PASS="pass" - - # Ensure the HTTPS test instance on Heroku is spun up - - curl -s -I http://requests-php-tests.herokuapp.com/ > /dev/null - -script: - - phpunit --coverage-clover clover.xml - -after_script: - - utils/proxy/stop.sh - - cd .. - - phpenv local 5.5 - - PATH=$PATH vendor/bin/stop.sh - - test $TEST_COVERAGE && bash <(curl -s https://codecov.io/bash) - - phpenv local --unset diff --git a/vendor/rmccue/requests/CHANGELOG.md b/vendor/rmccue/requests/CHANGELOG.md index 1d62a4cde..101d96312 100644 --- a/vendor/rmccue/requests/CHANGELOG.md +++ b/vendor/rmccue/requests/CHANGELOG.md @@ -1,6 +1,246 @@ Changelog ========= +1.8.0 +----- + +### IMPORTANT NOTES + +#### Last release supporting PHP 5.2 - 5.5 + + Release 1.8.0 will be the last release with compatibility for PHP 5.2 - 5.5. With the next release (v2.0.0), the minimum PHP version will be bumped to 5.6. + +#### Last release supporting PEAR distribution + + Release 1.8.0 will be the last release to be distributed via PEAR. From release 2.0.0 onwards, consumers of this library will have to switch to Composer to receive updates. + +### Overview of changes + +- **[SECURITY FIX] Disable deserialization in `FilteredIterator`** + + A `Deserialization of Untrusted Data` weakness was found in the `FilteredIterator` class. + + This security vulnerability was first reported to the WordPress project. The security fix applied to WordPress has been ported back into the library. + + GitHub security advisory: [CVE-2021-29476 - Deserialization of Untrusted Data](https://cve.mitre.org/cgi-bin/cvename.cgi?name=2021-29476) + + Related WordPress CVE: [https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-28032](https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-28032) + + (props [@dd32][gh-dd32], [@desrosj][gh-desrosj], [@jrfnl][gh-jrfnl], [@peterwilsoncc][gh-peterwilsoncc], [@SergeyBiryukov][gh-SergeyBiryukov], [@whyisjake][gh-whyisjake], [@xknown][gh-xknown], [#421][gh-421], [#422][gh-422]) + + +- **Repository moved to `WordPress\Requests`** + + The `Requests` library has been moved to the WordPress GitHub organization and can now be found under `https://github.com/WordPress/Requests`. + + All links in code and documentation were updated accordingly. + + Note: the Composer package name remains unchanged ([`rmccue/requests`](https://packagist.org/packages/rmccue/requests)), as well as the documentation site ([requests.ryanmccue.info](https://requests.ryanmccue.info/)). + + (props [@dd32][gh-dd32], [@JustinyAhin][gh-JustinyAhin], [@jrfnl][gh-jrfnl], [@rmccue][gh-rmccue], [#440][gh-440], [#441][gh-441], [#448][gh-448]) + + +- **Manage `"Expect"` header with `cURL` transport** + + By default, `cURL` adds a `Expect: 100-Continue` header to certain requests. This can add as much as a second delay to requests done using `cURL`. This is [discussed on the cURL mailing list](https://curl.se/mail/lib-2017-07/0013.html). + + To prevent this, `Requests` now adds an empty `"Expect"` header to requests that are smaller than 1 MB and use HTTP/1.1. + + (props [@carlalexander][gh-carlalexander], [@schlessera][gh-schlessera], [@TimothyBJacobs][gh-TimothyBJacobs], [#453][gh-453], [#454][gh-454], [#469][gh-469]) + + +- **Update bundled certificates as of 2021-02-12** + + The bundled certificates were updated. A small subset of expired certificates are still included for legacy reasons (and support). + + (props [@ozh][gh-ozh], [@patmead][gh-patmead], [@schlessera][gh-schlessera], [@todeveni][gh-todeveni], [#385][gh-385], [#398][gh-398], [#451][gh-451]) + + +- **Add required `Content-*` headers for empty `POST` requests** + + Sends the `Content-Length` and `Content-Type` headers even for empty `POST` requests, as the length is expected as per [RFC2616 Section 14.13](https://tools.ietf.org/html/rfc2616#section-14.13): + ``` + Content-Length header "SHOULD" be included. In practice, it is not + used for GET nor HEAD requests, but is expected for POST requests. + ``` + + (props [@dd32][gh-dd32], [@gstrauss][gh-gstrauss], [@jrfnl][gh-jrfnl], [@soulseekah][gh-soulseekah], [#248][gh-248], [#249][gh-249], [#318][gh-318], [#368][gh-368]) + + +- **Ignore locale when creating the HTTP version string from a float** + + The previous behavior allowed for the locale to mess up the float to string conversion resulting in a `GET / HTTP/1,1` instead of `GET / HTTP/1.1` request. + + (props [@tonebender][gh-tonebender], [@Zegnat][gh-Zegnat], [#335][gh-335], [#339][gh-339]) + + +- **Make `verify => false` work with `fsockopen`** + + This allows the `fsockopen` transport now to ignore SSL failures when requested. + + (props [@soulseekah][gh-soulseekah], [#310][gh-310], [#311][gh-311]) + + +- **Only include port number in the `Host` header if it differs from the default** + + The code was not violating the RFC per se, but also not following standard practice of leaving the port off when it is the default port for the scheme, which could lead to connectivity issues. + + (props [@amandato][gh-amandato], [@dd32][gh-dd32], [#238][gh-238]) + + +- **Fix PHP cross-version compatibility** + + Important fixes have been made to improve cross-version compatibility of the code across all supported PHP versions. + + - Use documented order for `implode()` arguments. + - Harden type handling when no domain was passed. + - Explicitly cast `$url` property to `string` in `Requests::parse_response()`. + - Initialize `$body` property to an empty string in `Requests::parse_response()`. + - Ensure the stream handle is valid before trying to close it. + - Ensure the `$callback` in the `FilteredIterator` is callable before calling it. + + (props [@aaronjorbin][gh-aaronjorbin], [@jrfnl][gh-jrfnl], [#346][gh-346], [#370][gh-370], [#425][gh-425], [#426][gh-426], [#456][gh-456], [#457][gh-457]) + + +- **Improve testing** + + Lots of improvements were made to render the tests more reliable and increase the coverage. + + And to top it all off, all tests are now run against all supported PHP versions, including PHP 8.0. + + (props [@datagutten][gh-datagutten], [@jrfnl][gh-jrfnl], [@schlessera][gh-schlessera], [#345][gh-345], [#351][gh-351], [#355][gh-355], [#366][gh-366], [#412][gh-412], [#414][gh-414], [#445][gh-445], [#458][gh-458], [#464][gh-464]) + + +- **Improve code quality and style** + + A whole swoop of changes has been made to harden the code and make it more consistent. + + The code style has been made consistent across both code and tests and is now enforced via a custom PHPCS rule set. + + The WordPress Coding Standards were chosen as the basis for the code style checks as most contributors to this library originate from the WordPress community and will be familiar with this code style. + + Main differences from the WordPress Coding Standards based on discussions and an analysis of the code styles already in use: + + - No whitespace on the inside of parentheses. + - No Yoda conditions. + + A more detailed overview of the decisions that went into the final code style rules can be found at [#434][gh-434]. + + (props [@jrfnl][gh-jrfnl], [@KasperFranz][gh-KasperFranz], [@ozh][gh-ozh], [@schlessera][gh-schlessera], [@TysonAndre][gh-TysonAndre], [#263][gh-263], [#296][gh-296], [#328][gh-328], [#358][gh-358], [#359][gh-359], [#360][gh-360], [#361][gh-361], [#362][gh-362], [#363][gh-363], [#364][gh-364], [#386][gh-386], [#396][gh-396], [#399][gh-399], [#400][gh-400], [#401][gh-401], [#402][gh-402], [#403][gh-403], [#404][gh-404], [#405][gh-405], [#406][gh-406], [#408][gh-408], [#409][gh-409], [#410][gh-410], [#411][gh-411], [#413][gh-413], [#415][gh-415], [#416][gh-416], [#417][gh-417], [#423][gh-423], [#424][gh-424], [#434][gh-434]) + + +- **Replace Travis CI with GitHub Actions (partial)** + + The entire CI setup is gradually being moved from Travis CI to GitHub Actions. + + At this point, GitHub Actions takes over the CI from PHP 5.5 onwards, leaving Travis CI as a fallback for lower PHP versions. + + This move will be completed after the planned minimum version bump to PHP 5.6+ with the next release, at which point we will get rid of all the remaining Travis CI integrations. + + (props [@dd32][gh-dd32], [@desrosj][gh-desrosj], [@jrfnl][gh-jrfnl], [@ntwb][gh-ntwb], [@ozh][gh-ozh], [@schlessera][gh-schlessera], [@TimothyBJacobs][gh-TimothyBJacobs], [@TysonAndre][gh-TysonAndre], [#280][gh-280], [#298][gh-298], [#302][gh-302], [#303][gh-303], [#352][gh-352], [#353][gh-353], [#354][gh-354], [#356][gh-356], [#388][gh-388], [#397][gh-397], [#428][gh-428], [#436][gh-436], [#439][gh-439], [#461][gh-461], [#467][gh-467]) + + +- **Update and improve documentation** + - Use clearer and more inclusive language. + - Update the GitHub Pages site. + - Update content and various tweaks to the markdown. + - Fix code blocks in `README.md` file. + - Add pagination to documentation pages. + + (props [@desrosj][gh-desrosj], [@jrfnl][gh-jrfnl], [@JustinyAhin][gh-JustinyAhin], [@tnorthcutt][gh-tnorthcutt], [#334][gh-334], [#367][gh-367], [#387][gh-387], [#443][gh-443], [#462][gh-462], [#465][gh-465], [#468][gh-468], [#471][gh-471] ) + +[gh-194]: https://github.com/WordPress/Requests/issues/194 +[gh-238]: https://github.com/WordPress/Requests/issues/238 +[gh-248]: https://github.com/WordPress/Requests/issues/248 +[gh-249]: https://github.com/WordPress/Requests/issues/249 +[gh-263]: https://github.com/WordPress/Requests/issues/263 +[gh-280]: https://github.com/WordPress/Requests/issues/280 +[gh-296]: https://github.com/WordPress/Requests/issues/296 +[gh-298]: https://github.com/WordPress/Requests/issues/298 +[gh-302]: https://github.com/WordPress/Requests/issues/302 +[gh-303]: https://github.com/WordPress/Requests/issues/303 +[gh-310]: https://github.com/WordPress/Requests/issues/310 +[gh-311]: https://github.com/WordPress/Requests/issues/311 +[gh-318]: https://github.com/WordPress/Requests/issues/318 +[gh-328]: https://github.com/WordPress/Requests/issues/328 +[gh-334]: https://github.com/WordPress/Requests/issues/334 +[gh-335]: https://github.com/WordPress/Requests/issues/335 +[gh-339]: https://github.com/WordPress/Requests/issues/339 +[gh-345]: https://github.com/WordPress/Requests/issues/345 +[gh-346]: https://github.com/WordPress/Requests/issues/346 +[gh-351]: https://github.com/WordPress/Requests/issues/351 +[gh-352]: https://github.com/WordPress/Requests/issues/352 +[gh-353]: https://github.com/WordPress/Requests/issues/353 +[gh-354]: https://github.com/WordPress/Requests/issues/354 +[gh-355]: https://github.com/WordPress/Requests/issues/355 +[gh-356]: https://github.com/WordPress/Requests/issues/356 +[gh-358]: https://github.com/WordPress/Requests/issues/358 +[gh-359]: https://github.com/WordPress/Requests/issues/359 +[gh-360]: https://github.com/WordPress/Requests/issues/360 +[gh-361]: https://github.com/WordPress/Requests/issues/361 +[gh-362]: https://github.com/WordPress/Requests/issues/362 +[gh-363]: https://github.com/WordPress/Requests/issues/363 +[gh-364]: https://github.com/WordPress/Requests/issues/364 +[gh-366]: https://github.com/WordPress/Requests/issues/366 +[gh-367]: https://github.com/WordPress/Requests/issues/367 +[gh-367]: https://github.com/WordPress/Requests/issues/367 +[gh-368]: https://github.com/WordPress/Requests/issues/368 +[gh-370]: https://github.com/WordPress/Requests/issues/370 +[gh-385]: https://github.com/WordPress/Requests/issues/385 +[gh-386]: https://github.com/WordPress/Requests/issues/386 +[gh-387]: https://github.com/WordPress/Requests/issues/387 +[gh-388]: https://github.com/WordPress/Requests/issues/388 +[gh-396]: https://github.com/WordPress/Requests/issues/396 +[gh-397]: https://github.com/WordPress/Requests/issues/397 +[gh-398]: https://github.com/WordPress/Requests/issues/398 +[gh-399]: https://github.com/WordPress/Requests/issues/399 +[gh-400]: https://github.com/WordPress/Requests/issues/400 +[gh-401]: https://github.com/WordPress/Requests/issues/401 +[gh-402]: https://github.com/WordPress/Requests/issues/402 +[gh-403]: https://github.com/WordPress/Requests/issues/403 +[gh-404]: https://github.com/WordPress/Requests/issues/404 +[gh-405]: https://github.com/WordPress/Requests/issues/405 +[gh-406]: https://github.com/WordPress/Requests/issues/406 +[gh-408]: https://github.com/WordPress/Requests/issues/408 +[gh-409]: https://github.com/WordPress/Requests/issues/409 +[gh-410]: https://github.com/WordPress/Requests/issues/410 +[gh-411]: https://github.com/WordPress/Requests/issues/411 +[gh-412]: https://github.com/WordPress/Requests/issues/412 +[gh-413]: https://github.com/WordPress/Requests/issues/413 +[gh-414]: https://github.com/WordPress/Requests/issues/414 +[gh-415]: https://github.com/WordPress/Requests/issues/415 +[gh-416]: https://github.com/WordPress/Requests/issues/416 +[gh-417]: https://github.com/WordPress/Requests/issues/417 +[gh-421]: https://github.com/WordPress/Requests/issues/421 +[gh-422]: https://github.com/WordPress/Requests/issues/422 +[gh-423]: https://github.com/WordPress/Requests/issues/423 +[gh-424]: https://github.com/WordPress/Requests/issues/424 +[gh-425]: https://github.com/WordPress/Requests/issues/425 +[gh-426]: https://github.com/WordPress/Requests/issues/426 +[gh-428]: https://github.com/WordPress/Requests/issues/428 +[gh-434]: https://github.com/WordPress/Requests/issues/434 +[gh-436]: https://github.com/WordPress/Requests/issues/436 +[gh-439]: https://github.com/WordPress/Requests/issues/439 +[gh-440]: https://github.com/WordPress/Requests/issues/440 +[gh-441]: https://github.com/WordPress/Requests/issues/441 +[gh-443]: https://github.com/WordPress/Requests/issues/443 +[gh-445]: https://github.com/WordPress/Requests/issues/445 +[gh-448]: https://github.com/WordPress/Requests/issues/448 +[gh-451]: https://github.com/WordPress/Requests/issues/451 +[gh-453]: https://github.com/WordPress/Requests/issues/453 +[gh-454]: https://github.com/WordPress/Requests/issues/454 +[gh-456]: https://github.com/WordPress/Requests/issues/456 +[gh-457]: https://github.com/WordPress/Requests/issues/457 +[gh-458]: https://github.com/WordPress/Requests/issues/458 +[gh-461]: https://github.com/WordPress/Requests/issues/461 +[gh-462]: https://github.com/WordPress/Requests/issues/462 +[gh-464]: https://github.com/WordPress/Requests/issues/464 +[gh-465]: https://github.com/WordPress/Requests/issues/465 +[gh-467]: https://github.com/WordPress/Requests/issues/467 +[gh-468]: https://github.com/WordPress/Requests/issues/468 +[gh-469]: https://github.com/WordPress/Requests/issues/469 +[gh-471]: https://github.com/WordPress/Requests/issues/471 + 1.7.0 ----- @@ -9,20 +249,20 @@ Changelog Requests is now tested against both HHVM and PHP 7, and they are supported as first-party platforms. - (props @rmccue, [#106][gh-106], [#176][gh-176]) + (props [@rmccue][gh-rmccue], [#106][gh-106], [#176][gh-176]) - Transfer & connect timeouts, in seconds & milliseconds cURL is unable to handle timeouts under a second in DNS lookups, so we round those up to ensure 1-999ms isn't counted as an instant failure. - (props @ozh, @rmccue, [#97][gh-97], [#216][gh-216]) + (props [@ozh][gh-ozh], [@rmccue][gh-rmccue], [#97][gh-97], [#216][gh-216]) - Rework cookie handling to be more thorough. Cookies are now restricted to the same-origin by default, expiration is checked. - (props @catharsisjelly, @rmccue, [#120][gh-120], [#124][gh-124], [#130][gh-130], [#132][gh-132], [#156][gh-156]) + (props [@catharsisjelly][gh-catharsisjelly], [@rmccue][gh-rmccue], [#120][gh-120], [#124][gh-124], [#130][gh-130], [#132][gh-132], [#156][gh-156]) - Improve testing @@ -30,243 +270,243 @@ Changelog improvements to the quality of the testing suite. There are now also comprehensive proxy tests to ensure coverage there. - (props @rmccue, [#75][gh-75], [#107][gh-107], [#170][gh-170], [#177][gh-177], [#181][gh-181], [#183][gh-183], [#185][gh-185], [#196][gh-196], [#202][gh-202], [#203][gh-203]) + (props [@rmccue][gh-rmccue], [#75][gh-75], [#107][gh-107], [#170][gh-170], [#177][gh-177], [#181][gh-181], [#183][gh-183], [#185][gh-185], [#196][gh-196], [#202][gh-202], [#203][gh-203]) - Support custom HTTP methods Previously, custom HTTP methods were only supported on sockets; they are now supported across all transports. - (props @ocean90, [#227][gh-227]) + (props [@ocean90][gh-ocean90], [#227][gh-227]) - Add byte limit option - (props @rmccue, [#172][gh-172]) + (props [@rmccue][gh-rmccue], [#172][gh-172]) - Support a Requests_Proxy_HTTP() instance for the proxy setting. - (props @ocean90, [#223][gh-223]) + (props [@ocean90][gh-ocean90], [#223][gh-223]) - Add progress hook - (props @rmccue, [#180][gh-180]) + (props [@rmccue][gh-rmccue], [#180][gh-180]) - Add a before_redirect hook to alter redirects - (props @rmccue, [#205][gh-205]) + (props [@rmccue][gh-rmccue], [#205][gh-205]) - Pass cURL info to after_request - (props @rmccue, [#206][gh-206]) + (props [@rmccue][gh-rmccue], [#206][gh-206]) - Remove explicit autoload in Composer installation instructions - (props @SlikNL, [#86][gh-86]) + (props [@SlikNL][gh-SlikNL], [#86][gh-86]) - Restrict CURLOPT_PROTOCOLS on `defined()` instead of `version_compare()` - (props @ozh, [#92][gh-92]) + (props [@ozh][gh-ozh], [#92][gh-92]) - Fix doc - typo in "Authentication" - (props @remik, [#99][gh-99]) + (props [@remik][gh-remik], [#99][gh-99]) - Contextually check for a valid transport - (props @ozh, [#101][gh-101]) + (props [@ozh][gh-ozh], [#101][gh-101]) - Follow relative redirects correctly - (props @ozh, [#103][gh-103]) + (props [@ozh][gh-ozh], [#103][gh-103]) - Use cURL's version_number - (props @mishan, [#104][gh-104]) + (props [@mishan][gh-mishan], [#104][gh-104]) - Removed duplicated option docs - (props @staabm, [#112][gh-112]) + (props [@staabm][gh-staabm], [#112][gh-112]) - code styling fixed - (props @imsaintx, [#113][gh-113]) + (props [@imsaintx][gh-imsaintx], [#113][gh-113]) - Fix IRI "normalization" - (props @ozh, [#128][gh-128]) + (props [@ozh][gh-ozh], [#128][gh-128]) - Mention two PHP extension dependencies in the README. - (props @orlitzky, [#136][gh-136]) + (props [@orlitzky][gh-orlitzky], [#136][gh-136]) - Ignore coverage report files - (props @ozh, [#148][gh-148]) + (props [@ozh][gh-ozh], [#148][gh-148]) - drop obsolete "return" after throw - (props @staabm, [#150][gh-150]) + (props [@staabm][gh-staabm], [#150][gh-150]) - Updated exception message to specify both http + https - (props @beutnagel, [#162][gh-162]) + (props [@beutnagel][gh-beutnagel], [#162][gh-162]) - Sets `stream_headers` method to public to allow calling it from other places. - (props @adri, [#158][gh-158]) + (props [@adri][gh-adri], [#158][gh-158]) - Remove duplicated stream_get_meta_data call - (props @rmccue, [#179][gh-179]) + (props [@rmccue][gh-rmccue], [#179][gh-179]) - Transmits $errno from stream_socket_client in exception - (props @laurentmartelli, [#174][gh-174]) + (props [@laurentmartelli][gh-laurentmartelli], [#174][gh-174]) - Correct methods to use snake_case - (props @rmccue, [#184][gh-184]) + (props [@rmccue][gh-rmccue], [#184][gh-184]) - Improve code quality - (props @rmccue, [#186][gh-186]) + (props [@rmccue][gh-rmccue], [#186][gh-186]) - Update Build Status image - (props @rmccue, [#187][gh-187]) + (props [@rmccue][gh-rmccue], [#187][gh-187]) - Fix/Rationalize transports (v2) - (props @rmccue, [#188][gh-188]) + (props [@rmccue][gh-rmccue], [#188][gh-188]) - Surface cURL errors - (props @ifwe, [#194][gh-194]) + (props [@ifwe][gh-ifwe], [#194][gh-194]) - Fix for memleak and curl_close() never being called - (props @kwuerl, [#200][gh-200]) + (props [@kwuerl][gh-kwuerl], [#200][gh-200]) - addex how to install with composer - (props @royopa, [#164][gh-164]) + (props [@royopa][gh-royopa], [#164][gh-164]) - Uppercase the method to ensure compatibility - (props @rmccue, [#207][gh-207]) + (props [@rmccue][gh-rmccue], [#207][gh-207]) - Store default certificate path - (props @rmccue, [#210][gh-210]) + (props [@rmccue][gh-rmccue], [#210][gh-210]) - Force closing keep-alive connections on old cURL - (props @rmccue, [#211][gh-211]) + (props [@rmccue][gh-rmccue], [#211][gh-211]) - Docs: Updated HTTP links with HTTPS links where applicable - (props @ntwb, [#215][gh-215]) + (props [@ntwb][gh-ntwb], [#215][gh-215]) - Remove the executable bit - (props @ocean90, [#224][gh-224]) + (props [@ocean90][gh-ocean90], [#224][gh-224]) - Change more links to HTTPS - (props @rmccue, [#217][gh-217]) + (props [@rmccue][gh-rmccue], [#217][gh-217]) - Bail from cURL when either `curl_init()` OR `curl_exec()` are unavailable - (props @dd32, [#230][gh-230]) + (props [@dd32][gh-dd32], [#230][gh-230]) - Disable OpenSSL's internal peer_name checking when `verifyname` is disabled. - (props @dd32, [#239][gh-239]) + (props [@dd32][gh-dd32], [#239][gh-239]) - Only include the port number in the `Host` header when it differs from default - (props @dd32, [#238][gh-238]) + (props [@dd32][gh-dd32], [#238][gh-238]) - Respect port if specified for HTTPS connections - (props @dd32, [#237][gh-237]) + (props [@dd32][gh-dd32], [#237][gh-237]) - Allow paths starting with a double-slash - (props @rmccue, [#240][gh-240]) + (props [@rmccue][gh-rmccue], [#240][gh-240]) - Fixes bug in rfc2616 #3.6.1 implementation. - (props @stephenharris, [#236][gh-236], [#3][gh-3]) + (props [@stephenharris][gh-stephenharris], [#236][gh-236], [#3][gh-3]) - CURLOPT_HTTPHEADER在php7接受空数组导致php-fpm奔溃 - (props @qibinghua, [#219][gh-219]) + (props [@qibinghua][gh-qibinghua], [#219][gh-219]) -[gh-3]: https://github.com/rmccue/Requests/issues/3 -[gh-75]: https://github.com/rmccue/Requests/issues/75 -[gh-86]: https://github.com/rmccue/Requests/issues/86 -[gh-92]: https://github.com/rmccue/Requests/issues/92 -[gh-97]: https://github.com/rmccue/Requests/issues/97 -[gh-99]: https://github.com/rmccue/Requests/issues/99 -[gh-101]: https://github.com/rmccue/Requests/issues/101 -[gh-103]: https://github.com/rmccue/Requests/issues/103 -[gh-104]: https://github.com/rmccue/Requests/issues/104 -[gh-106]: https://github.com/rmccue/Requests/issues/106 -[gh-107]: https://github.com/rmccue/Requests/issues/107 -[gh-112]: https://github.com/rmccue/Requests/issues/112 -[gh-113]: https://github.com/rmccue/Requests/issues/113 -[gh-120]: https://github.com/rmccue/Requests/issues/120 -[gh-124]: https://github.com/rmccue/Requests/issues/124 -[gh-128]: https://github.com/rmccue/Requests/issues/128 -[gh-130]: https://github.com/rmccue/Requests/issues/130 -[gh-132]: https://github.com/rmccue/Requests/issues/132 -[gh-136]: https://github.com/rmccue/Requests/issues/136 -[gh-148]: https://github.com/rmccue/Requests/issues/148 -[gh-150]: https://github.com/rmccue/Requests/issues/150 -[gh-156]: https://github.com/rmccue/Requests/issues/156 -[gh-158]: https://github.com/rmccue/Requests/issues/158 -[gh-162]: https://github.com/rmccue/Requests/issues/162 -[gh-164]: https://github.com/rmccue/Requests/issues/164 -[gh-170]: https://github.com/rmccue/Requests/issues/170 -[gh-172]: https://github.com/rmccue/Requests/issues/172 -[gh-174]: https://github.com/rmccue/Requests/issues/174 -[gh-176]: https://github.com/rmccue/Requests/issues/176 -[gh-177]: https://github.com/rmccue/Requests/issues/177 -[gh-179]: https://github.com/rmccue/Requests/issues/179 -[gh-180]: https://github.com/rmccue/Requests/issues/180 -[gh-181]: https://github.com/rmccue/Requests/issues/181 -[gh-183]: https://github.com/rmccue/Requests/issues/183 -[gh-184]: https://github.com/rmccue/Requests/issues/184 -[gh-185]: https://github.com/rmccue/Requests/issues/185 -[gh-186]: https://github.com/rmccue/Requests/issues/186 -[gh-187]: https://github.com/rmccue/Requests/issues/187 -[gh-188]: https://github.com/rmccue/Requests/issues/188 -[gh-194]: https://github.com/rmccue/Requests/issues/194 -[gh-196]: https://github.com/rmccue/Requests/issues/196 -[gh-200]: https://github.com/rmccue/Requests/issues/200 -[gh-202]: https://github.com/rmccue/Requests/issues/202 -[gh-203]: https://github.com/rmccue/Requests/issues/203 -[gh-205]: https://github.com/rmccue/Requests/issues/205 -[gh-206]: https://github.com/rmccue/Requests/issues/206 -[gh-207]: https://github.com/rmccue/Requests/issues/207 -[gh-210]: https://github.com/rmccue/Requests/issues/210 -[gh-211]: https://github.com/rmccue/Requests/issues/211 -[gh-215]: https://github.com/rmccue/Requests/issues/215 -[gh-216]: https://github.com/rmccue/Requests/issues/216 -[gh-217]: https://github.com/rmccue/Requests/issues/217 -[gh-219]: https://github.com/rmccue/Requests/issues/219 -[gh-223]: https://github.com/rmccue/Requests/issues/223 -[gh-224]: https://github.com/rmccue/Requests/issues/224 -[gh-227]: https://github.com/rmccue/Requests/issues/227 -[gh-230]: https://github.com/rmccue/Requests/issues/230 -[gh-236]: https://github.com/rmccue/Requests/issues/236 -[gh-237]: https://github.com/rmccue/Requests/issues/237 -[gh-238]: https://github.com/rmccue/Requests/issues/238 -[gh-239]: https://github.com/rmccue/Requests/issues/239 -[gh-240]: https://github.com/rmccue/Requests/issues/240 +[gh-3]: https://github.com/WordPress/Requests/issues/3 +[gh-75]: https://github.com/WordPress/Requests/issues/75 +[gh-86]: https://github.com/WordPress/Requests/issues/86 +[gh-92]: https://github.com/WordPress/Requests/issues/92 +[gh-97]: https://github.com/WordPress/Requests/issues/97 +[gh-99]: https://github.com/WordPress/Requests/issues/99 +[gh-101]: https://github.com/WordPress/Requests/issues/101 +[gh-103]: https://github.com/WordPress/Requests/issues/103 +[gh-104]: https://github.com/WordPress/Requests/issues/104 +[gh-106]: https://github.com/WordPress/Requests/issues/106 +[gh-107]: https://github.com/WordPress/Requests/issues/107 +[gh-112]: https://github.com/WordPress/Requests/issues/112 +[gh-113]: https://github.com/WordPress/Requests/issues/113 +[gh-120]: https://github.com/WordPress/Requests/issues/120 +[gh-124]: https://github.com/WordPress/Requests/issues/124 +[gh-128]: https://github.com/WordPress/Requests/issues/128 +[gh-130]: https://github.com/WordPress/Requests/issues/130 +[gh-132]: https://github.com/WordPress/Requests/issues/132 +[gh-136]: https://github.com/WordPress/Requests/issues/136 +[gh-148]: https://github.com/WordPress/Requests/issues/148 +[gh-150]: https://github.com/WordPress/Requests/issues/150 +[gh-156]: https://github.com/WordPress/Requests/issues/156 +[gh-158]: https://github.com/WordPress/Requests/issues/158 +[gh-162]: https://github.com/WordPress/Requests/issues/162 +[gh-164]: https://github.com/WordPress/Requests/issues/164 +[gh-170]: https://github.com/WordPress/Requests/issues/170 +[gh-172]: https://github.com/WordPress/Requests/issues/172 +[gh-174]: https://github.com/WordPress/Requests/issues/174 +[gh-176]: https://github.com/WordPress/Requests/issues/176 +[gh-177]: https://github.com/WordPress/Requests/issues/177 +[gh-179]: https://github.com/WordPress/Requests/issues/179 +[gh-180]: https://github.com/WordPress/Requests/issues/180 +[gh-181]: https://github.com/WordPress/Requests/issues/181 +[gh-183]: https://github.com/WordPress/Requests/issues/183 +[gh-184]: https://github.com/WordPress/Requests/issues/184 +[gh-185]: https://github.com/WordPress/Requests/issues/185 +[gh-186]: https://github.com/WordPress/Requests/issues/186 +[gh-187]: https://github.com/WordPress/Requests/issues/187 +[gh-188]: https://github.com/WordPress/Requests/issues/188 +[gh-194]: https://github.com/WordPress/Requests/issues/194 +[gh-196]: https://github.com/WordPress/Requests/issues/196 +[gh-200]: https://github.com/WordPress/Requests/issues/200 +[gh-202]: https://github.com/WordPress/Requests/issues/202 +[gh-203]: https://github.com/WordPress/Requests/issues/203 +[gh-205]: https://github.com/WordPress/Requests/issues/205 +[gh-206]: https://github.com/WordPress/Requests/issues/206 +[gh-207]: https://github.com/WordPress/Requests/issues/207 +[gh-210]: https://github.com/WordPress/Requests/issues/210 +[gh-211]: https://github.com/WordPress/Requests/issues/211 +[gh-215]: https://github.com/WordPress/Requests/issues/215 +[gh-216]: https://github.com/WordPress/Requests/issues/216 +[gh-217]: https://github.com/WordPress/Requests/issues/217 +[gh-219]: https://github.com/WordPress/Requests/issues/219 +[gh-223]: https://github.com/WordPress/Requests/issues/223 +[gh-224]: https://github.com/WordPress/Requests/issues/224 +[gh-227]: https://github.com/WordPress/Requests/issues/227 +[gh-230]: https://github.com/WordPress/Requests/issues/230 +[gh-236]: https://github.com/WordPress/Requests/issues/236 +[gh-237]: https://github.com/WordPress/Requests/issues/237 +[gh-238]: https://github.com/WordPress/Requests/issues/238 +[gh-239]: https://github.com/WordPress/Requests/issues/239 +[gh-240]: https://github.com/WordPress/Requests/issues/240 1.6.0 ----- @@ -297,19 +537,62 @@ default [docs/proxy]: http://requests.ryanmccue.info/docs/proxy.html [docs/usage-advanced]: http://requests.ryanmccue.info/docs/usage-advanced.html -[#1]: https://github.com/rmccue/Requests/issues/1 -[#2]: https://github.com/rmccue/Requests/issues/2 -[#3]: https://github.com/rmccue/Requests/issues/3 -[#6]: https://github.com/rmccue/Requests/issues/6 -[#9]: https://github.com/rmccue/Requests/issues/9 -[#23]: https://github.com/rmccue/Requests/issues/23 -[#62]: https://github.com/rmccue/Requests/issues/62 -[#63]: https://github.com/rmccue/Requests/issues/63 -[#64]: https://github.com/rmccue/Requests/issues/64 -[#70]: https://github.com/rmccue/Requests/issues/70 +[#1]: https://github.com/WordPress/Requests/issues/1 +[#2]: https://github.com/WordPress/Requests/issues/2 +[#3]: https://github.com/WordPress/Requests/issues/3 +[#6]: https://github.com/WordPress/Requests/issues/6 +[#9]: https://github.com/WordPress/Requests/issues/9 +[#23]: https://github.com/WordPress/Requests/issues/23 +[#62]: https://github.com/WordPress/Requests/issues/62 +[#63]: https://github.com/WordPress/Requests/issues/63 +[#64]: https://github.com/WordPress/Requests/issues/64 +[#70]: https://github.com/WordPress/Requests/issues/70 -[View all changes][https://github.com/rmccue/Requests/compare/v1.5.0...v1.6.0] +[View all changes][https://github.com/WordPress/Requests/compare/v1.5.0...v1.6.0] 1.5.0 ----- -Initial release! \ No newline at end of file +Initial release! + +[gh-aaronjorbin]: https://github.com/aaronjorbin +[gh-adri]: https://github.com/adri +[gh-amandato]: https://github.com/amandato +[gh-beutnagel]: https://github.com/beutnagel +[gh-carlalexander]: https://github.com/carlalexander +[gh-catharsisjelly]: https://github.com/catharsisjelly +[gh-datagutten]: https://github.com/datagutten +[gh-dd32]: https://github.com/dd32 +[gh-desrosj]: https://github.com/desrosj +[gh-gstrauss]: https://github.com/gstrauss +[gh-ifwe]: https://github.com/ifwe +[gh-imsaintx]: https://github.com/imsaintx +[gh-JustinyAhin]: https://github.com/JustinyAhin +[gh-jrfnl]: https://github.com/jrfnl +[gh-KasperFranz]: https://github.com/KasperFranz +[gh-kwuerl]: https://github.com/kwuerl +[gh-laurentmartelli]: https://github.com/laurentmartelli +[gh-mishan]: https://github.com/mishan +[gh-ntwb]: https://github.com/ntwb +[gh-ocean90]: https://github.com/ocean90 +[gh-orlitzky]: https://github.com/orlitzky +[gh-ozh]: https://github.com/ozh +[gh-patmead]: https://github.com/patmead +[gh-peterwilsoncc]: https://github.com/peterwilsoncc +[gh-qibinghua]: https://github.com/qibinghua +[gh-remik]: https://github.com/remik +[gh-rmccue]: https://github.com/rmccue +[gh-royopa]: https://github.com/royopa +[gh-schlessera]: https://github.com/schlessera +[gh-SergeyBiryukov]: https://github.com/SergeyBiryukov +[gh-SlikNL]: https://github.com/SlikNL +[gh-soulseekah]: https://github.com/soulseekah +[gh-staabm]: https://github.com/staabm +[gh-stephenharris]: https://github.com/stephenharris +[gh-TimothyBJacobs]: https://github.com/TimothyBJacobs +[gh-tnorthcutt]: https://github.com/tnorthcutt +[gh-todeveni]: https://github.com/todeveni +[gh-tonebender]: https://github.com/tonebender +[gh-TysonAndre]: https://github.com/TysonAndre +[gh-whyisjake]: https://github.com/whyisjake +[gh-xknown]: https://github.com/xknown +[gh-Zegnat]: https://github.com/Zegnat diff --git a/vendor/rmccue/requests/README.md b/vendor/rmccue/requests/README.md index 8e99a20ec..23f2ecc30 100644 --- a/vendor/rmccue/requests/README.md +++ b/vendor/rmccue/requests/README.md @@ -1,13 +1,16 @@ Requests for PHP ================ -[![Build Status](https://travis-ci.org/rmccue/Requests.svg?branch=master)](https://travis-ci.org/rmccue/Requests) -[![codecov.io](http://codecov.io/github/rmccue/Requests/coverage.svg?branch=master)](http://codecov.io/github/rmccue/Requests?branch=master) +[![CS](https://github.com/WordPress/Requests/actions/workflows/cs.yml/badge.svg)](https://github.com/WordPress/Requests/actions/workflows/cs.yml) +[![Lint](https://github.com/WordPress/Requests/actions/workflows/lint.yml/badge.svg)](https://github.com/WordPress/Requests/actions/workflows/lint.yml) +[![Test](https://github.com/WordPress/Requests/actions/workflows/test.yml/badge.svg)](https://github.com/WordPress/Requests/actions/workflows/test.yml) +[![CI PHP 5.2-5.4](https://travis-ci.org/WordPress/Requests.svg?branch=master)](https://travis-ci.org/WordPress/Requests) +[![codecov.io](http://codecov.io/github/WordPress/Requests/coverage.svg?branch=master)](http://codecov.io/github/WordPress/Requests?branch=master) Requests is a HTTP library written in PHP, for human beings. It is roughly based on the API from the excellent [Requests Python library](http://python-requests.org/). Requests is [ISC -Licensed](https://github.com/rmccue/Requests/blob/master/LICENSE) (similar to +Licensed](https://github.com/WordPress/Requests/blob/master/LICENSE) (similar to the new BSD license) and has no dependencies, except for PHP 5.2+. Despite PHP's use as a language for the web, its tools for sending HTTP requests @@ -36,7 +39,7 @@ var_dump($request->body); Requests allows you to send **HEAD**, **GET**, **POST**, **PUT**, **DELETE**, and **PATCH** HTTP requests. You can add headers, form data, multipart files, -and parameters with simple arrays, and access the response data in the same way. +and parameters with basic arrays, and access the response data in the same way. Requests uses cURL and fsockopen, depending on what your system has available, but abstracts all the nasty stuff out of your way, providing a consistent API. @@ -63,43 +66,49 @@ composer require rmccue/requests ``` or - - { - "require": { - "rmccue/requests": ">=1.0" - } +```json +{ + "require": { + "rmccue/requests": ">=1.0" } +} +``` ### Install source from GitHub To install the source code: - - $ git clone git://github.com/rmccue/Requests.git +```bash +$ git clone git://github.com/WordPress/Requests.git +``` And include it in your scripts: - - require_once '/path/to/Requests/library/Requests.php'; +```php +require_once '/path/to/Requests/library/Requests.php'; +``` You'll probably also want to register an autoloader: - - Requests::register_autoloader(); - +```php +Requests::register_autoloader(); +``` ### Install source from zip/tarball Alternatively, you can fetch a [tarball][] or [zipball][]: - $ curl -L https://github.com/rmccue/Requests/tarball/master | tar xzv - (or) - $ wget https://github.com/rmccue/Requests/tarball/master -O - | tar xzv +```bash +$ curl -L https://github.com/WordPress/Requests/tarball/master | tar xzv +(or) +$ wget https://github.com/WordPress/Requests/tarball/master -O - | tar xzv +``` -[tarball]: https://github.com/rmccue/Requests/tarball/master -[zipball]: https://github.com/rmccue/Requests/zipball/master +[tarball]: https://github.com/WordPress/Requests/tarball/master +[zipball]: https://github.com/WordPress/Requests/zipball/master ### Using a Class Loader If you're using a class loader (e.g., [Symfony Class Loader][]) for [PSR-0][]-style class loading: - - $loader->registerPrefix('Requests', 'path/to/vendor/Requests/library'); +```php +$loader->registerPrefix('Requests', 'path/to/vendor/Requests/library'); +``` [Symfony Class Loader]: https://github.com/symfony/ClassLoader [PSR-0]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md @@ -116,9 +125,9 @@ documented. Requests is [100% documented with PHPDoc](http://requests.ryanmccue.info/api/). If you find any problems with it, [create a new -issue](https://github.com/rmccue/Requests/issues/new)! +issue](https://github.com/WordPress/Requests/issues/new)! -[prose-based documentation]: https://github.com/rmccue/Requests/blob/master/docs/README.md +[prose-based documentation]: https://github.com/WordPress/Requests/blob/master/docs/README.md [request_method]: http://requests.ryanmccue.info/api/class-Requests.html#_request Testing @@ -127,18 +136,19 @@ Testing Requests strives to have 100% code-coverage of the library with an extensive set of tests. We're not quite there yet, but [we're getting close][codecov]. -[codecov]: http://codecov.io/github/rmccue/Requests +[codecov]: http://codecov.io/github/WordPress/Requests To run the test suite, first check that you have the [PHP JSON extension ](http://php.net/manual/en/book.json.php) enabled. Then simply: - - $ cd tests - $ phpunit +```bash +$ phpunit +``` If you'd like to run a single set of tests, specify just the name: - - $ phpunit Transport/cURL +```bash +$ phpunit Transport/cURL +``` Contribute ---------- @@ -149,4 +159,4 @@ Contribute 3. Write a test which shows that the bug was fixed or that the feature works as expected 4. Send a pull request and bug me until I merge it -[the repository]: https://github.com/rmccue/Requests +[the repository]: https://github.com/WordPress/Requests diff --git a/vendor/rmccue/requests/bin/create_pear_package.php b/vendor/rmccue/requests/bin/create_pear_package.php deleted file mode 100755 index 326770929..000000000 --- a/vendor/rmccue/requests/bin/create_pear_package.php +++ /dev/null @@ -1,55 +0,0 @@ - ' . PHP_EOL; - echo PHP_EOL; - echo ' version:' . PHP_EOL; - echo ' Version of the package, in the form of major.minor.bug' . PHP_EOL; - echo PHP_EOL; - echo ' stability:' . PHP_EOL; - echo ' One of alpha, beta, stable' . PHP_EOL; - die(); -} - -if (!isset($argv[2])) { - die('You must provide the stability (alpha, beta, or stable)'); -} - -$context = array( - 'date' => gmdate('Y-m-d'), - 'time' => gmdate('H:m:00'), - 'version' => $argv[1], - 'api_version' => $argv[1], - 'stability' => $argv[2], - 'api_stability' => $argv[2], -); - -$context['files'] = ''; -$path = realpath(dirname(__FILE__).'/../library/Requests'); -foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::LEAVES_ONLY) as $file) { - if (preg_match('/\.php$/', $file)) { - $name = str_replace($path . DIRECTORY_SEPARATOR, '', $file); - $name = str_replace(DIRECTORY_SEPARATOR, '/', $name); - $context['files'][] = "\t\t\t\t\t" . ''; - } -} - -$context['files'] = implode("\n", $context['files']); - -$template = file_get_contents(dirname(__FILE__).'/../package.xml.tpl'); -$content = preg_replace_callback('/\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/', 'replace_parameters', $template); -file_put_contents(dirname(__FILE__).'/../package.xml', $content); - -function replace_parameters($matches) { - global $context; - - return isset($context[$matches[1]]) ? $context[$matches[1]] : null; -} diff --git a/vendor/rmccue/requests/composer.json b/vendor/rmccue/requests/composer.json index 79744ceeb..b4025017f 100644 --- a/vendor/rmccue/requests/composer.json +++ b/vendor/rmccue/requests/composer.json @@ -1,7 +1,7 @@ { "name": "rmccue/requests", "description": "A HTTP library written in PHP, for human beings.", - "homepage": "http://github.com/rmccue/Requests", + "homepage": "http://github.com/WordPress/Requests", "license": "ISC", "keywords": ["http", "idna", "iri", "ipv6", "curl", "sockets", "fsockopen"], "authors": [ @@ -14,10 +14,34 @@ "php": ">=5.2" }, "require-dev": { - "requests/test-server": "dev-master" + "requests/test-server": "dev-master", + "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5", + "squizlabs/php_codesniffer": "^3.5", + "phpcompatibility/php-compatibility": "^9.0", + "wp-coding-standards/wpcs": "^2.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "php-parallel-lint/php-parallel-lint": "^1.3", + "php-parallel-lint/php-console-highlighter": "^0.5.0" }, "type": "library", "autoload": { "psr-0": {"Requests": "library/"} + }, + "scripts" : { + "lint": [ + "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git" + ], + "checkcs": [ + "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs" + ], + "fixcs": [ + "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf" + ], + "test": [ + "@php ./vendor/phpunit/phpunit/phpunit --no-coverage" + ], + "coverage": [ + "@php ./vendor/phpunit/phpunit/phpunit" + ] } } diff --git a/vendor/rmccue/requests/docs/README.md b/vendor/rmccue/requests/docs/README.md deleted file mode 100644 index 8116963d6..000000000 --- a/vendor/rmccue/requests/docs/README.md +++ /dev/null @@ -1,28 +0,0 @@ -Documentation -============= - -If you're here, you're looking for documentation for Requests! The documents -here are prose; you might also want to check out the [API documentation][]. - -[API documentation]: http://requests.ryanmccue.info/api/ - -* Introduction - * [Goals][goals] - * [Why should I use Requests instead of X?][why-requests] -* Usage - * [Making a request][usage] - * [Advanced usage][usage-advanced] - * [Authenticating your request][authentication] -* Advanced Usage - * [Custom authentication][authentication-custom] - * [Requests through proxy][proxy] - * [Hooking system][hooks] - -[goals]: goals.md -[why-requests]: why-requests.md -[usage]: usage.md -[usage-advanced]: usage-advanced.md -[authentication]: authentication.md -[authentication-custom]: authentication-custom.md -[hooks]: hooks.md -[proxy]: proxy.md \ No newline at end of file diff --git a/vendor/rmccue/requests/docs/authentication-custom.md b/vendor/rmccue/requests/docs/authentication-custom.md deleted file mode 100644 index d145d21cf..000000000 --- a/vendor/rmccue/requests/docs/authentication-custom.md +++ /dev/null @@ -1,44 +0,0 @@ -Custom Authentication -===================== -Custom authentication handlers are designed to be extremely simple to write. -In order to write a handler, you'll need to implement the `Requests_Auth` -interface. - -An instance of this handler is then passed in by the user via the `auth` -option, just like for normal authentication. - -Let's say we have a HTTP endpoint that checks for the `Hotdog` header and -authenticates you if said header is set to `Yummy`. (I don't know of any -services that do this; perhaps this is a market waiting to be tapped?) - -```php -class MySoftware_Auth_Hotdog implements Requests_Auth { - protected $password; - - public function __construct($password) { - $this->password = $password; - } - - public function register(Requests_Hooks &$hooks) { - $hooks->register('requests.before_request', array(&$this, 'before_request')); - } - - public function before_request(&$url, &$headers, &$data, &$type, &$options) { - $headers['Hotdog'] = $this->password; - } -} -``` - -We then use this in our request calls: - -``` -$options = array( - 'auth' => new MySoftware_Auth_Hotdog('yummy') -); -$response = Requests::get('http://hotdogbin.org/admin', array(), $options); -``` - -(For more information on how to register and use hooks, see the [hooking -system documentation][hooks]) - -[hooks]: hooks.md \ No newline at end of file diff --git a/vendor/rmccue/requests/docs/authentication.md b/vendor/rmccue/requests/docs/authentication.md deleted file mode 100644 index 574a49cc0..000000000 --- a/vendor/rmccue/requests/docs/authentication.md +++ /dev/null @@ -1,31 +0,0 @@ -Authentication -============== -Many requests that you make will require authentication of some type. Requests -includes support out of the box for HTTP Basic authentication, with more -built-ins coming soon. - -Making a Basic authenticated call is ridiculously easy: - -```php -$options = array( - 'auth' => new Requests_Auth_Basic(array('user', 'password')) -); -Requests::get('http://httpbin.org/basic-auth/user/password', array(), $options); -``` - -As Basic authentication is usually what you want when you specify a username -and password, you can also just pass in an array as a shorthand: - -```php -$options = array( - 'auth' => array('user', 'password') -); -Requests::get('http://httpbin.org/basic-auth/user/password', array(), $options); -``` - -Note that POST/PUT can also take a data parameter, so you also need that -before `$options`: - -```php -Requests::post('http://httpbin.org/basic-auth/user/password', array(), null, $options); -``` diff --git a/vendor/rmccue/requests/docs/goals.md b/vendor/rmccue/requests/docs/goals.md deleted file mode 100644 index 3275a3f09..000000000 --- a/vendor/rmccue/requests/docs/goals.md +++ /dev/null @@ -1,29 +0,0 @@ -Goals -===== - -1. **Simple interface** - - Requests is designed to provide a simple, unified interface to making - requests, regardless of what is available on the system. This means not worrying. - -2. **Fully tested code** - - Requests strives to have 90%+ code coverage from the unit tests, aiming for - the ideal 100%. Introducing new features always means introducing new tests - - (Note: some parts of the code are not covered by design. These sections are - marked with `@codeCoverageIgnore` tags) - -3. **Maximum compatibility** - - No matter what you have installed on your system, you should be able to run - Requests. We use cURL if it's available, and fallback to sockets otherwise. - We require only a baseline of PHP 5.2, leaving the choice of PHP minimum - requirement fully in your hands, and giving you the ability to support many - more hosts. - -4. **No dependencies** - - Requests is designed to be entirely self-contained and doesn't require - anything else at all. You can run Requests on an entirely stock PHP build - without any additional extensions outside the standard library. diff --git a/vendor/rmccue/requests/docs/hooks.md b/vendor/rmccue/requests/docs/hooks.md deleted file mode 100644 index 17d3b0f90..000000000 --- a/vendor/rmccue/requests/docs/hooks.md +++ /dev/null @@ -1,96 +0,0 @@ -Hooks -===== -Requests has a hook system that you can use to manipulate parts of the request -process along with internal transport hooks. - -Check out the [API documentation for `Requests_Hooks`][requests_hooks] for more -information on how to use the hook system. - -Available Hooks ---------------- - -* `requests.before_request` - - Alter the request before it's sent to the transport. - - Parameters: `string &$url`, `array &$headers`, `array|string &$data`, - `string &$type`, `array &$options` - -* `requests.before_parse` - - Alter the raw HTTP response before parsing - - Parameters: `string &$response` - -* `requests.after_request` - - Alter the response object before it's returned to the user - - Parameters: `Requests_Response &$return` - -* `curl.before_request` - - Set cURL options before the transport sets any (note that Requests may - override these) - - Parameters: `cURL resource &$fp` - -* `curl.before_send` - - Set cURL options just before the request is actually sent via `curl_exec` - - Parameters: `cURL resource &$fp` - -* `curl.after_request` - - Alter the raw HTTP response before returning for parsing - - Parameters: `string &$response, array &$info` - - `$info` contains the associated array as defined in [curl-getinfo-returnvalues](http://php.net/manual/en/function.curl-getinfo.php#refsect1-function.curl-getinfo-returnvalues) - -* `fsockopen.before_request` - - Run events before the transport does anything - -* `fsockopen.after_headers` - - Add extra headers before the body begins (i.e. before `\r\n\r\n`) - - Parameters: `string &$out` - -* `fsockopen.before_send` - - Add body data before sending the request - - Parameters: `string &$out` - -* `fsockopen.after_send` - - Run events after writing the data to the socket - -* `fsockopen.after_request` - - Alter the raw HTTP response before returning for parsing - - Parameters: `string &$response, array &$info` - - `$info` contains the associated array as defined in [stream-get-meta-data-returnvalues](http://php.net/manual/en/function.stream-get-meta-data.php#refsect1-function.stream-get-meta-data-returnvalues) - - -Registering Hooks ------------------ -Note: if you're doing this in an authentication handler, see the [Custom -Authentication guide][authentication-custom] instead. - -[authentication-custom]: authentication-custom.md - -In order to register your own hooks, you need to instantiate `Requests_hooks` -and pass this in via the 'hooks' option. - -```php -$hooks = new Requests_Hooks(); -$hooks->register('requests.after_request', 'mycallback'); - -$request = Requests::get('http://httpbin.org/get', array(), array('hooks' => $hooks)); -``` diff --git a/vendor/rmccue/requests/docs/proxy.md b/vendor/rmccue/requests/docs/proxy.md deleted file mode 100644 index cb2675de2..000000000 --- a/vendor/rmccue/requests/docs/proxy.md +++ /dev/null @@ -1,23 +0,0 @@ -Proxy Support -============= - -You can easily make requests through HTTP proxies. - -To make requests through an open proxy, specify the following options: - -```php -$options = array( - 'proxy' => '127.0.0.1:3128' -); -Requests::get('http://httpbin.org/ip', array(), $options); -``` - -If your proxy needs you to authenticate, the option will become an array like -the following: - -```php -$options = array( - 'proxy' => array( '127.0.0.1:3128', 'my_username', 'my_password' ) -); -Requests::get('http://httpbin.org/ip', array(), $options); -``` diff --git a/vendor/rmccue/requests/docs/usage-advanced.md b/vendor/rmccue/requests/docs/usage-advanced.md deleted file mode 100644 index b3f288085..000000000 --- a/vendor/rmccue/requests/docs/usage-advanced.md +++ /dev/null @@ -1,74 +0,0 @@ -Advanced Usage -============== - -Session Handling ----------------- -Making multiple requests to the same site with similar options can be a pain, -since you end up repeating yourself. The Session object can be used to set -default parameters for these. - -Let's simulate communicating with GitHub. - -```php -$session = new Requests_Session('https://api.github.com/'); -$session->headers['X-ContactAuthor'] = 'rmccue'; -$session->useragent = 'My-Awesome-App'; - -$response = $session->get('/zen'); -``` - -You can use the `url`, `headers`, `data` and `options` properties of the Session -object to set the defaults for this session, and the constructor also takes -parameters in the same order as `Requests::request()`. Accessing any other -properties will set the corresponding key in the options array; that is: - -```php -// Setting the property... -$session->useragent = 'My-Awesome-App'; - -// ...is the same as setting the option -$session->options['useragent'] = 'My-Awesome-App'; -``` - - -Secure Requests with SSL ------------------------- -By default, HTTPS requests will use the most secure options available: - -```php -$response = Requests::get('https://httpbin.org/'); -``` - -Requests bundles certificates from the [Mozilla certificate authority list][], -which is the same list of root certificates used in most browsers. If you're -accessing sites with certificates from other CAs, or self-signed certificates, -you can point Requests to a custom CA list in PEM form (the same format -accepted by cURL and OpenSSL): - -```php -$options = array( - 'verify' => '/path/to/cacert.pem' -); -$response = Requests::get('https://httpbin.org/', array(), $options); -``` - -Alternatively, if you want to disable verification completely, this is possible -with `'verify' => false`, but note that this is extremely insecure and should be -avoided. - -### Security Note -Requests supports SSL across both cURL and fsockopen in a transparent manner. -Unlike other PHP HTTP libraries, support for verifying the certificate name is -built-in; that is, a request for `https://github.com/` will actually verify the -certificate's name even with the fsockopen transport. This makes Requests the -first and currently only PHP HTTP library that supports full SSL verification. - -(Note that WordPress now also supports this verification, thanks to efforts by -the Requests development team.) - -(See also the [related PHP][php-bug-47030] and [OpenSSL-related][php-bug-55820] -bugs in PHP for more information on Subject Alternate Name field.) - -[Mozilla certificate authority list]: http://www.mozilla.org/projects/security/certs/ -[php-bug-47030]: https://bugs.php.net/bug.php?id=47030 -[php-bug-55820]:https://bugs.php.net/bug.php?id=55820 diff --git a/vendor/rmccue/requests/docs/usage.md b/vendor/rmccue/requests/docs/usage.md deleted file mode 100644 index 53ca4956c..000000000 --- a/vendor/rmccue/requests/docs/usage.md +++ /dev/null @@ -1,154 +0,0 @@ -Usage -===== - -Ready to go? Make sure you have Requests installed before attempting any of the -steps in this guide. - - -Loading Requests ----------------- -Before we can load Requests up, we'll need to make sure it's loaded. This is a -simple two-step: - -```php -// First, include Requests -include('/path/to/library/Requests.php'); - -// Next, make sure Requests can load internal classes -Requests::register_autoloader(); -``` - -If you'd like to bring along your own autoloader, you can forget about this -completely. - - -Make a GET Request ------------------- -One of the most basic things you can do with HTTP is make a GET request. - -Let's grab GitHub's public timeline: - -```php -$response = Requests::get('https://github.com/timeline.json'); -``` - -`$response` is now a **Requests_Response** object. Response objects are what -you'll be working with whenever you want to get data back from your request. - - -Using the Response Object -------------------------- -Now that we have the response from GitHub, let's get the body of the response. - -```php -var_dump($response->body); -// string(42865) "[{"repository":{"url":"... -``` - - -Custom Headers --------------- -If you want to add custom headers to the request, simply pass them in as an -associative array as the second parameter: - -```php -$response = Requests::get('https://github.com/timeline.json', array('X-Requests' => 'Is Awesome!')); -``` - - -Make a POST Request -------------------- -Making a POST request is very similar to making a GET: - -```php -$response = Requests::post('http://httpbin.org/post'); -``` - -You'll probably also want to pass in some data. You can pass in either a -string, an array or an object (Requests uses [`http_build_query`][build_query] -internally) as the third parameter (after the URL and headers): - -[build_query]: http://php.net/http_build_query - -```php -$data = array('key1' => 'value1', 'key2' => 'value2'); -$response = Requests::post('http://httpbin.org/post', array(), $data); -var_dump($response->body); -``` - -This gives the output: - - string(503) "{ - "origin": "124.191.162.147", - "files": {}, - "form": { - "key2": "value2", - "key1": "value1" - }, - "headers": { - "Content-Length": "23", - "Accept-Encoding": "deflate;q=1.0, compress;q=0.5, gzip;q=0.5", - "X-Forwarded-Port": "80", - "Connection": "keep-alive", - "User-Agent": "php-requests/1.6-dev", - "Host": "httpbin.org", - "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" - }, - "url": "http://httpbin.org/post", - "args": {}, - "data": "" - }" - -To send raw data, simply pass in a string instead. You'll probably also want to -set the Content-Type header to ensure the remote server knows what you're -sending it: - -```php -$url = 'https://api.github.com/some/endpoint'; -$headers = array('Content-Type' => 'application/json'); -$data = array('some' => 'data'); -$response = Requests::post($url, $headers, json_encode($data)); -``` - -Note that if you don't manually specify a Content-Type header, Requests has -undefined behaviour for the header. It may be set to various values depending -on the internal execution path, so it's recommended to set this explicitly if -you need to. - - -Status Codes ------------- -The Response object also gives you access to the status code: - -```php -var_dump($response->status_code); -// int(200) -``` - -You can also easily check if this status code is a success code, or if it's an -error: - -```php -var_dump($response->success); -// bool(true) -``` - - -Response Headers ----------------- -We can also grab headers pretty easily: - -```php -var_dump($response->headers['Date']); -// string(29) "Thu, 09 Feb 2012 15:22:06 GMT" -``` - -Note that this is case-insensitive, so the following are all equivalent: - -* `$response->headers['Date']` -* `$response->headers['date']` -* `$response->headers['DATE']` -* `$response->headers['dAtE']` - -If a header isn't set, this will give `null`. You can also check with -`isset($response->headers['date'])` diff --git a/vendor/rmccue/requests/docs/why-requests.md b/vendor/rmccue/requests/docs/why-requests.md deleted file mode 100644 index 28747313b..000000000 --- a/vendor/rmccue/requests/docs/why-requests.md +++ /dev/null @@ -1,192 +0,0 @@ -Why Requests Instead of X? -========================== -This is a quick look at why you should use Requests instead of another -solution. Keep in mind though that these are my point of view, and they may not -be issues for you. - -As always with software, you should choose what you think is best. - - -Why should I use Requests? --------------------------- -1. **Designed for maximum compatibility** - - The realities of working with widely deployable software mean that awesome - PHP features aren't always available. PHP 5.3, cURL, OpenSSL and more are not - necessarily going to be available on every system. While you're welcome to - require PHP 5.3, 5.4 or even 5.5, it's not our job to force you to use those. - - (The WordPress project estimates [about 60%][wpstats] of hosts are running - PHP 5.2, so this is a serious issue for developers working on large - deployable projects.) - - Don't worry though, Requests will automatically use better features where - possible, giving you an extra speed boost with cURL. - -2. **Simple API** - - Requests' API is designed to be able to be learnt in 10 minutes. Everything - from basic requests all the way up to advanced usage involving custom SSL - certificates and stored cookies is handled by a simple API. - - Other HTTP libraries optimize for the library developer's time; **Requests - optimizes for your time**. - -3. **Thoroughly tested** - - Requests is [continuously integrated with Travis][travis] and test coverage - is [constantly monitored with Coveralls][coveralls] to give you confidence in - the library. We aim for test coverage **over 90%** at all times, and new - features require new tests to go along with them. This ensures that you can - be confident in the quality of the code, as well as being able to update to - the latest version of Requests without worrying about compatibility. - -4. **Secure by default** - - Unlike other HTTP libraries, Requests is secure by default. Requests is the - **first and currently only** standalone HTTP library to - **[fully verify][requests_ssl] all HTTPS requests** even without cURL. We - also bundle the latest root certificate authorities to ensure that your - secure requests are actually secure. - - (Of note is that WordPress as of version 3.7 also supports full checking of - the certificates, thanks to [evangelism efforts on our behalf][wpssl]. - Together, we are the only HTTP libraries in PHP to fully verify certificates - to the same level as browsers.) - -5. **Extensible from the core** - - If you need low-level access to Requests' internals, simply plug your - callbacks in via the built-in [hooking system][] and mess around as much as - you want. Requests' simple hooking system is so powerful that both - authentication handlers and cookie support is actually handled internally - with hooks. - -[coveralls]: https://coveralls.io/r/rmccue/Requests -[hooking system]: hooks.md -[requests_ssl]: https://github.com/rmccue/Requests/blob/master/library/Requests/SSL.php -[travis]: https://travis-ci.org/rmccue/Requests -[wpssl]: http://core.trac.wordpress.org/ticket/25007 - - -Why shouldn't I use... ----------------------- -Requests isn't the first or only HTTP library in PHP and it's important to -acknowledge the other solutions out there. Here's why you should use Requests -instead of something else, in our opinion. - - -### cURL - -1. **Not every host has cURL installed** - - cURL is far from being ubiquitous, so you can't rely on it always being - available when distributing software. Anecdotal data collected from various - projects indicates that cURL is available on roughly 90% of hosts, but that - leaves 10% of hosts without it. - -2. **cURL's interface sucks** - - cURL's interface was designed for PHP 4, and hence uses resources with - horrible functions such as `curl_setopt()`. Combined with that, it uses 229 - global constants, polluting the global namespace horribly. - - Requests, on the other hand, exposes only a handful of classes to the - global namespace, most of which are for internal use. You can learn to use - the `Requests::request()` method and the `Requests_Response` object in the - space of 10 minutes and you already know how to use Requests. - - -### Guzzle - -1. **Requires cURL and PHP 5.3+** - - Guzzle is designed to be a client to fit a large number of installations, but - as a result of optimizing for Guzzle developer time, it uses cURL as an - underlying transport. As noted above, this is a majority of systems, but - far from all. - - The same is true for PHP 5.3+. While we'd all love to rely on PHP's newer - features, the fact is that a huge percentage of hosts are still running on - PHP 5.2. (The WordPress project estimates [about 60%][wpstats] of hosts are - running PHP 5.2.) - -2. **Not just a HTTP client** - - Guzzle is not intended to just be a HTTP client, but rather to be a - full-featured REST client. Requests is just a HTTP client, intentionally. Our - development strategy is to act as a low-level library that REST clients can - easily be built on, not to provide the whole kitchen sink for you. - - If you want to rapidly develop a web service client using a framework, Guzzle - will suit you perfectly. On the other hand, if you want a HTTP client without - all the rest, Requests is the way to go. - -[wpstats]: http://wordpress.org/about/stats/ - - -### Buzz - -1. **Requires PHP 5.3+** - - As with Guzzle, while PHP 5.3+ is awesome, you can't always rely on it being - on a host. With widely distributable software, this is a huge problem. - -2. **Not transport-transparent** - - For making certain types of requests, such as multi-requests, you can't rely - on a high-level abstraction and instead have to use the low-level transports. - This really gains nothing (other than a fancy interface) over just using the - methods directly and means that you can't rely on features to be available. - - -### fsockopen - -1. **Very low-level** - - fsockopen is used for working with sockets directly, so it only knows about - the transport layer (TCP in our case), not anything higher (i.e. HTTP on the - application layer). To be able to use fsockopen as a HTTP client, you need - to write all the HTTP code yourself, and once you're done, you'll end up - with something that is almost exactly like Requests. - - -### PEAR HTTP_Request2 - -1. **Requires PEAR** - - PEAR is (in theory) a great distribution system (with a less than wonderful - implementation), however it is not ubiquitous, as many hosts disable it to - save on space that most people aren't going to use anyway. - - PEAR is also a pain for users. Users want to be able to download a zip of - your project without needing to install anything else from PEAR. - - (If you really want though, Requests is available via PEAR. Check the README - to see how to grab it.) - -2. **Depends on other PEAR utilities** - - HTTP\_Request2 requires Net_URL2 in order to function, locking you in to - using PEAR for your project. - - Requests is entirely self-contained, and includes all the libraries it needs - (for example, Requests\_IRI is based on ComplexPie\_IRI by Geoffrey Sneddon). - - -### PECL HttpRequest - -1. **Requires a PECL extension** - - Similar to PEAR, users aren't big fans of installing extra libraries. Unlike - PEAR though, PECL extensions require compiling, which end users will be - unfamiliar with. In addition, on systems where users do not have full - control over PHP, they will be unable to install custom extensions. - - -### Zend Framework's Zend\_Http\_Client - -1. **Requires other parts of the Zend Framework** - - Similar to HTTP_Request2, Zend's client is not fully self-contained and - requires other components from the framework. diff --git a/vendor/rmccue/requests/examples/basic-auth.php b/vendor/rmccue/requests/examples/basic-auth.php deleted file mode 100644 index a9584a8ab..000000000 --- a/vendor/rmccue/requests/examples/basic-auth.php +++ /dev/null @@ -1,16 +0,0 @@ - array('someuser', 'password') -); -$request = Requests::get('http://httpbin.org/basic-auth/someuser/password', array(), $options); - -// Check what we received -var_dump($request); \ No newline at end of file diff --git a/vendor/rmccue/requests/examples/cookie.php b/vendor/rmccue/requests/examples/cookie.php deleted file mode 100644 index ba830fd23..000000000 --- a/vendor/rmccue/requests/examples/cookie.php +++ /dev/null @@ -1,16 +0,0 @@ - $c->formatForHeader())); - -// Check what we received -var_dump($request); \ No newline at end of file diff --git a/vendor/rmccue/requests/examples/cookie_jar.php b/vendor/rmccue/requests/examples/cookie_jar.php deleted file mode 100644 index 9887d5168..000000000 --- a/vendor/rmccue/requests/examples/cookie_jar.php +++ /dev/null @@ -1,20 +0,0 @@ - 'something']); - -// Now let's make a request! -$request = Requests::get( - 'http://httpbin.org/cookies', // Url - [], // No need to set the headers the Jar does this for us - ['cookies' => $c] // Pass in the Jar as an option -); - -// Check what we received -var_dump($request); \ No newline at end of file diff --git a/vendor/rmccue/requests/examples/get.php b/vendor/rmccue/requests/examples/get.php deleted file mode 100644 index 8d0653720..000000000 --- a/vendor/rmccue/requests/examples/get.php +++ /dev/null @@ -1,13 +0,0 @@ - 'application/json')); - -// Check what we received -var_dump($request); \ No newline at end of file diff --git a/vendor/rmccue/requests/examples/multiple.php b/vendor/rmccue/requests/examples/multiple.php deleted file mode 100644 index 69757c3b1..000000000 --- a/vendor/rmccue/requests/examples/multiple.php +++ /dev/null @@ -1,45 +0,0 @@ - 'http://httpbin.org/get', - 'headers' => array('Accept' => 'application/javascript'), - ), - 'post' => array( - 'url' => 'http://httpbin.org/post', - 'data' => array('mydata' => 'something'), - ), - 'delayed' => array( - 'url' => 'http://httpbin.org/delay/10', - 'options' => array( - 'timeout' => 20, - ), - ), -); - -// Setup a callback -function my_callback(&$request, $id) { - var_dump($id, $request); -} - -// Tell Requests to use the callback -$options = array( - 'complete' => 'my_callback', -); - -// Send the request! -$responses = Requests::request_multiple($requests, $options); - -// Note: the response from the above call will be an associative array matching -// $requests with the response data, however we've already handled it in -// my_callback() anyway! -// -// If you don't believe me, uncomment this: -# var_dump($responses); \ No newline at end of file diff --git a/vendor/rmccue/requests/examples/post.php b/vendor/rmccue/requests/examples/post.php deleted file mode 100644 index 5c9e2c777..000000000 --- a/vendor/rmccue/requests/examples/post.php +++ /dev/null @@ -1,13 +0,0 @@ - 'something')); - -// Check what we received -var_dump($request); \ No newline at end of file diff --git a/vendor/rmccue/requests/examples/proxy.php b/vendor/rmccue/requests/examples/proxy.php deleted file mode 100644 index c8a2e94bc..000000000 --- a/vendor/rmccue/requests/examples/proxy.php +++ /dev/null @@ -1,18 +0,0 @@ - '127.0.0.1:8080', // syntax: host:port, eg 12.13.14.14:8080 or someproxy.com:3128 - // If you need to authenticate, use the following syntax: - // 'proxy' => array( '127.0.0.1:8080', 'username', 'password' ), -); -$request = Requests::get('http://httpbin.org/ip', array(), $options ); - -// See result -var_dump($request->body); diff --git a/vendor/rmccue/requests/examples/session.php b/vendor/rmccue/requests/examples/session.php deleted file mode 100644 index ff44d240a..000000000 --- a/vendor/rmccue/requests/examples/session.php +++ /dev/null @@ -1,24 +0,0 @@ -headers['Accept'] = 'application/json'; -$session->useragent = 'Awesomesauce'; - -// Now let's make a request! -$request = $session->get('/get'); - -// Check what we received -var_dump($request); - -// Let's check our user agent! -$request = $session->get('/user-agent'); - -// And check again -var_dump($request); diff --git a/vendor/rmccue/requests/examples/timeout.php b/vendor/rmccue/requests/examples/timeout.php deleted file mode 100644 index 5a1c2f74c..000000000 --- a/vendor/rmccue/requests/examples/timeout.php +++ /dev/null @@ -1,17 +0,0 @@ - 2.5, -); - -// Now let's make a request to a page that will delay its response by 3 seconds -$request = Requests::get('http://httpbin.org/delay/3', array(), $options); - -// An exception will be thrown, stating a timeout of the request ! diff --git a/vendor/rmccue/requests/library/Requests.php b/vendor/rmccue/requests/library/Requests.php index bb266189c..997bfa84e 100644 --- a/vendor/rmccue/requests/library/Requests.php +++ b/vendor/rmccue/requests/library/Requests.php @@ -143,7 +143,7 @@ class Requests { $file = str_replace('_', '/', $class); if (file_exists(dirname(__FILE__) . '/' . $file . '.php')) { - require_once(dirname(__FILE__) . '/' . $file . '.php'); + require_once dirname(__FILE__) . '/' . $file . '.php'; } } @@ -187,7 +187,8 @@ class Requests { // Don't search for a transport if it's already been done for these $capabilities if (isset(self::$transport[$cap_string]) && self::$transport[$cap_string] !== null) { - return new self::$transport[$cap_string](); + $class = self::$transport[$cap_string]; + return new $class(); } // @codeCoverageIgnoreEnd @@ -214,7 +215,8 @@ class Requests { throw new Requests_Exception('No working transports found', 'notransport', self::$transports); } - return new self::$transport[$cap_string](); + $class = self::$transport[$cap_string]; + return new $class(); } /**#@+ @@ -340,7 +342,7 @@ class Requests { * across transports.) * (string|boolean, default: library/Requests/Transport/cacert.pem) * - `verifyname`: Should we verify the common name in the SSL certificate? - * (boolean: default, true) + * (boolean, default: true) * - `data_format`: How should we send the `$data` parameter? * (string, one of 'query' or 'body', default: 'query' for * HEAD/GET/DELETE, 'body' for POST/PUT/OPTIONS/PATCH) @@ -372,9 +374,9 @@ class Requests { } } else { - $need_ssl = (0 === stripos($url, 'https://')); + $need_ssl = (stripos($url, 'https://') === 0); $capabilities = array('ssl' => $need_ssl); - $transport = self::get_transport($capabilities); + $transport = self::get_transport($capabilities); } $response = $transport->request($url, $headers, $data, $options); @@ -445,7 +447,7 @@ class Requests { $request['type'] = self::GET; } if (!isset($request['options'])) { - $request['options'] = $options; + $request['options'] = $options; $request['options']['type'] = $request['type']; } else { @@ -501,25 +503,25 @@ class Requests { */ protected static function get_default_options($multirequest = false) { $defaults = array( - 'timeout' => 10, - 'connect_timeout' => 10, - 'useragent' => 'php-requests/' . self::VERSION, + 'timeout' => 10, + 'connect_timeout' => 10, + 'useragent' => 'php-requests/' . self::VERSION, 'protocol_version' => 1.1, - 'redirected' => 0, - 'redirects' => 10, + 'redirected' => 0, + 'redirects' => 10, 'follow_redirects' => true, - 'blocking' => true, - 'type' => self::GET, - 'filename' => false, - 'auth' => false, - 'proxy' => false, - 'cookies' => false, - 'max_bytes' => false, - 'idn' => true, - 'hooks' => null, - 'transport' => null, - 'verify' => Requests::get_certificate_path(), - 'verifyname' => true, + 'blocking' => true, + 'type' => self::GET, + 'filename' => false, + 'auth' => false, + 'proxy' => false, + 'cookies' => false, + 'max_bytes' => false, + 'idn' => true, + 'hooks' => null, + 'transport' => null, + 'verify' => self::get_certificate_path(), + 'verifyname' => true, ); if ($multirequest !== false) { $defaults['complete'] = null; @@ -533,8 +535,8 @@ class Requests { * @return string Default certificate path. */ public static function get_certificate_path() { - if ( ! empty( Requests::$certificate_path ) ) { - return Requests::$certificate_path; + if (!empty(self::$certificate_path)) { + return self::$certificate_path; } return dirname(__FILE__) . '/Requests/Transport/cacert.pem'; @@ -545,8 +547,8 @@ class Requests { * * @param string $path Certificate path, pointing to a PEM file. */ - public static function set_certificate_path( $path ) { - Requests::$certificate_path = $path; + public static function set_certificate_path($path) { + self::$certificate_path = $path; } /** @@ -593,16 +595,16 @@ class Requests { } if ($options['idn'] !== false) { - $iri = new Requests_IRI($url); + $iri = new Requests_IRI($url); $iri->host = Requests_IDNAEncoder::encode($iri->ihost); - $url = $iri->uri; + $url = $iri->uri; } // Massage the type to ensure we support it. $type = strtoupper($type); if (!isset($options['data_format'])) { - if (in_array($type, array(self::HEAD, self::GET, self::DELETE))) { + if (in_array($type, array(self::HEAD, self::GET, self::DELETE), true)) { $options['data_format'] = 'query'; } else { @@ -631,20 +633,23 @@ class Requests { return $return; } - $return->raw = $headers; - $return->url = $url; + $return->raw = $headers; + $return->url = (string) $url; + $return->body = ''; if (!$options['filename']) { - if (($pos = strpos($headers, "\r\n\r\n")) === false) { + $pos = strpos($headers, "\r\n\r\n"); + if ($pos === false) { // Crap! throw new Requests_Exception('Missing header/body separator', 'requests.no_crlf_separator'); } $headers = substr($return->raw, 0, $pos); - $return->body = substr($return->raw, $pos + strlen("\n\r\n\r")); - } - else { - $return->body = ''; + // Headers will always be separated from the body by two new lines - `\n\r\n\r`. + $body = substr($return->raw, $pos + 4); + if (!empty($body)) { + $return->body = $body; + } } // Pretend CRLF = LF for compatibility (RFC 2616, section 19.3) $headers = str_replace("\r\n", "\n", $headers); @@ -656,14 +661,14 @@ class Requests { throw new Requests_Exception('Response could not be parsed', 'noversion', $headers); } $return->protocol_version = (float) $matches[1]; - $return->status_code = (int) $matches[2]; + $return->status_code = (int) $matches[2]; if ($return->status_code >= 200 && $return->status_code < 300) { $return->success = true; } foreach ($headers as $header) { list($key, $value) = explode(':', $header, 2); - $value = trim($value); + $value = trim($value); preg_replace('#(\s+)#i', ' ', $value); $return->headers[$key] = $value; } @@ -700,10 +705,10 @@ class Requests { &$req_headers, &$req_data, &$options, - $return + $return, ); $options['hooks']->dispatch('requests.before_redirect', $hook_args); - $redirected = self::request($location, $req_headers, $req_data, $options['type'], $options); + $redirected = self::request($location, $req_headers, $req_data, $options['type'], $options); $redirected->history[] = $return; return $redirected; } @@ -730,10 +735,10 @@ class Requests { */ public static function parse_multiple(&$response, $request) { try { - $url = $request['url']; - $headers = $request['headers']; - $data = $request['data']; - $options = $request['options']; + $url = $request['url']; + $headers = $request['headers']; + $data = $request['data']; + $options = $request['options']; $response = self::parse_response($response, $url, $headers, $data, $options); } catch (Requests_Exception $e) { @@ -753,8 +758,6 @@ class Requests { return $data; } - - $decoded = ''; $encoded = $data; @@ -772,8 +775,8 @@ class Requests { } $chunk_length = strlen($matches[0]); - $decoded .= substr($encoded, $chunk_length, $length); - $encoded = substr($encoded, $chunk_length + $length + 2); + $decoded .= substr($encoded, $chunk_length, $length); + $encoded = substr($encoded, $chunk_length + $length + 2); if (trim($encoded) === '0' || empty($encoded)) { return $decoded; @@ -826,17 +829,31 @@ class Requests { return $data; } - if (function_exists('gzdecode') && ($decoded = @gzdecode($data)) !== false) { + if (function_exists('gzdecode')) { + // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.gzdecodeFound -- Wrapped in function_exists() for PHP 5.2. + $decoded = @gzdecode($data); + if ($decoded !== false) { + return $decoded; + } + } + + if (function_exists('gzinflate')) { + $decoded = @gzinflate($data); + if ($decoded !== false) { + return $decoded; + } + } + + $decoded = self::compatible_gzinflate($data); + if ($decoded !== false) { return $decoded; } - elseif (function_exists('gzinflate') && ($decoded = @gzinflate($data)) !== false) { - return $decoded; - } - elseif (($decoded = self::compatible_gzinflate($data)) !== false) { - return $decoded; - } - elseif (function_exists('gzuncompress') && ($decoded = @gzuncompress($data)) !== false) { - return $decoded; + + if (function_exists('gzuncompress')) { + $decoded = @gzuncompress($data); + if ($decoded !== false) { + return $decoded; + } } return $data; @@ -859,32 +876,32 @@ class Requests { * @link https://secure.php.net/manual/en/function.gzinflate.php#70875 * @link https://secure.php.net/manual/en/function.gzinflate.php#77336 * - * @param string $gzData String to decompress. + * @param string $gz_data String to decompress. * @return string|bool False on failure. */ - public static function compatible_gzinflate($gzData) { + public static function compatible_gzinflate($gz_data) { // Compressed data might contain a full zlib header, if so strip it for // gzinflate() - if (substr($gzData, 0, 3) == "\x1f\x8b\x08") { - $i = 10; - $flg = ord(substr($gzData, 3, 1)); + if (substr($gz_data, 0, 3) === "\x1f\x8b\x08") { + $i = 10; + $flg = ord(substr($gz_data, 3, 1)); if ($flg > 0) { if ($flg & 4) { - list($xlen) = unpack('v', substr($gzData, $i, 2)); - $i = $i + 2 + $xlen; + list($xlen) = unpack('v', substr($gz_data, $i, 2)); + $i += 2 + $xlen; } if ($flg & 8) { - $i = strpos($gzData, "\0", $i) + 1; + $i = strpos($gz_data, "\0", $i) + 1; } if ($flg & 16) { - $i = strpos($gzData, "\0", $i) + 1; + $i = strpos($gz_data, "\0", $i) + 1; } if ($flg & 2) { - $i = $i + 2; + $i += 2; } } - $decompressed = self::compatible_gzinflate(substr($gzData, $i)); - if (false !== $decompressed) { + $decompressed = self::compatible_gzinflate(substr($gz_data, $i)); + if ($decompressed !== false) { return $decompressed; } } @@ -900,57 +917,61 @@ class Requests { $huffman_encoded = false; // low nibble of first byte should be 0x08 - list(, $first_nibble) = unpack('h', $gzData); + list(, $first_nibble) = unpack('h', $gz_data); // First 2 bytes should be divisible by 0x1F - list(, $first_two_bytes) = unpack('n', $gzData); + list(, $first_two_bytes) = unpack('n', $gz_data); - if (0x08 == $first_nibble && 0 == ($first_two_bytes % 0x1F)) { + if ($first_nibble === 0x08 && ($first_two_bytes % 0x1F) === 0) { $huffman_encoded = true; } if ($huffman_encoded) { - if (false !== ($decompressed = @gzinflate(substr($gzData, 2)))) { + $decompressed = @gzinflate(substr($gz_data, 2)); + if ($decompressed !== false) { return $decompressed; } } - if ("\x50\x4b\x03\x04" == substr($gzData, 0, 4)) { + if (substr($gz_data, 0, 4) === "\x50\x4b\x03\x04") { // ZIP file format header // Offset 6: 2 bytes, General-purpose field // Offset 26: 2 bytes, filename length // Offset 28: 2 bytes, optional field length // Offset 30: Filename field, followed by optional field, followed // immediately by data - list(, $general_purpose_flag) = unpack('v', substr($gzData, 6, 2)); + list(, $general_purpose_flag) = unpack('v', substr($gz_data, 6, 2)); // If the file has been compressed on the fly, 0x08 bit is set of // the general purpose field. We can use this to differentiate // between a compressed document, and a ZIP file - $zip_compressed_on_the_fly = (0x08 == (0x08 & $general_purpose_flag)); + $zip_compressed_on_the_fly = ((0x08 & $general_purpose_flag) === 0x08); if (!$zip_compressed_on_the_fly) { // Don't attempt to decode a compressed zip file - return $gzData; + return $gz_data; } // Determine the first byte of data, based on the above ZIP header // offsets: - $first_file_start = array_sum(unpack('v2', substr($gzData, 26, 4))); - if (false !== ($decompressed = @gzinflate(substr($gzData, 30 + $first_file_start)))) { + $first_file_start = array_sum(unpack('v2', substr($gz_data, 26, 4))); + $decompressed = @gzinflate(substr($gz_data, 30 + $first_file_start)); + if ($decompressed !== false) { return $decompressed; } return false; } // Finally fall back to straight gzinflate - if (false !== ($decompressed = @gzinflate($gzData))) { + $decompressed = @gzinflate($gz_data); + if ($decompressed !== false) { return $decompressed; } // Fallback for all above failing, not expected, but included for // debugging and preventing regressions and to track stats - if (false !== ($decompressed = @gzinflate(substr($gzData, 2)))) { + $decompressed = @gzinflate(substr($gz_data, 2)); + if ($decompressed !== false) { return $decompressed; } diff --git a/vendor/rmccue/requests/library/Requests/Auth.php b/vendor/rmccue/requests/library/Requests/Auth.php index bca410920..914c7449c 100644 --- a/vendor/rmccue/requests/library/Requests/Auth.php +++ b/vendor/rmccue/requests/library/Requests/Auth.php @@ -29,5 +29,5 @@ interface Requests_Auth { * @see Requests_Hooks::register * @param Requests_Hooks $hooks Hook system */ - public function register(Requests_Hooks &$hooks); -} \ No newline at end of file + public function register(Requests_Hooks $hooks); +} diff --git a/vendor/rmccue/requests/library/Requests/Auth/Basic.php b/vendor/rmccue/requests/library/Requests/Auth/Basic.php index a355cfd5f..68d15bd5d 100644 --- a/vendor/rmccue/requests/library/Requests/Auth/Basic.php +++ b/vendor/rmccue/requests/library/Requests/Auth/Basic.php @@ -53,9 +53,9 @@ class Requests_Auth_Basic implements Requests_Auth { * @see fsockopen_header * @param Requests_Hooks $hooks Hook system */ - public function register(Requests_Hooks &$hooks) { - $hooks->register('curl.before_send', array(&$this, 'curl_before_send')); - $hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header')); + public function register(Requests_Hooks $hooks) { + $hooks->register('curl.before_send', array($this, 'curl_before_send')); + $hooks->register('fsockopen.after_headers', array($this, 'fsockopen_header')); } /** @@ -85,4 +85,4 @@ class Requests_Auth_Basic implements Requests_Auth { public function getAuthString() { return $this->user . ':' . $this->pass; } -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Cookie.php b/vendor/rmccue/requests/library/Requests/Cookie.php index 00fbbc73b..7dd5b6822 100644 --- a/vendor/rmccue/requests/library/Requests/Cookie.php +++ b/vendor/rmccue/requests/library/Requests/Cookie.php @@ -65,16 +65,16 @@ class Requests_Cookie { * @param array|Requests_Utility_CaseInsensitiveDictionary $attributes Associative array of attribute data */ public function __construct($name, $value, $attributes = array(), $flags = array(), $reference_time = null) { - $this->name = $name; - $this->value = $value; + $this->name = $name; + $this->value = $value; $this->attributes = $attributes; - $default_flags = array( - 'creation' => time(), + $default_flags = array( + 'creation' => time(), 'last-access' => time(), - 'persistent' => false, - 'host-only' => true, + 'persistent' => false, + 'host-only' => true, ); - $this->flags = array_merge($default_flags, $flags); + $this->flags = array_merge($default_flags, $flags); $this->reference_time = time(); if ($reference_time !== null) { @@ -228,7 +228,7 @@ class Requests_Cookie { public function normalize() { foreach ($this->attributes as $key => $value) { $orig_value = $value; - $value = $this->normalize_attribute($key, $value); + $value = $this->normalize_attribute($key, $value); if ($value === null) { unset($this->attributes[$key]); continue; @@ -288,6 +288,11 @@ class Requests_Cookie { return $expiry_time; case 'domain': + // Domains are not required as per RFC 6265 section 5.2.3 + if (empty($value)) { + return null; + } + // Domain normalization, as per RFC 6265 section 5.2.3 if ($value[0] === '.') { $value = substr($value, 1); @@ -380,7 +385,7 @@ class Requests_Cookie { * @return Requests_Cookie Parsed cookie object */ public static function parse($string, $name = '', $reference_time = null) { - $parts = explode(';', $string); + $parts = explode(';', $string); $kvparts = array_shift($parts); if (!empty($name)) { @@ -392,13 +397,13 @@ class Requests_Cookie { // (`=foo`) // // https://bugzilla.mozilla.org/show_bug.cgi?id=169091 - $name = ''; + $name = ''; $value = $kvparts; } else { list($name, $value) = explode('=', $kvparts, 2); } - $name = trim($name); + $name = trim($name); $value = trim($value); // Attribute key are handled case-insensitively @@ -407,15 +412,15 @@ class Requests_Cookie { if (!empty($parts)) { foreach ($parts as $part) { if (strpos($part, '=') === false) { - $part_key = $part; + $part_key = $part; $part_value = true; } else { list($part_key, $part_value) = explode('=', $part, 2); - $part_value = trim($part_value); + $part_value = trim($part_value); } - $part_key = trim($part_key); + $part_key = trim($part_key); $attributes[$part_key] = $part_value; } } @@ -444,7 +449,7 @@ class Requests_Cookie { // Default domain/path attributes if (empty($parsed->attributes['domain']) && !empty($origin)) { $parsed->attributes['domain'] = $origin->host; - $parsed->flags['host-only'] = true; + $parsed->flags['host-only'] = true; } else { $parsed->flags['host-only'] = false; @@ -492,7 +497,7 @@ class Requests_Cookie { * * @codeCoverageIgnore * @deprecated Use {@see Requests_Cookie::parse_from_headers} - * @return string + * @return array */ public static function parseFromHeaders(Requests_Response_Headers $headers) { return self::parse_from_headers($headers); diff --git a/vendor/rmccue/requests/library/Requests/Cookie/Jar.php b/vendor/rmccue/requests/library/Requests/Cookie/Jar.php index 69be0fb57..a816f90a0 100644 --- a/vendor/rmccue/requests/library/Requests/Cookie/Jar.php +++ b/vendor/rmccue/requests/library/Requests/Cookie/Jar.php @@ -68,7 +68,7 @@ class Requests_Cookie_Jar implements ArrayAccess, IteratorAggregate { * Get the value for the item * * @param string $key Item key - * @return string Item value + * @return string|null Item value (null if offsetExists is false) */ public function offsetGet($key) { if (!isset($this->cookies[$key])) { @@ -162,14 +162,14 @@ class Requests_Cookie_Jar implements ArrayAccess, IteratorAggregate { * * @var Requests_Response $response */ - public function before_redirect_check(Requests_Response &$return) { + public function before_redirect_check(Requests_Response $return) { $url = $return->url; if (!$url instanceof Requests_IRI) { $url = new Requests_IRI($url); } - $cookies = Requests_Cookie::parse_from_headers($return->headers, $url); - $this->cookies = array_merge($this->cookies, $cookies); + $cookies = Requests_Cookie::parse_from_headers($return->headers, $url); + $this->cookies = array_merge($this->cookies, $cookies); $return->cookies = $this; } -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception.php b/vendor/rmccue/requests/library/Requests/Exception.php index 37d4711c1..1080efd97 100644 --- a/vendor/rmccue/requests/library/Requests/Exception.php +++ b/vendor/rmccue/requests/library/Requests/Exception.php @@ -59,4 +59,4 @@ class Requests_Exception extends Exception { public function getData() { return $this->data; } -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP.php index 9ac6a873d..42ac59095 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP.php @@ -68,4 +68,4 @@ class Requests_Exception_HTTP extends Requests_Exception { return 'Requests_Exception_HTTP_Unknown'; } -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/304.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/304.php index 679903358..2636ba451 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/304.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/304.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_304 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Not Modified'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/400.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/400.php index b3ad77435..5bd5428c0 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/400.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/400.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_400 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Bad Request'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/401.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/401.php index 2e1e3d0b2..62a283ab0 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/401.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/401.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_401 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Unauthorized'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/402.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/402.php index 1d965d232..f287fd4b2 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/402.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/402.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_402 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Payment Required'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/403.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/403.php index 5ca3cafc1..2ae1c4445 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/403.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/403.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_403 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Forbidden'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/404.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/404.php index f08be2d27..e6e28672c 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/404.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/404.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_404 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Not Found'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/405.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/405.php index b8419e1ee..0461e6108 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/405.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/405.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_405 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Method Not Allowed'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/406.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/406.php index 09d0622b1..980ef0efc 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/406.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/406.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_406 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Not Acceptable'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/407.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/407.php index c21d1ec64..d08c6af7c 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/407.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/407.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_407 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Proxy Authentication Required'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/408.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/408.php index 0691863a9..db15bc291 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/408.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/408.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_408 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Request Timeout'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/409.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/409.php index 5a3e0d1f1..83002f936 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/409.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/409.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_409 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Conflict'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/410.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/410.php index 8eb3dafa6..5bf7aa6d4 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/410.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/410.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_410 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Gone'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/411.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/411.php index cee6496ac..25517b4f3 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/411.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/411.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_411 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Length Required'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/412.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/412.php index e377d7975..e89533a7e 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/412.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/412.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_412 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Precondition Failed'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/413.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/413.php index 3b5fe276a..a7b38fce1 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/413.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/413.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_413 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Request Entity Too Large'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/414.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/414.php index 14d5a59d3..54c8b8c9a 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/414.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/414.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_414 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Request-URI Too Large'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/415.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/415.php index 32446c854..6b5f0785b 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/415.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/415.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_415 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Unsupported Media Type'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/416.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/416.php index 8c5f833db..48a4ecdb8 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/416.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/416.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_416 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Requested Range Not Satisfiable'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/417.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/417.php index 8807c7171..81570330a 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/417.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/417.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_417 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Expectation Failed'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/418.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/418.php index d6af806c4..0fcc87d61 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/418.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/418.php @@ -26,4 +26,4 @@ class Requests_Exception_HTTP_418 extends Requests_Exception_HTTP { * @var string */ protected $reason = "I'm A Teapot"; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/428.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/428.php index 469e95454..799ddffd5 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/428.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/428.php @@ -26,4 +26,4 @@ class Requests_Exception_HTTP_428 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Precondition Required'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/429.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/429.php index 2a21fb345..78a3148ad 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/429.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/429.php @@ -26,4 +26,4 @@ class Requests_Exception_HTTP_429 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Too Many Requests'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/431.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/431.php index ba1294e65..a92b48a4e 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/431.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/431.php @@ -26,4 +26,4 @@ class Requests_Exception_HTTP_431 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Request Header Fields Too Large'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/500.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/500.php index 5165e353b..22a6406ab 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/500.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/500.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_500 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Internal Server Error'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/501.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/501.php index 3dd694623..11f395b20 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/501.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/501.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_501 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Not Implemented'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/502.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/502.php index 50c72d471..43f576a62 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/502.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/502.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_502 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Bad Gateway'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/503.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/503.php index 9304ecc6b..4024a4f5c 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/503.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/503.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_503 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Service Unavailable'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/504.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/504.php index f46696bc1..25fd08631 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/504.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/504.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_504 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Gateway Timeout'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/505.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/505.php index 1f80294e2..1f7cfec9b 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/505.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/505.php @@ -24,4 +24,4 @@ class Requests_Exception_HTTP_505 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'HTTP Version Not Supported'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/511.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/511.php index 920d334b1..3332513b1 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/511.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/511.php @@ -26,4 +26,4 @@ class Requests_Exception_HTTP_511 extends Requests_Exception_HTTP { * @var string */ protected $reason = 'Network Authentication Required'; -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/HTTP/Unknown.php b/vendor/rmccue/requests/library/Requests/Exception/HTTP/Unknown.php index c70f58988..b7eeb7953 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/HTTP/Unknown.php +++ b/vendor/rmccue/requests/library/Requests/Exception/HTTP/Unknown.php @@ -41,4 +41,4 @@ class Requests_Exception_HTTP_Unknown extends Requests_Exception_HTTP { parent::__construct($reason, $data); } -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Exception/Transport/cURL.php b/vendor/rmccue/requests/library/Requests/Exception/Transport/cURL.php index 67d157bee..fffa8c259 100644 --- a/vendor/rmccue/requests/library/Requests/Exception/Transport/cURL.php +++ b/vendor/rmccue/requests/library/Requests/Exception/Transport/cURL.php @@ -2,7 +2,7 @@ class Requests_Exception_Transport_cURL extends Requests_Exception_Transport { - const EASY = 'cURLEasy'; + const EASY = 'cURLEasy'; const MULTI = 'cURLMulti'; const SHARE = 'cURLShare'; diff --git a/vendor/rmccue/requests/library/Requests/Hooker.php b/vendor/rmccue/requests/library/Requests/Hooker.php index f667ae9c5..c852931f1 100644 --- a/vendor/rmccue/requests/library/Requests/Hooker.php +++ b/vendor/rmccue/requests/library/Requests/Hooker.php @@ -30,4 +30,4 @@ interface Requests_Hooker { * @return boolean Successfulness */ public function dispatch($hook, $parameters = array()); -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Hooks.php b/vendor/rmccue/requests/library/Requests/Hooks.php index 2e61c7340..f857902ce 100644 --- a/vendor/rmccue/requests/library/Requests/Hooks.php +++ b/vendor/rmccue/requests/library/Requests/Hooks.php @@ -65,4 +65,4 @@ class Requests_Hooks implements Requests_Hooker { return true; } -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/IDNAEncoder.php b/vendor/rmccue/requests/library/Requests/IDNAEncoder.php index ebbe2111b..881142935 100644 --- a/vendor/rmccue/requests/library/Requests/IDNAEncoder.php +++ b/vendor/rmccue/requests/library/Requests/IDNAEncoder.php @@ -141,31 +141,32 @@ class Requests_IDNAEncoder { // Get number of bytes $strlen = strlen($input); + // phpcs:ignore Generic.CodeAnalysis.JumbledIncrementer -- This is a deliberate choice. for ($position = 0; $position < $strlen; $position++) { $value = ord($input[$position]); // One byte sequence: if ((~$value & 0x80) === 0x80) { $character = $value; - $length = 1; + $length = 1; $remaining = 0; } // Two byte sequence: elseif (($value & 0xE0) === 0xC0) { $character = ($value & 0x1F) << 6; - $length = 2; + $length = 2; $remaining = 1; } // Three byte sequence: elseif (($value & 0xF0) === 0xE0) { $character = ($value & 0x0F) << 12; - $length = 3; + $length = 3; $remaining = 2; } // Four byte sequence: elseif (($value & 0xF8) === 0xF0) { $character = ($value & 0x07) << 18; - $length = 4; + $length = 4; $remaining = 3; } // Invalid byte: @@ -185,14 +186,14 @@ class Requests_IDNAEncoder { throw new Requests_Exception('Invalid Unicode codepoint', 'idna.invalidcodepoint', $character); } - $character |= ($value & 0x3F) << (--$remaining * 6); + --$remaining; + $character |= ($value & 0x3F) << ($remaining * 6); } $position--; } - if ( - // Non-shortest form sequences are invalid - $length > 1 && $character <= 0x7F + if (// Non-shortest form sequences are invalid + $length > 1 && $character <= 0x7F || $length > 2 && $character <= 0x7FF || $length > 3 && $character <= 0xFFFF // Outside of range of ucschar codepoints @@ -201,7 +202,7 @@ class Requests_IDNAEncoder { || $character >= 0xFDD0 && $character <= 0xFDEF || ( // Everything else not in ucschar - $character > 0xD7FF && $character < 0xF900 + $character > 0xD7FF && $character < 0xF900 || $character < 0x20 || $character > 0x7E && $character < 0xA0 || $character > 0xEFFFD @@ -227,17 +228,18 @@ class Requests_IDNAEncoder { */ public static function punycode_encode($input) { $output = ''; -# let n = initial_n + // let n = initial_n $n = self::BOOTSTRAP_INITIAL_N; -# let delta = 0 + // let delta = 0 $delta = 0; -# let bias = initial_bias + // let bias = initial_bias $bias = self::BOOTSTRAP_INITIAL_BIAS; -# let h = b = the number of basic code points in the input - $h = $b = 0; // see loop -# copy them to the output in order + // let h = b = the number of basic code points in the input + $h = 0; + $b = 0; // see loop + // copy them to the output in order $codepoints = self::utf8_to_codepoints($input); - $extended = array(); + $extended = array(); foreach ($codepoints as $char) { if ($char < 128) { @@ -260,35 +262,36 @@ class Requests_IDNAEncoder { $extended = array_keys($extended); sort($extended); $b = $h; -# [copy them] followed by a delimiter if b > 0 + // [copy them] followed by a delimiter if b > 0 if (strlen($output) > 0) { $output .= '-'; } -# {if the input contains a non-basic code point < n then fail} -# while h < length(input) do begin - while ($h < count($codepoints)) { -# let m = the minimum code point >= n in the input + // {if the input contains a non-basic code point < n then fail} + // while h < length(input) do begin + $codepointcount = count($codepoints); + while ($h < $codepointcount) { + // let m = the minimum code point >= n in the input $m = array_shift($extended); //printf('next code point to insert is %s' . PHP_EOL, dechex($m)); -# let delta = delta + (m - n) * (h + 1), fail on overflow + // let delta = delta + (m - n) * (h + 1), fail on overflow $delta += ($m - $n) * ($h + 1); -# let n = m + // let n = m $n = $m; -# for each code point c in the input (in order) do begin - for ($num = 0; $num < count($codepoints); $num++) { + // for each code point c in the input (in order) do begin + for ($num = 0; $num < $codepointcount; $num++) { $c = $codepoints[$num]; -# if c < n then increment delta, fail on overflow + // if c < n then increment delta, fail on overflow if ($c < $n) { $delta++; } -# if c == n then begin + // if c == n then begin elseif ($c === $n) { -# let q = delta + // let q = delta $q = $delta; -# for k = base to infinity in steps of base do begin + // for k = base to infinity in steps of base do begin for ($k = self::BOOTSTRAP_BASE; ; $k += self::BOOTSTRAP_BASE) { -# let t = tmin if k <= bias {+ tmin}, or -# tmax if k >= bias + tmax, or k - bias otherwise + // let t = tmin if k <= bias {+ tmin}, or + // tmax if k >= bias + tmax, or k - bias otherwise if ($k <= ($bias + self::BOOTSTRAP_TMIN)) { $t = self::BOOTSTRAP_TMIN; } @@ -298,34 +301,30 @@ class Requests_IDNAEncoder { else { $t = $k - $bias; } -# if q < t then break + // if q < t then break if ($q < $t) { break; } -# output the code point for digit t + ((q - t) mod (base - t)) - $digit = $t + (($q - $t) % (self::BOOTSTRAP_BASE - $t)); + // output the code point for digit t + ((q - t) mod (base - t)) + $digit = $t + (($q - $t) % (self::BOOTSTRAP_BASE - $t)); $output .= self::digit_to_char($digit); -# let q = (q - t) div (base - t) + // let q = (q - t) div (base - t) $q = floor(($q - $t) / (self::BOOTSTRAP_BASE - $t)); -# end - } -# output the code point for digit q + } // end + // output the code point for digit q $output .= self::digit_to_char($q); -# let bias = adapt(delta, h + 1, test h equals b?) + // let bias = adapt(delta, h + 1, test h equals b?) $bias = self::adapt($delta, $h + 1, $h === $b); -# let delta = 0 + // let delta = 0 $delta = 0; -# increment h + // increment h $h++; -# end - } -# end - } -# increment delta and n + } // end + } // end + // increment delta and n $delta++; $n++; -# end - } + } // end return $output; } @@ -358,31 +357,31 @@ class Requests_IDNAEncoder { * @param int $numpoints * @param bool $firsttime * @return int New bias + * + * function adapt(delta,numpoints,firsttime): */ protected static function adapt($delta, $numpoints, $firsttime) { -# function adapt(delta,numpoints,firsttime): -# if firsttime then let delta = delta div damp + // if firsttime then let delta = delta div damp if ($firsttime) { $delta = floor($delta / self::BOOTSTRAP_DAMP); } -# else let delta = delta div 2 + // else let delta = delta div 2 else { $delta = floor($delta / 2); } -# let delta = delta + (delta div numpoints) + // let delta = delta + (delta div numpoints) $delta += floor($delta / $numpoints); -# let k = 0 + // let k = 0 $k = 0; -# while delta > ((base - tmin) * tmax) div 2 do begin + // while delta > ((base - tmin) * tmax) div 2 do begin $max = floor(((self::BOOTSTRAP_BASE - self::BOOTSTRAP_TMIN) * self::BOOTSTRAP_TMAX) / 2); while ($delta > $max) { -# let delta = delta div (base - tmin) + // let delta = delta div (base - tmin) $delta = floor($delta / (self::BOOTSTRAP_BASE - self::BOOTSTRAP_TMIN)); -# let k = k + base + // let k = k + base $k += self::BOOTSTRAP_BASE; -# end - } -# return k + (((base - tmin + 1) * delta) div (delta + skew)) + } // end + // return k + (((base - tmin + 1) * delta) div (delta + skew)) return $k + floor(((self::BOOTSTRAP_BASE - self::BOOTSTRAP_TMIN + 1) * $delta) / ($delta + self::BOOTSTRAP_SKEW)); } -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/IPv6.php b/vendor/rmccue/requests/library/Requests/IPv6.php index 204dbd7e6..ba88786be 100644 --- a/vendor/rmccue/requests/library/Requests/IPv6.php +++ b/vendor/rmccue/requests/library/Requests/IPv6.php @@ -40,8 +40,8 @@ class Requests_IPv6 { } list($ip1, $ip2) = explode('::', $ip); - $c1 = ($ip1 === '') ? -1 : substr_count($ip1, ':'); - $c2 = ($ip2 === '') ? -1 : substr_count($ip2, ':'); + $c1 = ($ip1 === '') ? -1 : substr_count($ip1, ':'); + $c2 = ($ip2 === '') ? -1 : substr_count($ip2, ':'); if (strpos($ip2, '.') !== false) { $c2++; @@ -51,19 +51,19 @@ class Requests_IPv6 { $ip = '0:0:0:0:0:0:0:0'; } // ::xxx - else if ($c1 === -1) { + elseif ($c1 === -1) { $fill = str_repeat('0:', 7 - $c2); - $ip = str_replace('::', $fill, $ip); + $ip = str_replace('::', $fill, $ip); } // xxx:: - else if ($c2 === -1) { + elseif ($c2 === -1) { $fill = str_repeat(':0', 7 - $c1); - $ip = str_replace('::', $fill, $ip); + $ip = str_replace('::', $fill, $ip); } // xxx::xxx else { $fill = ':' . str_repeat('0:', 6 - $c2 - $c1); - $ip = str_replace('::', $fill, $ip); + $ip = str_replace('::', $fill, $ip); } return $ip; } @@ -84,7 +84,7 @@ class Requests_IPv6 { */ public static function compress($ip) { // Prepare the IP to be compressed - $ip = self::uncompress($ip); + $ip = self::uncompress($ip); $ip_parts = self::split_v6_v4($ip); // Replace all leading zeros @@ -126,7 +126,7 @@ class Requests_IPv6 { */ protected static function split_v6_v4($ip) { if (strpos($ip, '.') !== false) { - $pos = strrpos($ip, ':'); + $pos = strrpos($ip, ':'); $ipv6_part = substr($ip, 0, $pos); $ipv4_part = substr($ip, $pos + 1); return array($ipv6_part, $ipv4_part); @@ -145,10 +145,10 @@ class Requests_IPv6 { * @return bool true if $ip is a valid IPv6 address */ public static function check_ipv6($ip) { - $ip = self::uncompress($ip); + $ip = self::uncompress($ip); list($ipv6, $ipv4) = self::split_v6_v4($ip); - $ipv6 = explode(':', $ipv6); - $ipv4 = explode('.', $ipv4); + $ipv6 = explode(':', $ipv6); + $ipv4 = explode('.', $ipv4); if (count($ipv6) === 8 && count($ipv4) === 1 || count($ipv6) === 6 && count($ipv4) === 4) { foreach ($ipv6 as $ipv6_part) { // The section can't be empty diff --git a/vendor/rmccue/requests/library/Requests/IRI.php b/vendor/rmccue/requests/library/Requests/IRI.php index 8dc2fa284..5d80e4957 100644 --- a/vendor/rmccue/requests/library/Requests/IRI.php +++ b/vendor/rmccue/requests/library/Requests/IRI.php @@ -67,28 +67,28 @@ class Requests_IRI { /** * Scheme * - * @var string + * @var string|null */ protected $scheme = null; /** * User Information * - * @var string + * @var string|null */ protected $iuserinfo = null; /** * ihost * - * @var string + * @var string|null */ protected $ihost = null; /** * Port * - * @var string + * @var string|null */ protected $port = null; @@ -102,12 +102,12 @@ class Requests_IRI { /** * iquery * - * @var string + * @var string|null */ protected $iquery = null; /** - * ifragment + * ifragment|null * * @var string */ @@ -118,6 +118,8 @@ class Requests_IRI { * * Each key is the scheme, each value is an array with each key as the IRI * part and value as the default value for that part. + * + * @var array */ protected $normalization = array( 'acap' => array( @@ -249,9 +251,9 @@ class Requests_IRI { * * Returns false if $base is not absolute, otherwise an IRI. * - * @param IRI|string $base (Absolute) Base IRI - * @param IRI|string $relative Relative IRI - * @return IRI|false + * @param Requests_IRI|string $base (Absolute) Base IRI + * @param Requests_IRI|string $relative Relative IRI + * @return Requests_IRI|false */ public static function absolutize($base, $relative) { if (!($relative instanceof Requests_IRI)) { @@ -419,7 +421,7 @@ class Requests_IRI { */ protected function replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = false) { // Normalize as many pct-encoded sections as possible - $string = preg_replace_callback('/(?:%[A-Fa-f0-9]{2})+/', array(&$this, 'remove_iunreserved_percent_encoded'), $string); + $string = preg_replace_callback('/(?:%[A-Fa-f0-9]{2})+/', array($this, 'remove_iunreserved_percent_encoded'), $string); // Replace invalid percent characters $string = preg_replace('/%(?![A-Fa-f0-9]{2})/', '%25', $string); @@ -1010,7 +1012,7 @@ class Requests_IRI { /** * Get the complete IRI * - * @return string + * @return string|false */ protected function get_iri() { if (!$this->is_valid()) { @@ -1047,7 +1049,7 @@ class Requests_IRI { /** * Get the complete iauthority * - * @return string + * @return string|null */ protected function get_iauthority() { if ($this->iuserinfo === null && $this->ihost === null && $this->port === null) { diff --git a/vendor/rmccue/requests/library/Requests/Proxy.php b/vendor/rmccue/requests/library/Requests/Proxy.php index ac7c1d6b0..0a798dbe9 100644 --- a/vendor/rmccue/requests/library/Requests/Proxy.php +++ b/vendor/rmccue/requests/library/Requests/Proxy.php @@ -31,5 +31,5 @@ interface Requests_Proxy { * @see Requests_Hooks::register * @param Requests_Hooks $hooks Hook system */ - public function register(Requests_Hooks &$hooks); -} \ No newline at end of file + public function register(Requests_Hooks $hooks); +} diff --git a/vendor/rmccue/requests/library/Requests/Proxy/HTTP.php b/vendor/rmccue/requests/library/Requests/Proxy/HTTP.php index 6b4aba812..25bb95a94 100644 --- a/vendor/rmccue/requests/library/Requests/Proxy/HTTP.php +++ b/vendor/rmccue/requests/library/Requests/Proxy/HTTP.php @@ -59,12 +59,12 @@ class Requests_Proxy_HTTP implements Requests_Proxy { $this->proxy = $args; } elseif (is_array($args)) { - if (count($args) == 1) { + if (count($args) === 1) { list($this->proxy) = $args; } - elseif (count($args) == 3) { + elseif (count($args) === 3) { list($this->proxy, $this->user, $this->pass) = $args; - $this->use_authentication = true; + $this->use_authentication = true; } else { throw new Requests_Exception('Invalid number of arguments', 'proxyhttpbadargs'); @@ -82,13 +82,13 @@ class Requests_Proxy_HTTP implements Requests_Proxy { * @see fsockopen_header * @param Requests_Hooks $hooks Hook system */ - public function register(Requests_Hooks &$hooks) { - $hooks->register('curl.before_send', array(&$this, 'curl_before_send')); + public function register(Requests_Hooks $hooks) { + $hooks->register('curl.before_send', array($this, 'curl_before_send')); - $hooks->register('fsockopen.remote_socket', array(&$this, 'fsockopen_remote_socket')); - $hooks->register('fsockopen.remote_host_path', array(&$this, 'fsockopen_remote_host_path')); + $hooks->register('fsockopen.remote_socket', array($this, 'fsockopen_remote_socket')); + $hooks->register('fsockopen.remote_host_path', array($this, 'fsockopen_remote_host_path')); if ($this->use_authentication) { - $hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header')); + $hooks->register('fsockopen.after_headers', array($this, 'fsockopen_header')); } } @@ -148,4 +148,4 @@ class Requests_Proxy_HTTP implements Requests_Proxy { public function get_auth_string() { return $this->user . ':' . $this->pass; } -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Response.php b/vendor/rmccue/requests/library/Requests/Response.php index 3152fb6dc..20861dfb8 100644 --- a/vendor/rmccue/requests/library/Requests/Response.php +++ b/vendor/rmccue/requests/library/Requests/Response.php @@ -51,6 +51,7 @@ class Requests_Response { /** * Protocol version, false if non-blocking + * * @var float|boolean */ public $protocol_version = false; @@ -97,7 +98,7 @@ class Requests_Response { */ public function is_redirect() { $code = $this->status_code; - return in_array($code, array(300, 301, 302, 303, 307)) || $code > 307 && $code < 400; + return in_array($code, array(300, 301, 302, 303, 307), true) || $code > 307 && $code < 400; } /** diff --git a/vendor/rmccue/requests/library/Requests/Response/Headers.php b/vendor/rmccue/requests/library/Requests/Response/Headers.php index cc6a20872..12db128ae 100644 --- a/vendor/rmccue/requests/library/Requests/Response/Headers.php +++ b/vendor/rmccue/requests/library/Requests/Response/Headers.php @@ -21,7 +21,7 @@ class Requests_Response_Headers extends Requests_Utility_CaseInsensitiveDictiona * Set-Cookie headers. * * @param string $key - * @return string Header value + * @return string|null Header value */ public function offsetGet($key) { $key = strtolower($key); @@ -58,7 +58,7 @@ class Requests_Response_Headers extends Requests_Utility_CaseInsensitiveDictiona * Get all values for a given header * * @param string $key - * @return array Header values + * @return array|null Header values */ public function getValues($key) { $key = strtolower($key); diff --git a/vendor/rmccue/requests/library/Requests/SSL.php b/vendor/rmccue/requests/library/Requests/SSL.php index 2b0376853..f7ecf3fbd 100644 --- a/vendor/rmccue/requests/library/Requests/SSL.php +++ b/vendor/rmccue/requests/library/Requests/SSL.php @@ -20,7 +20,6 @@ class Requests_SSL { * * Unfortunately, PHP doesn't check the certificate against the alternative * names, leading things like 'https://www.github.com/' to be invalid. - * Instead * * @see https://tools.ietf.org/html/rfc2818#section-3.1 RFC2818, Section 3.1 * @@ -30,13 +29,6 @@ class Requests_SSL { * @return bool */ public static function verify_certificate($host, $cert) { - // Calculate the valid wildcard match if the host is not an IP address - $parts = explode('.', $host); - if (ip2long($host) === false) { - $parts[0] = '*'; - } - $wildcard = implode('.', $parts); - $has_dns_alt = false; // Check the subjectAltName @@ -125,7 +117,7 @@ class Requests_SSL { * @return boolean Does the domain match? */ public static function match_domain($host, $reference) { - // Check if the reference is blacklisted first + // Check if the reference is blocklisted first if (self::verify_reference_name($reference) !== true) { return false; } @@ -139,7 +131,7 @@ class Requests_SSL { // Also validates that the host has 3 parts or more, as per Firefox's // ruleset. if (ip2long($host) === false) { - $parts = explode('.', $host); + $parts = explode('.', $host); $parts[0] = '*'; $wildcard = implode('.', $parts); if ($wildcard === $reference) { @@ -149,4 +141,4 @@ class Requests_SSL { return false; } -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Session.php b/vendor/rmccue/requests/library/Requests/Session.php index af14bbe41..b2e10991d 100644 --- a/vendor/rmccue/requests/library/Requests/Session.php +++ b/vendor/rmccue/requests/library/Requests/Session.php @@ -22,12 +22,14 @@ class Requests_Session { * Base URL for requests * * URLs will be made absolute using this as the base + * * @var string|null */ public $url = null; /** * Base headers for requests + * * @var array */ public $headers = array(); @@ -64,9 +66,9 @@ class Requests_Session { * @param array $options Default options for requests */ public function __construct($url = null, $headers = array(), $data = array(), $options = array()) { - $this->url = $url; + $this->url = $url; $this->headers = $headers; - $this->data = $data; + $this->data = $data; $this->options = $options; if (empty($this->options['cookies'])) { diff --git a/vendor/rmccue/requests/library/Requests/Transport.php b/vendor/rmccue/requests/library/Requests/Transport.php index 7e4a26293..5146c01d8 100644 --- a/vendor/rmccue/requests/library/Requests/Transport.php +++ b/vendor/rmccue/requests/library/Requests/Transport.php @@ -38,4 +38,4 @@ interface Requests_Transport { * @return bool */ public static function test(); -} \ No newline at end of file +} diff --git a/vendor/rmccue/requests/library/Requests/Transport/cURL.php b/vendor/rmccue/requests/library/Requests/Transport/cURL.php index 4429edb64..01bcf3b71 100644 --- a/vendor/rmccue/requests/library/Requests/Transport/cURL.php +++ b/vendor/rmccue/requests/library/Requests/Transport/cURL.php @@ -38,9 +38,9 @@ class Requests_Transport_cURL implements Requests_Transport { public $info; /** - * Version string + * cURL version number * - * @var long + * @var int */ public $version; @@ -90,9 +90,9 @@ class Requests_Transport_cURL implements Requests_Transport { * Constructor */ public function __construct() { - $curl = curl_version(); + $curl = curl_version(); $this->version = $curl['version_number']; - $this->handle = curl_init(); + $this->handle = curl_init(); curl_setopt($this->handle, CURLOPT_HEADER, false); curl_setopt($this->handle, CURLOPT_RETURNTRANSFER, 1); @@ -100,9 +100,11 @@ class Requests_Transport_cURL implements Requests_Transport { curl_setopt($this->handle, CURLOPT_ENCODING, ''); } if (defined('CURLOPT_PROTOCOLS')) { + // phpcs:ignore PHPCompatibility.Constants.NewConstants.curlopt_protocolsFound curl_setopt($this->handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); } if (defined('CURLOPT_REDIR_PROTOCOLS')) { + // phpcs:ignore PHPCompatibility.Constants.NewConstants.curlopt_redir_protocolsFound curl_setopt($this->handle, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); } } @@ -138,8 +140,8 @@ class Requests_Transport_cURL implements Requests_Transport { $this->stream_handle = fopen($options['filename'], 'wb'); } - $this->response_data = ''; - $this->response_bytes = 0; + $this->response_data = ''; + $this->response_bytes = 0; $this->response_byte_limit = false; if ($options['max_bytes'] !== false) { $this->response_byte_limit = $options['max_bytes']; @@ -168,7 +170,7 @@ class Requests_Transport_cURL implements Requests_Transport { // Reset encoding and try again curl_setopt($this->handle, CURLOPT_ENCODING, 'none'); - $this->response_data = ''; + $this->response_data = ''; $this->response_bytes = 0; curl_exec($this->handle); $response = $this->response_data; @@ -199,23 +201,24 @@ class Requests_Transport_cURL implements Requests_Transport { $multihandle = curl_multi_init(); $subrequests = array(); - $subhandles = array(); + $subhandles = array(); $class = get_class($this); foreach ($requests as $id => $request) { $subrequests[$id] = new $class(); - $subhandles[$id] = $subrequests[$id]->get_subrequest_handle($request['url'], $request['headers'], $request['data'], $request['options']); + $subhandles[$id] = $subrequests[$id]->get_subrequest_handle($request['url'], $request['headers'], $request['data'], $request['options']); $request['options']['hooks']->dispatch('curl.before_multi_add', array(&$subhandles[$id])); curl_multi_add_handle($multihandle, $subhandles[$id]); } - $completed = 0; - $responses = array(); + $completed = 0; + $responses = array(); + $subrequestcount = count($subrequests); $request['options']['hooks']->dispatch('curl.before_multi_exec', array(&$multihandle)); do { - $active = false; + $active = 0; do { $status = curl_multi_exec($multihandle, $active); @@ -235,15 +238,15 @@ class Requests_Transport_cURL implements Requests_Transport { // Parse the finished requests before we start getting the new ones foreach ($to_process as $key => $done) { $options = $requests[$key]['options']; - if (CURLE_OK !== $done['result']) { + if ($done['result'] !== CURLE_OK) { //get error string for handle. - $reason = curl_error($done['handle']); - $exception = new Requests_Exception_Transport_cURL( - $reason, - Requests_Exception_Transport_cURL::EASY, - $done['handle'], - $done['result'] - ); + $reason = curl_error($done['handle']); + $exception = new Requests_Exception_Transport_cURL( + $reason, + Requests_Exception_Transport_cURL::EASY, + $done['handle'], + $done['result'] + ); $responses[$key] = $exception; $options['hooks']->dispatch('transport.internal.parse_error', array(&$responses[$key], $requests[$key])); } @@ -262,7 +265,7 @@ class Requests_Transport_cURL implements Requests_Transport { $completed++; } } - while ($active || $completed < count($subrequests)); + while ($active || $completed < $subrequestcount); $request['options']['hooks']->dispatch('curl.after_multi_exec', array(&$multihandle)); @@ -287,8 +290,8 @@ class Requests_Transport_cURL implements Requests_Transport { $this->stream_handle = fopen($options['filename'], 'wb'); } - $this->response_data = ''; - $this->response_bytes = 0; + $this->response_data = ''; + $this->response_bytes = 0; $this->response_byte_limit = false; if ($options['max_bytes'] !== false) { $this->response_byte_limit = $options['max_bytes']; @@ -310,17 +313,32 @@ class Requests_Transport_cURL implements Requests_Transport { $options['hooks']->dispatch('curl.before_request', array(&$this->handle)); // Force closing the connection for old versions of cURL (<7.22). - if ( ! isset( $headers['Connection'] ) ) { + if (!isset($headers['Connection'])) { $headers['Connection'] = 'close'; } + /** + * Add "Expect" header. + * + * By default, cURL adds a "Expect: 100-Continue" to most requests. This header can + * add as much as a second to the time it takes for cURL to perform a request. To + * prevent this, we need to set an empty "Expect" header. To match the behaviour of + * Guzzle, we'll add the empty header to requests that are smaller than 1 MB and use + * HTTP/1.1. + * + * https://curl.se/mail/lib-2017-07/0013.html + */ + if (!isset($headers['Expect']) && $options['protocol_version'] === 1.1) { + $headers['Expect'] = $this->get_expect_header($data); + } + $headers = Requests::flatten($headers); if (!empty($data)) { $data_format = $options['data_format']; if ($data_format === 'query') { - $url = self::format_get($url, $data); + $url = self::format_get($url, $data); $data = ''; } elseif (!is_string($data)) { @@ -363,6 +381,7 @@ class Requests_Transport_cURL implements Requests_Transport { curl_setopt($this->handle, CURLOPT_TIMEOUT, ceil($timeout)); } else { + // phpcs:ignore PHPCompatibility.Constants.NewConstants.curlopt_timeout_msFound curl_setopt($this->handle, CURLOPT_TIMEOUT_MS, round($timeout * 1000)); } @@ -370,6 +389,7 @@ class Requests_Transport_cURL implements Requests_Transport { curl_setopt($this->handle, CURLOPT_CONNECTTIMEOUT, ceil($options['connect_timeout'])); } else { + // phpcs:ignore PHPCompatibility.Constants.NewConstants.curlopt_connecttimeout_msFound curl_setopt($this->handle, CURLOPT_CONNECTTIMEOUT_MS, round($options['connect_timeout'] * 1000)); } curl_setopt($this->handle, CURLOPT_URL, $url); @@ -385,9 +405,9 @@ class Requests_Transport_cURL implements Requests_Transport { curl_setopt($this->handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); } - if (true === $options['blocking']) { - curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, array(&$this, 'stream_headers')); - curl_setopt($this->handle, CURLOPT_WRITEFUNCTION, array(&$this, 'stream_body')); + if ($options['blocking'] === true) { + curl_setopt($this->handle, CURLOPT_HEADERFUNCTION, array($this, 'stream_headers')); + curl_setopt($this->handle, CURLOPT_WRITEFUNCTION, array($this, 'stream_body')); curl_setopt($this->handle, CURLOPT_BUFFERSIZE, Requests::BUFFER_SIZE); } } @@ -397,7 +417,8 @@ class Requests_Transport_cURL implements Requests_Transport { * * @param string $response Response data from the body * @param array $options Request options - * @return string HTTP response data including headers + * @return string|false HTTP response data including headers. False if non-blocking. + * @throws Requests_Exception */ public function process_response($response, $options) { if ($options['blocking'] === false) { @@ -405,7 +426,7 @@ class Requests_Transport_cURL implements Requests_Transport { $options['hooks']->dispatch('curl.after_request', array(&$fake_headers)); return false; } - if ($options['filename'] !== false) { + if ($options['filename'] !== false && $this->stream_handle) { fclose($this->stream_handle); $this->headers = trim($this->headers); } @@ -439,7 +460,7 @@ class Requests_Transport_cURL implements Requests_Transport { // interim responses, such as a 100 Continue. We don't need that. // (We may want to keep this somewhere just in case) if ($this->done_headers) { - $this->headers = ''; + $this->headers = ''; $this->done_headers = false; } $this->headers .= $headers; @@ -473,7 +494,7 @@ class Requests_Transport_cURL implements Requests_Transport { if (($this->response_bytes + $data_length) > $this->response_byte_limit) { // Limit the length $limited_length = ($this->response_byte_limit - $this->response_bytes); - $data = substr($data, 0, $limited_length); + $data = substr($data, 0, $limited_length); } } @@ -497,16 +518,17 @@ class Requests_Transport_cURL implements Requests_Transport { */ protected static function format_get($url, $data) { if (!empty($data)) { + $query = ''; $url_parts = parse_url($url); if (empty($url_parts['query'])) { - $query = $url_parts['query'] = ''; + $url_parts['query'] = ''; } else { $query = $url_parts['query']; } $query .= '&' . http_build_query($data, null, '&'); - $query = trim($query, '&'); + $query = trim($query, '&'); if (empty($url_parts['query'])) { $url .= '?' . $query; @@ -539,4 +561,29 @@ class Requests_Transport_cURL implements Requests_Transport { return true; } + + /** + * Get the correct "Expect" header for the given request data. + * + * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD. + * @return string The "Expect" header. + */ + protected function get_expect_header($data) { + if (!is_array($data)) { + return strlen((string) $data) >= 1048576 ? '100-Continue' : ''; + } + + $bytesize = 0; + $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($data)); + + foreach ($iterator as $datum) { + $bytesize += strlen((string) $datum); + + if ($bytesize >= 1048576) { + return '100-Continue'; + } + } + + return ''; + } } diff --git a/vendor/rmccue/requests/library/Requests/Transport/cacert.pem b/vendor/rmccue/requests/library/Requests/Transport/cacert.pem index f9bd706b4..a634a7584 100644 --- a/vendor/rmccue/requests/library/Requests/Transport/cacert.pem +++ b/vendor/rmccue/requests/library/Requests/Transport/cacert.pem @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Wed Jul 22 03:12:14 2020 GMT +## Certificate data from Mozilla as of: Tue Jan 19 04:12:04 2021 GMT ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates @@ -14,7 +14,7 @@ ## Just configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.28. -## SHA256: cc6408bd4be7fbfb8699bdb40ccb7f6de5780d681d87785ea362646e4dad5e8e +## SHA256: 3bdc63d1de27058fec943a999a2a8a01fcc6806a611b19221a7727d3d9bbbdfd ## @@ -132,87 +132,6 @@ W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0 tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 -----END CERTIFICATE----- -GeoTrust Global CA -================== ------BEGIN CERTIFICATE----- -MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK -Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw -MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j -LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo -BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet -8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc -T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU -vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD -AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk -DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q -zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4 -d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2 -mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p -XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm -Mw== ------END CERTIFICATE----- - -GeoTrust Universal CA -===================== ------BEGIN CERTIFICATE----- -MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN -R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1 -MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu -Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP -ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t -JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e -RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs -7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d -8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V -qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga -Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB -Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu -KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08 -ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0 -XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB -hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc -aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2 -qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL -oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK -xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF -KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2 -DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK -xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU -p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI -P/rmMuGNG2+k5o7Y+SlIis5z/iw= ------END CERTIFICATE----- - -GeoTrust Universal CA 2 -======================= ------BEGIN CERTIFICATE----- -MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN -R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0 -MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg -SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA -A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0 -DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17 -j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q -JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a -QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2 -WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP -20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRthAAn -ZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgocQIgfksILAAX/8sgC -SqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4Lt1ZrtmhN79UNdxzMk+MBB4zsslG -8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2 -+/CfXGJx7Tz0RzgQKzAfBgNVHSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8E -BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z -dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ -4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+ -mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq -A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg -Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP -pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d -FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp -gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm -X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS ------END CERTIFICATE----- - Comodo AAA Services root ======================== -----BEGIN CERTIFICATE----- @@ -448,36 +367,6 @@ KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 QBFGmh95DmK/D5fs4C8fF5Q= -----END CERTIFICATE----- -Taiwan GRCA -=========== ------BEGIN CERTIFICATE----- -MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG -EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X -DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv -dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD -ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN -w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5 -BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O -1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO -htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov -J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7 -Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHKYS1t -B6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoHEgKXTiCQ8P8NHuJB -O9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThNXo+EHWbNxWCWtFJaBYmOlXqYwZE8 -lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1UdDgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNV -HRMEBTADAQH/MDkGBGcqBwAEMTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg2 -09yewDL7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ -TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj -Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2 -Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU -D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz -DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk -Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk -7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ -CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy -+fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS ------END CERTIFICATE----- - DigiCert Assured ID Root CA =========================== -----BEGIN CERTIFICATE----- @@ -626,78 +515,6 @@ DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u -----END CERTIFICATE----- -GeoTrust Primary Certification Authority -======================================== ------BEGIN CERTIFICATE----- -MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG -EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD -ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx -CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ -cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN -b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9 -nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge -RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt -tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD -AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI -hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K -Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN -NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa -Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG -1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk= ------END CERTIFICATE----- - -thawte Primary Root CA -====================== ------BEGIN CERTIFICATE----- -MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE -BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 -aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3 -MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwg -SW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMv -KGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT -FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs -oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ -1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc -q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K -aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p -afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD -VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF -AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE -uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX -xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89 -jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH -z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA== ------END CERTIFICATE----- - -VeriSign Class 3 Public Primary Certification Authority - G5 -============================================================ ------BEGIN CERTIFICATE----- -MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE -BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO -ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk -IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp -ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB -yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln -biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh -dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt -YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz -j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD -Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/ -Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r -fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/ -BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv -Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy -aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG -SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+ -X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE -KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC -Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE -ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq ------END CERTIFICATE----- - SecureTrust CA ============== -----BEGIN CERTIFICATE----- @@ -806,29 +623,6 @@ FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= -----END CERTIFICATE----- -OISTE WISeKey Global Root GA CA -=============================== ------BEGIN CERTIFICATE----- -MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE -BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG -A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH -bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD -VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw -IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5 -IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9 -Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg -Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD -d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ -/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R -LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw -AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ -KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm -MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4 -+vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa -hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY -okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= ------END CERTIFICATE----- - Certigna ======== -----BEGIN CERTIFICATE----- @@ -924,70 +718,6 @@ vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD -----END CERTIFICATE----- -GeoTrust Primary Certification Authority - G3 -============================================= ------BEGIN CERTIFICATE----- -MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE -BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0 -IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy -eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz -NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo -YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT -LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j -K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE -c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C -IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu -dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC -MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr -2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9 -cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE -Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD -AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s -t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt ------END CERTIFICATE----- - -thawte Primary Root CA - G2 -=========================== ------BEGIN CERTIFICATE----- -MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC -VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu -IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg -Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV -MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG -b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt -IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS -LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5 -8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU -mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN -G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K -rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== ------END CERTIFICATE----- - -thawte Primary Root CA - G3 -=========================== ------BEGIN CERTIFICATE----- -MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE -BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 -aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w -ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh -d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD -VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG -A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At -P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC -+BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY -7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW -vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E -BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ -KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK -A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu -t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC -8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm -er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A= ------END CERTIFICATE----- - GeoTrust Primary Certification Authority - G2 ============================================= -----BEGIN CERTIFICATE----- @@ -1033,27 +763,6 @@ wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4 mJO37M2CYfE45k+XmCpajQ== -----END CERTIFICATE----- -VeriSign Class 3 Public Primary Certification Authority - G4 -============================================================ ------BEGIN CERTIFICATE----- -MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC -VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3 -b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz -ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj -YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL -MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU -cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo -b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5 -IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8 -Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz -rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB -/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw -HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u -Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD -A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx -AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== ------END CERTIFICATE----- - NetLock Arany (Class Gold) Főtanúsítvány ======================================== -----BEGIN CERTIFICATE----- @@ -1709,30 +1418,6 @@ P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw== -----END CERTIFICATE----- -EE Certification Centre Root CA -=============================== ------BEGIN CERTIFICATE----- -MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG -EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy -dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw -MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB -UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy -ZSBSb290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUyeuuOF0+W2Ap7kaJjbMeM -TC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvObntl8jixwKIy72KyaOBhU8E2lf/slLo2 -rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIwWFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw -93X2PaRka9ZP585ArQ/dMtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtN -P2MbRMNE1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYDVR0T -AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/zQas8fElyalL1BSZ -MEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEF -BQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEFBQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+Rj -xY6hUFaTlrg4wCQiZrxTFGGVv9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqM -lIpPnTX/dqQGE5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u -uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU -3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM -dcGWxZ0= ------END CERTIFICATE----- - D-TRUST Root Class 3 CA 2 2009 ============================== -----BEGIN CERTIFICATE----- @@ -3445,3 +3130,173 @@ Sxfj03k9bWtJySgOLnRQvwzZRjoQhsmnP+mg7H/rpXdYaXHmgwo38oZJar55CJD2AhZkPuXaTH4M NMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE1LlSVHJ7liXMvGnjSG4N 0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MXQRBdJ3NghVdJIgc= -----END CERTIFICATE----- + +Trustwave Global Certification Authority +======================================== +-----BEGIN CERTIFICATE----- +MIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJV +UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2 +ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTAeFw0xNzA4MjMxOTM0MTJaFw00MjA4MjMxOTM0MTJaMIGIMQswCQYDVQQGEwJV +UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2 +ZSBIb2xkaW5ncywgSW5jLjExMC8GA1UEAwwoVHJ1c3R3YXZlIEdsb2JhbCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALldUShLPDeS0YLOvR29 +zd24q88KPuFd5dyqCblXAj7mY2Hf8g+CY66j96xz0XznswuvCAAJWX/NKSqIk4cXGIDtiLK0thAf +LdZfVaITXdHG6wZWiYj+rDKd/VzDBcdu7oaJuogDnXIhhpCujwOl3J+IKMujkkkP7NAP4m1ET4Bq +stTnoApTAbqOl5F2brz81Ws25kCI1nsvXwXoLG0R8+eyvpJETNKXpP7ScoFDB5zpET71ixpZfR9o +WN0EACyW80OzfpgZdNmcc9kYvkHHNHnZ9GLCQ7mzJ7Aiy/k9UscwR7PJPrhq4ufogXBeQotPJqX+ +OsIgbrv4Fo7NDKm0G2x2EOFYeUY+VM6AqFcJNykbmROPDMjWLBz7BegIlT1lRtzuzWniTY+HKE40 +Cz7PFNm73bZQmq131BnW2hqIyE4bJ3XYsgjxroMwuREOzYfwhI0Vcnyh78zyiGG69Gm7DIwLdVcE +uE4qFC49DxweMqZiNu5m4iK4BUBjECLzMx10coos9TkpoNPnG4CELcU9402x/RpvumUHO1jsQkUm ++9jaJXLE9gCxInm943xZYkqcBW89zubWR2OZxiRvchLIrH+QtAuRcOi35hYQcRfO3gZPSEF9NUqj +ifLJS3tBEW1ntwiYTOURGa5CgNz7kAXU+FDKvuStx8KU1xad5hePrzb7AgMBAAGjQjBAMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFJngGWcNYtt2s9o9uFvo/ULSMQ6HMA4GA1UdDwEB/wQEAwIB +BjANBgkqhkiG9w0BAQsFAAOCAgEAmHNw4rDT7TnsTGDZqRKGFx6W0OhUKDtkLSGm+J1WE2pIPU/H +PinbbViDVD2HfSMF1OQc3Og4ZYbFdada2zUFvXfeuyk3QAUHw5RSn8pk3fEbK9xGChACMf1KaA0H +ZJDmHvUqoai7PF35owgLEQzxPy0QlG/+4jSHg9bP5Rs1bdID4bANqKCqRieCNqcVtgimQlRXtpla +4gt5kNdXElE1GYhBaCXUNxeEFfsBctyV3lImIJgm4nb1J2/6ADtKYdkNy1GTKv0WBpanI5ojSP5R +vbbEsLFUzt5sQa0WZ37b/TjNuThOssFgy50X31ieemKyJo90lZvkWx3SD92YHJtZuSPTMaCm/zjd +zyBP6VhWOmfD0faZmZ26NraAL4hHT4a/RDqA5Dccprrql5gR0IRiR2Qequ5AvzSxnI9O4fKSTx+O +856X3vOmeWqJcU9LJxdI/uz0UA9PSX3MReO9ekDFQdxhVicGaeVyQYHTtgGJoC86cnn+OjC/QezH +Yj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu +3R3y4G5OBVixwJAWKqQ9EEC+j2Jjg6mcgn0tAumDMHzLJ8n9HmYAsC7TIS+OMxZsmO0QqAfWzJPP +29FpHOTKyeC2nOnOcXHebD8WpHk= +-----END CERTIFICATE----- + +Trustwave Global ECC P256 Certification Authority +================================================= +-----BEGIN CERTIFICATE----- +MIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYDVQQGEwJVUzER +MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI +b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1NiBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM1MTBaFw00MjA4MjMxOTM1MTBaMIGRMQswCQYD +VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy +dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDI1 +NiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH77bOYj +43MyCMpg5lOcunSNGLB4kFKA3TjASh3RqMyTpJcGOMoNFWLGjgEqZZ2q3zSRLoHB5DOSMcT9CTqm +P62jQzBBMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt +0UrrdaVKEJmzsaGLSvcwCgYIKoZIzj0EAwIDRwAwRAIgB+ZU2g6gWrKuEZ+Hxbb/ad4lvvigtwjz +RM4q3wghDDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7 +-----END CERTIFICATE----- + +Trustwave Global ECC P384 Certification Authority +================================================= +-----BEGIN CERTIFICATE----- +MIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYDVQQGEwJVUzER +MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI +b2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4NCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MjMxOTM2NDNaFw00MjA4MjMxOTM2NDNaMIGRMQswCQYD +VQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRy +dXN0d2F2ZSBIb2xkaW5ncywgSW5jLjE6MDgGA1UEAxMxVHJ1c3R3YXZlIEdsb2JhbCBFQ0MgUDM4 +NCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTB2MBAGByqGSM49AgEGBSuBBAAiA2IABGvaDXU1CDFH +Ba5FmVXxERMuSvgQMSOjfoPTfygIOiYaOs+Xgh+AtycJj9GOMMQKmw6sWASr9zZ9lCOkmwqKi6vr +/TklZvFe/oyujUF5nQlgziip04pt89ZF1PKYhDhloKNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNV +HQ8BAf8EBQMDBwYAMB0GA1UdDgQWBBRVqYSJ0sEyvRjLbKYHTsjnnb6CkDAKBggqhkjOPQQDAwNn +ADBkAjA3AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsCMGcl +CrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVuSw== +-----END CERTIFICATE----- + +NAVER Global Root Certification Authority +========================================= +-----BEGIN CERTIFICATE----- +MIIFojCCA4qgAwIBAgIUAZQwHqIL3fXFMyqxQ0Rx+NZQTQ0wDQYJKoZIhvcNAQEMBQAwaTELMAkG +A1UEBhMCS1IxJjAkBgNVBAoMHU5BVkVSIEJVU0lORVNTIFBMQVRGT1JNIENvcnAuMTIwMAYDVQQD +DClOQVZFUiBHbG9iYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0xNzA4MTgwODU4 +NDJaFw0zNzA4MTgyMzU5NTlaMGkxCzAJBgNVBAYTAktSMSYwJAYDVQQKDB1OQVZFUiBCVVNJTkVT +UyBQTEFURk9STSBDb3JwLjEyMDAGA1UEAwwpTkFWRVIgR2xvYmFsIFJvb3QgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC21PGTXLVAiQqrDZBb +UGOukJR0F0Vy1ntlWilLp1agS7gvQnXp2XskWjFlqxcX0TM62RHcQDaH38dq6SZeWYp34+hInDEW ++j6RscrJo+KfziFTowI2MMtSAuXaMl3Dxeb57hHHi8lEHoSTGEq0n+USZGnQJoViAbbJAh2+g1G7 +XNr4rRVqmfeSVPc0W+m/6imBEtRTkZazkVrd/pBzKPswRrXKCAfHcXLJZtM0l/aM9BhK4dA9WkW2 +aacp+yPOiNgSnABIqKYPszuSjXEOdMWLyEz59JuOuDxp7W87UC9Y7cSw0BwbagzivESq2M0UXZR4 +Yb8ObtoqvC8MC3GmsxY/nOb5zJ9TNeIDoKAYv7vxvvTWjIcNQvcGufFt7QSUqP620wbGQGHfnZ3z +VHbOUzoBppJB7ASjjw2i1QnK1sua8e9DXcCrpUHPXFNwcMmIpi3Ua2FzUCaGYQ5fG8Ir4ozVu53B +A0K6lNpfqbDKzE0K70dpAy8i+/Eozr9dUGWokG2zdLAIx6yo0es+nPxdGoMuK8u180SdOqcXYZai +cdNwlhVNt0xz7hlcxVs+Qf6sdWA7G2POAN3aCJBitOUt7kinaxeZVL6HSuOpXgRM6xBtVNbv8ejy +YhbLgGvtPe31HzClrkvJE+2KAQHJuFFYwGY6sWZLxNUxAmLpdIQM201GLQIDAQABo0IwQDAdBgNV +HQ4EFgQU0p+I36HNLL3s9TsBAZMzJ7LrYEswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMB +Af8wDQYJKoZIhvcNAQEMBQADggIBADLKgLOdPVQG3dLSLvCkASELZ0jKbY7gyKoNqo0hV4/GPnrK +21HUUrPUloSlWGB/5QuOH/XcChWB5Tu2tyIvCZwTFrFsDDUIbatjcu3cvuzHV+YwIHHW1xDBE1UB +jCpD5EHxzzp6U5LOogMFDTjfArsQLtk70pt6wKGm+LUx5vR1yblTmXVHIloUFcd4G7ad6Qz4G3bx +hYTeodoS76TiEJd6eN4MUZeoIUCLhr0N8F5OSza7OyAfikJW4Qsav3vQIkMsRIz75Sq0bBwcupTg +E34h5prCy8VCZLQelHsIJchxzIdFV4XTnyliIoNRlwAYl3dqmJLJfGBs32x9SuRwTMKeuB330DTH +D8z7p/8Dvq1wkNoL3chtl1+afwkyQf3NosxabUzyqkn+Zvjp2DXrDige7kgvOtB5CTh8piKCk5XQ +A76+AqAF3SAi428diDRgxuYKuQl1C/AH6GmWNcf7I4GOODm4RStDeKLRLBT/DShycpWbXgnbiUSY +qqFJu3FS8r/2/yehNq+4tneI3TqkbZs0kNwUXTC/t+sX5Ie3cdCh13cV1ELX8vMxmV2b3RZtP+oG +I/hGoiLtk/bdmuYqh7GYVPEi92tF4+KOdh2ajcQGjTa3FPOdVGm3jjzVpG2Tgbet9r1ke8LJaDmg +kpzNNIaRkPpkUZ3+/uul9XXeifdy +-----END CERTIFICATE----- + +Thawte Server CA +================ +-----BEGIN CERTIFICATE----- +MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT +DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs +dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UE +AxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5j +b20wHhcNOTYwODAxMDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNV +BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29u +c3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcG +A1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0 +ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl +/Kj0R1HahbUgdJSGHg91yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg7 +1CcEJRCXL+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGjEzAR +MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG7oWDTSEwjsrZqG9J +GubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6eQNuozDJ0uW8NxuOzRAvZim+aKZuZ +GCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZqdq5snUb9kLy78fyGPmJvKP/iiMucEc= +-----END CERTIFICATE----- + +Thawte Premium Server CA +======================== +-----BEGIN CERTIFICATE----- +MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkExFTATBgNVBAgT +DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs +dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UE +AxMYVGhhd3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZl +ckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYT +AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU +VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2 +aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNlcnZlciBDQTEoMCYGCSqGSIb3DQEJARYZ +cHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2 +aovXwlue2oFBYo847kkEVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIh +Udib0GfQug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMRuHM/ +qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQAm +SCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUIhfzJATj/Tb7yFkJD57taRvvBxhEf +8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JMpAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7t +UCemDaYj+bvLpgcUQg== +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority +======================================================= +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx +FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow +XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz +IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 +f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol +hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA +TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah +WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf +Tqj/ZA1k +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G2 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO +FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71 +lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB +MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT +1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD +Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9 +-----END CERTIFICATE----- diff --git a/vendor/rmccue/requests/library/Requests/Transport/fsockopen.php b/vendor/rmccue/requests/library/Requests/Transport/fsockopen.php index 21cb56d5e..56f94c99f 100644 --- a/vendor/rmccue/requests/library/Requests/Transport/fsockopen.php +++ b/vendor/rmccue/requests/library/Requests/Transport/fsockopen.php @@ -62,9 +62,9 @@ class Requests_Transport_fsockopen implements Requests_Transport { if (empty($url_parts)) { throw new Requests_Exception('Invalid URL.', 'invalidurl', $url); } - $host = $url_parts['host']; - $context = stream_context_create(); - $verifyname = false; + $host = $url_parts['host']; + $context = stream_context_create(); + $verifyname = false; $case_insensitive_headers = new Requests_Utility_CaseInsensitiveDictionary($headers); // HTTPS support @@ -75,13 +75,13 @@ class Requests_Transport_fsockopen implements Requests_Transport { } $context_options = array( - 'verify_peer' => true, - // 'CN_match' => $host, - 'capture_peer_cert' => true + 'verify_peer' => true, + 'capture_peer_cert' => true, ); - $verifyname = true; + $verifyname = true; // SNI, if enabled (OpenSSL >=0.9.8j) + // phpcs:ignore PHPCompatibility.Constants.NewConstants.openssl_tlsext_server_nameFound if (defined('OPENSSL_TLSEXT_SERVER_NAME') && OPENSSL_TLSEXT_SERVER_NAME) { $context_options['SNI_enabled'] = true; if (isset($options['verifyname']) && $options['verifyname'] === false) { @@ -91,7 +91,9 @@ class Requests_Transport_fsockopen implements Requests_Transport { if (isset($options['verify'])) { if ($options['verify'] === false) { - $context_options['verify_peer'] = false; + $context_options['verify_peer'] = false; + $context_options['verify_peer_name'] = false; + $verifyname = false; } elseif (is_string($options['verify'])) { $context_options['cafile'] = $options['verify']; @@ -100,7 +102,7 @@ class Requests_Transport_fsockopen implements Requests_Transport { if (isset($options['verifyname']) && $options['verifyname'] === false) { $context_options['verify_peer_name'] = false; - $verifyname = false; + $verifyname = false; } stream_context_set_option($context, array('ssl' => $context_options)); @@ -116,6 +118,7 @@ class Requests_Transport_fsockopen implements Requests_Transport { } $remote_socket .= ':' . $url_parts['port']; + // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler set_error_handler(array($this, 'connect_error_handler'), E_WARNING | E_NOTICE); $options['hooks']->dispatch('fsockopen.remote_socket', array(&$remote_socket)); @@ -150,17 +153,19 @@ class Requests_Transport_fsockopen implements Requests_Transport { $options['hooks']->dispatch('fsockopen.remote_host_path', array(&$path, $url)); $request_body = ''; - $out = sprintf("%s %s HTTP/%.1f\r\n", $options['type'], $path, $options['protocol_version']); + $out = sprintf("%s %s HTTP/%.1F\r\n", $options['type'], $path, $options['protocol_version']); if ($options['type'] !== Requests::TRACE) { if (is_array($data)) { - $request_body = http_build_query($data, null, '&'); + $request_body = http_build_query($data, '', '&'); } else { $request_body = $data; } - if (!empty($data)) { + // Always include Content-length on POST requests to prevent + // 411 errors from some servers when the body is empty. + if (!empty($data) || $options['type'] === Requests::POST) { if (!isset($case_insensitive_headers['Content-Length'])) { $headers['Content-Length'] = strlen($request_body); } @@ -174,7 +179,7 @@ class Requests_Transport_fsockopen implements Requests_Transport { if (!isset($case_insensitive_headers['Host'])) { $out .= sprintf('Host: %s', $url_parts['host']); - if (( 'http' === strtolower($url_parts['scheme']) && $url_parts['port'] !== 80 ) || ( 'https' === strtolower($url_parts['scheme']) && $url_parts['port'] !== 443 )) { + if ((strtolower($url_parts['scheme']) === 'http' && $url_parts['port'] !== 80) || (strtolower($url_parts['scheme']) === 'https' && $url_parts['port'] !== 443)) { $out .= ':' . $url_parts['port']; } $out .= "\r\n"; @@ -192,7 +197,7 @@ class Requests_Transport_fsockopen implements Requests_Transport { $headers = Requests::flatten($headers); if (!empty($headers)) { - $out .= implode($headers, "\r\n") . "\r\n"; + $out .= implode("\r\n", $headers) . "\r\n"; } $options['hooks']->dispatch('fsockopen.after_headers', array(&$out)); @@ -220,7 +225,7 @@ class Requests_Transport_fsockopen implements Requests_Transport { } $timeout_sec = (int) floor($options['timeout']); - if ($timeout_sec == $options['timeout']) { + if ($timeout_sec === $options['timeout']) { $timeout_msec = 0; } else { @@ -228,11 +233,13 @@ class Requests_Transport_fsockopen implements Requests_Transport { } stream_set_timeout($socket, $timeout_sec, $timeout_msec); - $response = $body = $headers = ''; + $response = ''; + $body = ''; + $headers = ''; $this->info = stream_get_meta_data($socket); - $size = 0; - $doingbody = false; - $download = false; + $size = 0; + $doingbody = false; + $download = false; if ($options['filename']) { $download = fopen($options['filename'], 'wb'); } @@ -248,7 +255,7 @@ class Requests_Transport_fsockopen implements Requests_Transport { $response .= $block; if (strpos($response, "\r\n\r\n")) { list($headers, $block) = explode("\r\n\r\n", $response, 2); - $doingbody = true; + $doingbody = true; } } @@ -264,7 +271,7 @@ class Requests_Transport_fsockopen implements Requests_Transport { if (($size + $data_length) > $this->max_bytes) { // Limit the length $limited_length = ($this->max_bytes - $size); - $block = substr($block, 0, $limited_length); + $block = substr($block, 0, $limited_length); } } @@ -300,10 +307,10 @@ class Requests_Transport_fsockopen implements Requests_Transport { */ public function request_multiple($requests, $options) { $responses = array(); - $class = get_class($this); + $class = get_class($this); foreach ($requests as $id => $request) { try { - $handler = new $class(); + $handler = new $class(); $responses[$id] = $handler->request($request['url'], $request['headers'], $request['data'], $request['options']); $request['options']['hooks']->dispatch('transport.internal.parse_response', array(&$responses[$id], $request)); @@ -353,8 +360,8 @@ class Requests_Transport_fsockopen implements Requests_Transport { $url_parts['query'] = ''; } - $url_parts['query'] .= '&' . http_build_query($data, null, '&'); - $url_parts['query'] = trim($url_parts['query'], '&'); + $url_parts['query'] .= '&' . http_build_query($data, '', '&'); + $url_parts['query'] = trim($url_parts['query'], '&'); } if (isset($url_parts['path'])) { if (isset($url_parts['query'])) { diff --git a/vendor/rmccue/requests/library/Requests/Utility/CaseInsensitiveDictionary.php b/vendor/rmccue/requests/library/Requests/Utility/CaseInsensitiveDictionary.php index 2c97893a1..7eebeb7a7 100644 --- a/vendor/rmccue/requests/library/Requests/Utility/CaseInsensitiveDictionary.php +++ b/vendor/rmccue/requests/library/Requests/Utility/CaseInsensitiveDictionary.php @@ -46,7 +46,7 @@ class Requests_Utility_CaseInsensitiveDictionary implements ArrayAccess, Iterato * Get the value for the item * * @param string $key Item key - * @return string Item value + * @return string|null Item value (null if offsetExists is false) */ public function offsetGet($key) { $key = strtolower($key); @@ -70,7 +70,7 @@ class Requests_Utility_CaseInsensitiveDictionary implements ArrayAccess, Iterato throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset'); } - $key = strtolower($key); + $key = strtolower($key); $this->data[$key] = $value; } diff --git a/vendor/rmccue/requests/library/Requests/Utility/FilteredIterator.php b/vendor/rmccue/requests/library/Requests/Utility/FilteredIterator.php index 76a29e722..66ab323ee 100644 --- a/vendor/rmccue/requests/library/Requests/Utility/FilteredIterator.php +++ b/vendor/rmccue/requests/library/Requests/Utility/FilteredIterator.php @@ -39,7 +39,27 @@ class Requests_Utility_FilteredIterator extends ArrayIterator { */ public function current() { $value = parent::current(); - $value = call_user_func($this->callback, $value); + + if (is_callable($this->callback)) { + $value = call_user_func($this->callback, $value); + } + return $value; } + + /** + * @inheritdoc + */ + public function unserialize($serialized) {} + + /** + * @inheritdoc + * + * @phpcs:disable PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound + */ + public function __unserialize($serialized) {} + + public function __wakeup() { + unset($this->callback); + } } diff --git a/vendor/rmccue/requests/package.xml.tpl b/vendor/rmccue/requests/package.xml.tpl deleted file mode 100644 index f1ccab655..000000000 --- a/vendor/rmccue/requests/package.xml.tpl +++ /dev/null @@ -1,60 +0,0 @@ - - - Requests - pear.ryanmccue.info - A HTTP library written in PHP, for human beings. - - Requests is a HTTP library written in PHP, for human beings. It is - roughly based on the API from the excellent Requests Python library. - Requests is ISC Licensed (similar to the new BSD license) and has - no dependencies. - - - Ryan McCue - rmccue - me+pear@ryanmccue dot info - yes - - {{ date }} - - - {{ version }} - {{ api_version }} - - - {{ stability }} - {{ stability }} - - ISC - - - - - - - - - - -{{ files }} - - - - - - - - - 5.2.0 - - - 1.4.0 - - - - - \ No newline at end of file diff --git a/vendor/rmccue/requests/phpunit.xml.dist b/vendor/rmccue/requests/phpunit.xml.dist new file mode 100644 index 000000000..48856b5eb --- /dev/null +++ b/vendor/rmccue/requests/phpunit.xml.dist @@ -0,0 +1,43 @@ + + + + + tests/Auth + + + tests/Transport + + + tests/Proxy + + + tests/ChunkedEncoding.php + tests/Cookies.php + tests/Encoding.php + tests/IDNAEncoder.php + tests/IRI.php + tests/Requests.php + tests/Response/Headers.php + tests/Session.php + tests/SSL.php + tests/Utility/FilteredIterator.php + + + + + + + + + + library + + + diff --git a/vendor/rmccue/requests/tests/Auth/Basic.php b/vendor/rmccue/requests/tests/Auth/Basic.php deleted file mode 100644 index b1d5af28b..000000000 --- a/vendor/rmccue/requests/tests/Auth/Basic.php +++ /dev/null @@ -1,87 +0,0 @@ -markTestSkipped($transport . ' is not available'); - return; - } - - $options = array( - 'auth' => array('user', 'passwd'), - 'transport' => $transport, - ); - $request = Requests::get(httpbin('/basic-auth/user/passwd'), array(), $options); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body); - $this->assertEquals(true, $result->authenticated); - $this->assertEquals('user', $result->user); - } - - /** - * @dataProvider transportProvider - */ - public function testUsingInstantiation($transport) { - if (!call_user_func(array($transport, 'test'))) { - $this->markTestSkipped($transport . ' is not available'); - return; - } - - $options = array( - 'auth' => new Requests_Auth_Basic(array('user', 'passwd')), - 'transport' => $transport, - ); - $request = Requests::get(httpbin('/basic-auth/user/passwd'), array(), $options); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body); - $this->assertEquals(true, $result->authenticated); - $this->assertEquals('user', $result->user); - } - - /** - * @dataProvider transportProvider - */ - public function testPOSTUsingInstantiation($transport) { - if (!call_user_func(array($transport, 'test'))) { - $this->markTestSkipped($transport . ' is not available'); - return; - } - - $options = array( - 'auth' => new Requests_Auth_Basic(array('user', 'passwd')), - 'transport' => $transport, - ); - $data = 'test'; - $request = Requests::post(httpbin('/post'), array(), $data, $options); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body); - - $auth = $result->headers->Authorization; - $auth = explode(' ', $auth); - - $this->assertEquals(base64_encode('user:passwd'), $auth[1]); - $this->assertEquals('test', $result->data); - } - - /** - * @expectedException Requests_Exception - */ - public function testMissingPassword() { - $auth = new Requests_Auth_Basic(array('user')); - } - -} \ No newline at end of file diff --git a/vendor/rmccue/requests/tests/ChunkedEncoding.php b/vendor/rmccue/requests/tests/ChunkedEncoding.php deleted file mode 100644 index 32ff92ffb..000000000 --- a/vendor/rmccue/requests/tests/ChunkedEncoding.php +++ /dev/null @@ -1,93 +0,0 @@ -body = $body; - $transport->chunked = true; - - $options = array( - 'transport' => $transport - ); - $response = Requests::get('http://example.com/', array(), $options); - - $this->assertEquals($expected, $response->body); - } - - public static function notChunkedProvider() { - return array( - 'invalid chunk size' => array( 'Hello! This is a non-chunked response!' ), - 'invalid chunk extension' => array( '1BNot chunked\r\nLooks chunked but it is not\r\n' ), - 'unquoted chunk-ext-val with space' => array( "02;foo=unquoted with space\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n" ), - 'unquoted chunk-ext-val with forbidden character' => array( "02;foo={unquoted}\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n" ), - 'invalid chunk-ext-name' => array( "02;{foo}=bar\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n" ), - 'incomplete quote for chunk-ext-value' => array( "02;foo=\"no end quote\r\nab\r\n04\r\nra\nc\r\n06\r\nadabra\r\n0c\r\n\nall we got\n" ), - ); - } - - /** - * Response says it's chunked, but actually isn't - * @dataProvider notChunkedProvider - */ - public function testNotActuallyChunked($body) { - $transport = new MockTransport(); - $transport->body = $body; - $transport->chunked = true; - - $options = array( - 'transport' => $transport - ); - $response = Requests::get('http://example.com/', array(), $options); - - $this->assertEquals($transport->body, $response->body); - } - - - /** - * Response says it's chunked and starts looking like it is, but turns out - * that they're lying to us - */ - public function testMixedChunkiness() { - $transport = new MockTransport(); - $transport->body = "02\r\nab\r\nNot actually chunked!"; - $transport->chunked = true; - - $options = array( - 'transport' => $transport - ); - $response = Requests::get('http://example.com/', array(), $options); - $this->assertEquals($transport->body, $response->body); - } -} \ No newline at end of file diff --git a/vendor/rmccue/requests/tests/Cookies.php b/vendor/rmccue/requests/tests/Cookies.php deleted file mode 100644 index f53c6b7d5..000000000 --- a/vendor/rmccue/requests/tests/Cookies.php +++ /dev/null @@ -1,642 +0,0 @@ -assertEquals('requests-testcookie', $cookie->name); - $this->assertEquals('testvalue', $cookie->value); - $this->assertEquals('testvalue', (string) $cookie); - - $this->assertEquals('requests-testcookie=testvalue', $cookie->format_for_header()); - $this->assertEquals('requests-testcookie=testvalue', $cookie->format_for_set_cookie()); - } - - public function testCookieWithAttributes() { - $attributes = array( - 'httponly', - 'path' => '/' - ); - $cookie = new Requests_Cookie('requests-testcookie', 'testvalue', $attributes); - - $this->assertEquals('requests-testcookie=testvalue', $cookie->format_for_header()); - $this->assertEquals('requests-testcookie=testvalue; httponly; path=/', $cookie->format_for_set_cookie()); - } - - public function testEmptyCookieName() { - $cookie = Requests_Cookie::parse('test'); - $this->assertEquals('', $cookie->name); - $this->assertEquals('test', $cookie->value); - } - - public function testEmptyAttributes() { - $cookie = Requests_Cookie::parse('foo=bar; HttpOnly'); - $this->assertTrue($cookie->attributes['httponly']); - } - - public function testCookieJarSetter() { - $jar1 = new Requests_Cookie_Jar(); - $jar1['requests-testcookie'] = 'testvalue'; - - $jar2 = new Requests_Cookie_Jar(array( - 'requests-testcookie' => 'testvalue', - )); - $this->assertEquals($jar1, $jar2); - } - - public function testCookieJarUnsetter() { - $jar = new Requests_Cookie_Jar(); - $jar['requests-testcookie'] = 'testvalue'; - - $this->assertEquals('testvalue', $jar['requests-testcookie']); - - unset($jar['requests-testcookie']); - $this->assertEmpty($jar['requests-testcookie']); - $this->assertFalse(isset($jar['requests-testcookie'])); - } - - /** - * @expectedException Requests_Exception - */ - public function testCookieJarAsList() { - $cookies = new Requests_Cookie_Jar(); - $cookies[] = 'requests-testcookie1=testvalue1'; - } - - public function testCookieJarIterator() { - $cookies = array( - 'requests-testcookie1' => 'testvalue1', - 'requests-testcookie2' => 'testvalue2', - ); - $jar = new Requests_Cookie_Jar($cookies); - - foreach ($jar as $key => $value) { - $this->assertEquals($cookies[$key], $value); - } - } - - public function testReceivingCookies() { - $options = array( - 'follow_redirects' => false, - ); - $url = httpbin('/cookies/set?requests-testcookie=testvalue'); - - $response = Requests::get($url, array(), $options); - - $cookie = $response->cookies['requests-testcookie']; - $this->assertNotEmpty( $cookie ); - $this->assertEquals( 'testvalue', $cookie->value ); - } - - public function testPersistenceOnRedirect() { - $options = array( - 'follow_redirects' => true, - ); - $url = httpbin('/cookies/set?requests-testcookie=testvalue'); - - $response = Requests::get($url, array(), $options); - - $cookie = $response->cookies['requests-testcookie']; - $this->assertNotEmpty( $cookie ); - $this->assertEquals( 'testvalue', $cookie->value ); - } - - protected function setCookieRequest($cookies) { - $options = array( - 'cookies' => $cookies, - ); - $response = Requests::get(httpbin('/cookies/set'), array(), $options); - - $data = json_decode($response->body, true); - $this->assertInternalType('array', $data); - $this->assertArrayHasKey('cookies', $data); - return $data['cookies']; - } - - public function testSendingCookie() { - $cookies = array( - 'requests-testcookie1' => 'testvalue1', - ); - - $data = $this->setCookieRequest($cookies); - - $this->assertArrayHasKey('requests-testcookie1', $data); - $this->assertEquals('testvalue1', $data['requests-testcookie1']); - } - - /** - * @depends testSendingCookie - */ - public function testCookieExpiration() { - $options = array( - 'follow_redirects' => true, - ); - $url = httpbin('/cookies/set/testcookie/testvalue'); - $url .= '?expiry=1'; - - $response = Requests::get($url, array(), $options); - $response->throw_for_status(); - - $data = json_decode($response->body, true); - $this->assertEmpty($data['cookies']); - } - - public function testSendingCookieWithJar() { - $cookies = new Requests_Cookie_Jar(array( - 'requests-testcookie1' => 'testvalue1', - )); - $data = $this->setCookieRequest($cookies); - - $this->assertArrayHasKey('requests-testcookie1', $data); - $this->assertEquals('testvalue1', $data['requests-testcookie1']); - } - - public function testSendingMultipleCookies() { - $cookies = array( - 'requests-testcookie1' => 'testvalue1', - 'requests-testcookie2' => 'testvalue2', - ); - $data = $this->setCookieRequest($cookies); - - $this->assertArrayHasKey('requests-testcookie1', $data); - $this->assertEquals('testvalue1', $data['requests-testcookie1']); - - $this->assertArrayHasKey('requests-testcookie2', $data); - $this->assertEquals('testvalue2', $data['requests-testcookie2']); - } - - public function testSendingMultipleCookiesWithJar() { - $cookies = new Requests_Cookie_Jar(array( - 'requests-testcookie1' => 'testvalue1', - 'requests-testcookie2' => 'testvalue2', - )); - $data = $this->setCookieRequest($cookies); - - $this->assertArrayHasKey('requests-testcookie1', $data); - $this->assertEquals('testvalue1', $data['requests-testcookie1']); - - $this->assertArrayHasKey('requests-testcookie2', $data); - $this->assertEquals('testvalue2', $data['requests-testcookie2']); - } - - public function testSendingPrebakedCookie() { - $cookies = new Requests_Cookie_Jar(array( - new Requests_Cookie('requests-testcookie', 'testvalue'), - )); - $data = $this->setCookieRequest($cookies); - - $this->assertArrayHasKey('requests-testcookie', $data); - $this->assertEquals('testvalue', $data['requests-testcookie']); - } - - public function domainMatchProvider() { - return array( - array('example.com', 'example.com', true, true), - array('example.com', 'www.example.com', false, true), - array('example.com', 'example.net', false, false), - - // Leading period - array('.example.com', 'example.com', true, true), - array('.example.com', 'www.example.com', false, true), - array('.example.com', 'example.net', false, false), - - // Prefix, but not subdomain - array('example.com', 'notexample.com', false, false), - array('example.com', 'notexample.net', false, false), - - // Reject IP address prefixes - array('127.0.0.1', '127.0.0.1', true, true), - array('127.0.0.1', 'abc.127.0.0.1', false, false), - array('127.0.0.1', 'example.com', false, false), - - // Check that we're checking the actual length - array('127.com', 'test.127.com', false, true), - ); - } - - /** - * @dataProvider domainMatchProvider - */ - public function testDomainExactMatch($original, $check, $matches, $domain_matches) { - $attributes = new Requests_Utility_CaseInsensitiveDictionary(); - $attributes['domain'] = $original; - $cookie = new Requests_Cookie('requests-testcookie', 'testvalue', $attributes); - $this->assertEquals($matches, $cookie->domain_matches($check)); - } - - /** - * @dataProvider domainMatchProvider - */ - public function testDomainMatch($original, $check, $matches, $domain_matches) { - $attributes = new Requests_Utility_CaseInsensitiveDictionary(); - $attributes['domain'] = $original; - $flags = array( - 'host-only' => false - ); - $cookie = new Requests_Cookie('requests-testcookie', 'testvalue', $attributes, $flags); - $this->assertEquals($domain_matches, $cookie->domain_matches($check)); - } - - public function pathMatchProvider() { - return array( - array('/', '', true), - array('/', '/', true), - - array('/', '/test', true), - array('/', '/test/', true), - - array('/test', '/', false), - array('/test', '/test', true), - array('/test', '/testing', false), - array('/test', '/test/', true), - array('/test', '/test/ing', true), - array('/test', '/test/ing/', true), - - array('/test/', '/test/', true), - array('/test/', '/', false), - ); - } - - /** - * @dataProvider pathMatchProvider - */ - public function testPathMatch($original, $check, $matches) { - $attributes = new Requests_Utility_CaseInsensitiveDictionary(); - $attributes['path'] = $original; - $cookie = new Requests_Cookie('requests-testcookie', 'testvalue', $attributes); - $this->assertEquals($matches, $cookie->path_matches($check)); - } - - public function urlMatchProvider() { - return array( - // Domain handling - array( 'example.com', '/', 'http://example.com/', true, true ), - array( 'example.com', '/', 'http://www.example.com/', false, true ), - array( 'example.com', '/', 'http://example.net/', false, false ), - array( 'example.com', '/', 'http://www.example.net/', false, false ), - - // /test - array( 'example.com', '/test', 'http://example.com/', false, false ), - array( 'example.com', '/test', 'http://www.example.com/', false, false ), - - array( 'example.com', '/test', 'http://example.com/test', true, true ), - array( 'example.com', '/test', 'http://www.example.com/test', false, true ), - - array( 'example.com', '/test', 'http://example.com/testing', false, false ), - array( 'example.com', '/test', 'http://www.example.com/testing', false, false ), - - array( 'example.com', '/test', 'http://example.com/test/', true, true ), - array( 'example.com', '/test', 'http://www.example.com/test/', false, true ), - - // /test/ - array( 'example.com', '/test/', 'http://example.com/', false, false ), - array( 'example.com', '/test/', 'http://www.example.com/', false, false ), - ); - } - - /** - * @depends testDomainExactMatch - * @depends testPathMatch - * @dataProvider urlMatchProvider - */ - public function testUrlExactMatch($domain, $path, $check, $matches, $domain_matches) { - $attributes = new Requests_Utility_CaseInsensitiveDictionary(); - $attributes['domain'] = $domain; - $attributes['path'] = $path; - $check = new Requests_IRI($check); - $cookie = new Requests_Cookie('requests-testcookie', 'testvalue', $attributes); - $this->assertEquals($matches, $cookie->uri_matches($check)); - } - - /** - * @depends testDomainMatch - * @depends testPathMatch - * @dataProvider urlMatchProvider - */ - public function testUrlMatch($domain, $path, $check, $matches, $domain_matches) { - $attributes = new Requests_Utility_CaseInsensitiveDictionary(); - $attributes['domain'] = $domain; - $attributes['path'] = $path; - $flags = array( - 'host-only' => false - ); - $check = new Requests_IRI($check); - $cookie = new Requests_Cookie('requests-testcookie', 'testvalue', $attributes, $flags); - $this->assertEquals($domain_matches, $cookie->uri_matches($check)); - } - - public function testUrlMatchSecure() { - $attributes = new Requests_Utility_CaseInsensitiveDictionary(); - $attributes['domain'] = 'example.com'; - $attributes['path'] = '/'; - $attributes['secure'] = true; - $flags = array( - 'host-only' => false, - ); - $cookie = new Requests_Cookie('requests-testcookie', 'testvalue', $attributes, $flags); - - $this->assertTrue($cookie->uri_matches(new Requests_IRI('https://example.com/'))); - $this->assertFalse($cookie->uri_matches(new Requests_IRI('http://example.com/'))); - - // Double-check host-only - $this->assertTrue($cookie->uri_matches(new Requests_IRI('https://www.example.com/'))); - $this->assertFalse($cookie->uri_matches(new Requests_IRI('http://www.example.com/'))); - } - - /** - * Manually set cookies without a domain/path set should always be valid - * - * Cookies parsed from headers internally in Requests will always have a - * domain/path set, but those created manually will not. Manual cookies - * should be regarded as "global" cookies (that is, set for `.`) - */ - public function testUrlMatchManuallySet() { - $cookie = new Requests_Cookie('requests-testcookie', 'testvalue'); - $this->assertTrue($cookie->domain_matches('example.com')); - $this->assertTrue($cookie->domain_matches('example.net')); - $this->assertTrue($cookie->path_matches('/')); - $this->assertTrue($cookie->path_matches('/test')); - $this->assertTrue($cookie->path_matches('/test/')); - $this->assertTrue($cookie->uri_matches(new Requests_IRI('http://example.com/'))); - $this->assertTrue($cookie->uri_matches(new Requests_IRI('http://example.com/test'))); - $this->assertTrue($cookie->uri_matches(new Requests_IRI('http://example.com/test/'))); - $this->assertTrue($cookie->uri_matches(new Requests_IRI('http://example.net/'))); - $this->assertTrue($cookie->uri_matches(new Requests_IRI('http://example.net/test'))); - $this->assertTrue($cookie->uri_matches(new Requests_IRI('http://example.net/test/'))); - } - - public static function parseResultProvider() { - return array( - // Basic parsing - array( - 'foo=bar', - array( 'name' => 'foo', 'value' => 'bar' ), - ), - array( - 'bar', - array( 'name' => '', 'value' => 'bar' ), - ), - - // Expiration - // RFC 822, updated by RFC 1123 - array( - 'foo=bar; Expires=Thu, 5-Dec-2013 04:50:12 GMT', - array( 'expired' => true ), - array( 'expires' => gmmktime( 4, 50, 12, 12, 5, 2013 ) ), - ), - array( - 'foo=bar; Expires=Fri, 5-Dec-2014 04:50:12 GMT', - array( 'expired' => false ), - array( 'expires' => gmmktime( 4, 50, 12, 12, 5, 2014 ) ), - ), - // RFC 850, obsoleted by RFC 1036 - array( - 'foo=bar; Expires=Thursday, 5-Dec-2013 04:50:12 GMT', - array( 'expired' => true ), - array( 'expires' => gmmktime( 4, 50, 12, 12, 5, 2013 ) ), - ), - array( - 'foo=bar; Expires=Friday, 5-Dec-2014 04:50:12 GMT', - array( 'expired' => false ), - array( 'expires' => gmmktime( 4, 50, 12, 12, 5, 2014 ) ), - ), - // asctime() - array( - 'foo=bar; Expires=Thu Dec 5 04:50:12 2013', - array( 'expired' => true ), - array( 'expires' => gmmktime( 4, 50, 12, 12, 5, 2013 ) ), - ), - array( - 'foo=bar; Expires=Fri Dec 5 04:50:12 2014', - array( 'expired' => false ), - array( 'expires' => gmmktime( 4, 50, 12, 12, 5, 2014 ) ), - ), - array( - // Invalid - 'foo=bar; Expires=never', - array(), - array( 'expires' => null ), - ), - - // Max-Age - array( - 'foo=bar; Max-Age=10', - array( 'expired' => false ), - array( 'max-age' => gmmktime( 0, 0, 10, 1, 1, 2014 ) ), - ), - array( - 'foo=bar; Max-Age=3660', - array( 'expired' => false ), - array( 'max-age' => gmmktime( 1, 1, 0, 1, 1, 2014 ) ), - ), - array( - 'foo=bar; Max-Age=0', - array( 'expired' => true ), - array( 'max-age' => 0 ), - ), - array( - 'foo=bar; Max-Age=-1000', - array( 'expired' => true ), - array( 'max-age' => 0 ), - ), - array( - // Invalid (non-digit character) - 'foo=bar; Max-Age=1e6', - array( 'expired' => false ), - array( 'max-age' => null ), - ) - ); - } - - protected function check_parsed_cookie($cookie, $expected, $expected_attributes, $expected_flags = array()) { - if (isset($expected['name'])) { - $this->assertEquals($expected['name'], $cookie->name); - } - if (isset($expected['value'])) { - $this->assertEquals($expected['value'], $cookie->value); - } - if (isset($expected['expired'])) { - $this->assertEquals($expected['expired'], $cookie->is_expired()); - } - if (isset($expected_attributes)) { - foreach ($expected_attributes as $attr_key => $attr_val) { - $this->assertEquals($attr_val, $cookie->attributes[$attr_key], "$attr_key should match supplied"); - } - } - if (isset($expected_flags)) { - foreach ($expected_flags as $flag_key => $flag_val) { - $this->assertEquals($flag_val, $cookie->flags[$flag_key], "$flag_key should match supplied"); - } - } - } - - /** - * @dataProvider parseResultProvider - */ - public function testParsingHeader($header, $expected, $expected_attributes = array(), $expected_flags = array()) { - // Set the reference time to 2014-01-01 00:00:00 - $reference_time = gmmktime( 0, 0, 0, 1, 1, 2014 ); - - $cookie = Requests_Cookie::parse($header, null, $reference_time); - $this->check_parsed_cookie($cookie, $expected, $expected_attributes); - } - - /** - * Double-normalizes the cookie data to ensure we catch any issues there - * - * @dataProvider parseResultProvider - */ - public function testParsingHeaderDouble($header, $expected, $expected_attributes = array(), $expected_flags = array()) { - // Set the reference time to 2014-01-01 00:00:00 - $reference_time = gmmktime( 0, 0, 0, 1, 1, 2014 ); - - $cookie = Requests_Cookie::parse($header, null, $reference_time); - - // Normalize the value again - $cookie->normalize(); - - $this->check_parsed_cookie($cookie, $expected, $expected_attributes, $expected_flags); - } - - /** - * @dataProvider parseResultProvider - */ - public function testParsingHeaderObject($header, $expected, $expected_attributes = array(), $expected_flags = array()) { - $headers = new Requests_Response_Headers(); - $headers['Set-Cookie'] = $header; - - // Set the reference time to 2014-01-01 00:00:00 - $reference_time = gmmktime( 0, 0, 0, 1, 1, 2014 ); - - $parsed = Requests_Cookie::parse_from_headers($headers, null, $reference_time); - $this->assertCount(1, $parsed); - - $cookie = reset($parsed); - $this->check_parsed_cookie($cookie, $expected, $expected_attributes); - } - - public function parseFromHeadersProvider() { - return array( - # Varying origin path - array( - 'name=value', - 'http://example.com/', - array(), - array( 'path' => '/' ), - array( 'host-only' => true ), - ), - array( - 'name=value', - 'http://example.com/test', - array(), - array( 'path' => '/' ), - array( 'host-only' => true ), - ), - array( - 'name=value', - 'http://example.com/test/', - array(), - array( 'path' => '/test' ), - array( 'host-only' => true ), - ), - array( - 'name=value', - 'http://example.com/test/abc', - array(), - array( 'path' => '/test' ), - array( 'host-only' => true ), - ), - array( - 'name=value', - 'http://example.com/test/abc/', - array(), - array( 'path' => '/test/abc' ), - array( 'host-only' => true ), - ), - - # With specified path - array( - 'name=value; path=/', - 'http://example.com/', - array(), - array( 'path' => '/' ), - array( 'host-only' => true ), - ), - array( - 'name=value; path=/test', - 'http://example.com/', - array(), - array( 'path' => '/test' ), - array( 'host-only' => true ), - ), - array( - 'name=value; path=/test/', - 'http://example.com/', - array(), - array( 'path' => '/test/' ), - array( 'host-only' => true ), - ), - - # Invalid path - array( - 'name=value; path=yolo', - 'http://example.com/', - array(), - array( 'path' => '/' ), - array( 'host-only' => true ), - ), - array( - 'name=value; path=yolo', - 'http://example.com/test/', - array(), - array( 'path' => '/test' ), - array( 'host-only' => true ), - ), - - # Cross-origin cookies, reject! - array( - 'name=value; domain=example.org', - 'http://example.com/', - array( 'invalid' => false ), - ), - - # Subdomain cookies - array( - 'name=value; domain=test.example.com', - 'http://test.example.com/', - array(), - array( 'domain' => 'test.example.com' ), - array( 'host-only' => false ) - ), - array( - 'name=value; domain=example.com', - 'http://test.example.com/', - array(), - array( 'domain' => 'example.com' ), - array( 'host-only' => false ) - ), - ); - } - - /** - * @dataProvider parseFromHeadersProvider - */ - public function testParsingHeaderWithOrigin($header, $origin, $expected, $expected_attributes = array(), $expected_flags = array()) { - $origin = new Requests_IRI($origin); - $headers = new Requests_Response_Headers(); - $headers['Set-Cookie'] = $header; - - // Set the reference time to 2014-01-01 00:00:00 - $reference_time = gmmktime( 0, 0, 0, 1, 1, 2014 ); - - $parsed = Requests_Cookie::parse_from_headers($headers, $origin, $reference_time); - if (isset($expected['invalid'])) { - $this->assertCount(0, $parsed); - return; - } - $this->assertCount(1, $parsed); - - $cookie = reset($parsed); - $this->check_parsed_cookie($cookie, $expected, $expected_attributes, $expected_flags); - } -} \ No newline at end of file diff --git a/vendor/rmccue/requests/tests/Encoding.php b/vendor/rmccue/requests/tests/Encoding.php deleted file mode 100644 index 7e2f13849..000000000 --- a/vendor/rmccue/requests/tests/Encoding.php +++ /dev/null @@ -1,94 +0,0 @@ - $set) { - $real_set = self::mapData($key, $set); - $data = array_merge($data, $real_set); - } - return $data; - } - - /** - * @dataProvider encodedData - */ - public function testDecompress($original, $encoded) { - $decoded = Requests::decompress($encoded); - $this->assertEquals($original, $decoded); - } - - /** - * @dataProvider encodedData - */ - public function testCompatibleInflate($original, $encoded) { - $decoded = Requests::compatible_gzinflate($encoded); - $this->assertEquals($original, $decoded); - } - - protected function bin2hex($field) { - $field = bin2hex($field); - $field = chunk_split($field,2,"\\x"); - $field = "\\x" . substr($field,0,-2); - return $field; - } -} diff --git a/vendor/rmccue/requests/tests/IDNAEncoder.php b/vendor/rmccue/requests/tests/IDNAEncoder.php deleted file mode 100644 index 24df2deff..000000000 --- a/vendor/rmccue/requests/tests/IDNAEncoder.php +++ /dev/null @@ -1,102 +0,0 @@ -assertEquals($expected, $result); - } - - /** - * @expectedException Requests_Exception - */ - public function testASCIITooLong() { - $data = str_repeat("abcd", 20); - $result = Requests_IDNAEncoder::encode($data); - } - - /** - * @expectedException Requests_Exception - */ - public function testEncodedTooLong() { - $data = str_repeat("\xe4\xbb\x96", 60); - $result = Requests_IDNAEncoder::encode($data); - } - - /** - * @expectedException Requests_Exception - */ - public function testAlreadyPrefixed() { - $result = Requests_IDNAEncoder::encode("xn--\xe4\xbb\x96"); - } - - public function testASCIICharacter() { - $result = Requests_IDNAEncoder::encode("a"); - $this->assertEquals('a', $result); - } - - public function testTwoByteCharacter() { - $result = Requests_IDNAEncoder::encode("\xc2\xb6"); // Pilcrow character - $this->assertEquals('xn--tba', $result); - } - - public function testThreeByteCharacter() { - $result = Requests_IDNAEncoder::encode("\xe2\x82\xac"); // Euro symbol - $this->assertEquals('xn--lzg', $result); - } - - public function testFourByteCharacter() { - $result = Requests_IDNAEncoder::encode("\xf0\xa4\xad\xa2"); // Chinese symbol? - $this->assertEquals('xn--ww6j', $result); - } - - /** - * @expectedException Requests_Exception - */ - public function testFiveByteCharacter() { - $result = Requests_IDNAEncoder::encode("\xfb\xb6\xb6\xb6\xb6"); - } - - /** - * @expectedException Requests_Exception - */ - public function testSixByteCharacter() { - $result = Requests_IDNAEncoder::encode("\xfd\xb6\xb6\xb6\xb6\xb6"); - } - - /** - * @expectedException Requests_Exception - */ - public function testInvalidASCIICharacterWithMultibyte() { - $result = Requests_IDNAEncoder::encode("\0\xc2\xb6"); - } - - /** - * @expectedException Requests_Exception - */ - public function testUnfinishedMultibyte() { - $result = Requests_IDNAEncoder::encode("\xc2"); - } - - /** - * @expectedException Requests_Exception - */ - public function testPartialMultibyte() { - $result = Requests_IDNAEncoder::encode("\xc2\xc2\xb6"); - } -} \ No newline at end of file diff --git a/vendor/rmccue/requests/tests/IRI.php b/vendor/rmccue/requests/tests/IRI.php deleted file mode 100644 index 77f241726..000000000 --- a/vendor/rmccue/requests/tests/IRI.php +++ /dev/null @@ -1,413 +0,0 @@ -assertEquals($expected, Requests_IRI::absolutize($base, $relative)->iri); - $this->assertEquals($expected, (string) Requests_IRI::absolutize($base, $relative)); - } - - /** - * @dataProvider rfc3986_tests - */ - public function testBothStringRFC3986($relative, $expected) - { - $base = 'http://a/b/c/d;p?q'; - $this->assertEquals($expected, Requests_IRI::absolutize($base, $relative)->iri); - $this->assertEquals($expected, (string) Requests_IRI::absolutize($base, $relative)); - } - - /** - * @dataProvider rfc3986_tests - */ - public function testObjectRFC3986($relative, $expected) - { - $base = new Requests_IRI('http://a/b/c/d;p?q'); - $expected = new Requests_IRI($expected); - $this->assertEquals($expected, Requests_IRI::absolutize($base, $relative)); - } - - public static function sp_tests() - { - return array( - array('http://a/b/c/d', 'f%0o', 'http://a/b/c/f%250o'), - array('http://a/b/', 'c', 'http://a/b/c'), - array('http://a/', 'b', 'http://a/b'), - array('http://a/', '/b', 'http://a/b'), - array('http://a/b', 'c', 'http://a/c'), - array('http://a/b/', "c\x0Ad", 'http://a/b/c%0Ad'), - array('http://a/b/', "c\x0A\x0B", 'http://a/b/c%0A%0B'), - array('http://a/b/c', '//0', 'http://0/'), - array('http://a/b/c', '0', 'http://a/b/0'), - array('http://a/b/c', '?0', 'http://a/b/c?0'), - array('http://a/b/c', '#0', 'http://a/b/c#0'), - array('http://0/b/c', 'd', 'http://0/b/d'), - array('http://a/b/c?0', 'd', 'http://a/b/d'), - array('http://a/b/c#0', 'd', 'http://a/b/d'), - array('http://example.com', '//example.net', 'http://example.net/'), - array('http:g', 'a', 'http:a'), - ); - } - - /** - * @dataProvider sp_tests - */ - public function testStringSP($base, $relative, $expected) - { - $base = new Requests_IRI($base); - $this->assertEquals($expected, Requests_IRI::absolutize($base, $relative)->iri); - $this->assertEquals($expected, (string) Requests_IRI::absolutize($base, $relative)); - } - - /** - * @dataProvider sp_tests - */ - public function testObjectSP($base, $relative, $expected) - { - $base = new Requests_IRI($base); - $expected = new Requests_IRI($expected); - $this->assertEquals($expected, Requests_IRI::absolutize($base, $relative)); - } - - public static function absolutize_tests() - { - return array( - array('http://example.com/', 'foo/111:bar', 'http://example.com/foo/111:bar'), - array('http://example.com/#foo', '', 'http://example.com/'), - ); - } - - /** - * @dataProvider absolutize_tests - */ - public function testAbsolutizeString($base, $relative, $expected) - { - $base = new Requests_IRI($base); - $this->assertEquals($expected, Requests_IRI::absolutize($base, $relative)->iri); - } - - /** - * @dataProvider absolutize_tests - */ - public function testAbsolutizeObject($base, $relative, $expected) - { - $base = new Requests_IRI($base); - $expected = new Requests_IRI($expected); - $this->assertEquals($expected, Requests_IRI::absolutize($base, $relative)); - } - - public static function normalization_tests() - { - return array( - array('example://a/b/c/%7Bfoo%7D', 'example://a/b/c/%7Bfoo%7D'), - array('eXAMPLE://a/./b/../b/%63/%7bfoo%7d', 'example://a/b/c/%7Bfoo%7D'), - array('example://%61/', 'example://a/'), - array('example://%41/', 'example://a/'), - array('example://A/', 'example://a/'), - array('example://a/', 'example://a/'), - array('example://%25A/', 'example://%25a/'), - array('HTTP://EXAMPLE.com/', 'http://example.com/'), - array('http://example.com/', 'http://example.com/'), - array('http://example.com:', 'http://example.com/'), - array('http://example.com:80', 'http://example.com/'), - array('http://@example.com', 'http://@example.com/'), - array('http://', 'http:///'), - array('http://example.com?', 'http://example.com/?'), - array('http://example.com#', 'http://example.com/#'), - array('https://example.com/', 'https://example.com/'), - array('https://example.com:', 'https://example.com/'), - array('https://@example.com', 'https://@example.com/'), - array('https://example.com?', 'https://example.com/?'), - array('https://example.com#', 'https://example.com/#'), - array('file://localhost/foobar', 'file:/foobar'), - array('http://[0:0:0:0:0:0:0:1]', 'http://[::1]/'), - array('http://[2001:db8:85a3:0000:0000:8a2e:370:7334]', 'http://[2001:db8:85a3::8a2e:370:7334]/'), - array('http://[0:0:0:0:0:ffff:c0a8:a01]', 'http://[::ffff:c0a8:a01]/'), - array('http://[ffff:0:0:0:0:0:0:0]', 'http://[ffff::]/'), - array('http://[::ffff:192.0.2.128]', 'http://[::ffff:192.0.2.128]/'), - array('http://[invalid]', 'http:'), - array('http://[0:0:0:0:0:0:0:1]:', 'http://[::1]/'), - array('http://[0:0:0:0:0:0:0:1]:80', 'http://[::1]/'), - array('http://[0:0:0:0:0:0:0:1]:1234', 'http://[::1]:1234/'), - // Punycode decoding helps with normalisation of IRIs, but is not - // needed for URIs, so we don't really care about it for Requests - //array('http://xn--tdali-d8a8w.lv', 'http://tūdaliņ.lv/'), - //array('http://t%C5%ABdali%C5%86.lv', 'http://tūdaliņ.lv/'), - array('http://Aa@example.com', 'http://Aa@example.com/'), - array('http://example.com?Aa', 'http://example.com/?Aa'), - array('http://example.com/Aa', 'http://example.com/Aa'), - array('http://example.com#Aa', 'http://example.com/#Aa'), - array('http://[0:0:0:0:0:0:0:0]', 'http://[::]/'), - array('http:.', 'http:'), - array('http:..', 'http:'), - array('http:./', 'http:'), - array('http:../', 'http:'), - array('http://example.com/%3A', 'http://example.com/%3A'), - array('http://example.com/:', 'http://example.com/:'), - array('http://example.com/%C2', 'http://example.com/%C2'), - array('http://example.com/%C2a', 'http://example.com/%C2a'), - array('http://example.com/%C2%00', 'http://example.com/%C2%00'), - array('http://example.com/%C3%A9', 'http://example.com/é'), - array('http://example.com/%C3%A9%00', 'http://example.com/é%00'), - array('http://example.com/%C3%A9cole', 'http://example.com/école'), - array('http://example.com/%FF', 'http://example.com/%FF'), - array("http://example.com/\xF3\xB0\x80\x80", 'http://example.com/%F3%B0%80%80'), - array("http://example.com/\xF3\xB0\x80\x80%00", 'http://example.com/%F3%B0%80%80%00'), - array("http://example.com/\xF3\xB0\x80\x80a", 'http://example.com/%F3%B0%80%80a'), - array("http://example.com?\xF3\xB0\x80\x80", "http://example.com/?\xF3\xB0\x80\x80"), - array("http://example.com?\xF3\xB0\x80\x80%00", "http://example.com/?\xF3\xB0\x80\x80%00"), - array("http://example.com?\xF3\xB0\x80\x80a", "http://example.com/?\xF3\xB0\x80\x80a"), - array("http://example.com/\xEE\x80\x80", 'http://example.com/%EE%80%80'), - array("http://example.com/\xEE\x80\x80%00", 'http://example.com/%EE%80%80%00'), - array("http://example.com/\xEE\x80\x80a", 'http://example.com/%EE%80%80a'), - array("http://example.com?\xEE\x80\x80", "http://example.com/?\xEE\x80\x80"), - array("http://example.com?\xEE\x80\x80%00", "http://example.com/?\xEE\x80\x80%00"), - array("http://example.com?\xEE\x80\x80a", "http://example.com/?\xEE\x80\x80a"), - array("http://example.com/\xC2", 'http://example.com/%C2'), - array("http://example.com/\xC2a", 'http://example.com/%C2a'), - array("http://example.com/\xC2\x00", 'http://example.com/%C2%00'), - array("http://example.com/\xC3\xA9", 'http://example.com/é'), - array("http://example.com/\xC3\xA9\x00", 'http://example.com/é%00'), - array("http://example.com/\xC3\xA9cole", 'http://example.com/école'), - array("http://example.com/\xFF", 'http://example.com/%FF'), - array("http://example.com/\xFF%00", 'http://example.com/%FF%00'), - array("http://example.com/\xFFa", 'http://example.com/%FFa'), - array('http://example.com/%61', 'http://example.com/a'), - array('http://example.com?%26', 'http://example.com/?%26'), - array('http://example.com?%61', 'http://example.com/?a'), - array('///', '///'), - ); - } - - /** - * @dataProvider normalization_tests - */ - public function testStringNormalization($input, $output) - { - $input = new Requests_IRI($input); - $this->assertEquals($output, $input->iri); - $this->assertEquals($output, (string) $input); - } - - /** - * @dataProvider normalization_tests - */ - public function testObjectNormalization($input, $output) - { - $input = new Requests_IRI($input); - $output = new Requests_IRI($output); - $this->assertEquals($output, $input); - } - - public static function equivalence_tests() - { - return array( - array('http://É.com', 'http://%C3%89.com'), - ); - } - - /** - * @dataProvider equivalence_tests - */ - public function testObjectEquivalence($input, $output) - { - $input = new Requests_IRI($input); - $output = new Requests_IRI($output); - $this->assertEquals($output, $input); - } - - public static function not_equivalence_tests() - { - return array( - array('http://example.com/foo/bar', 'http://example.com/foo%2Fbar'), - ); - } - - /** - * @dataProvider not_equivalence_tests - */ - public function testObjectNotEquivalence($input, $output) - { - $input = new Requests_IRI($input); - $output = new Requests_IRI($output); - $this->assertNotEquals($output, $input); - } - - public function testInvalidAbsolutizeBase() - { - $this->assertFalse(Requests_IRI::absolutize('://not a URL', '../')); - } - - public function testFullGamut() - { - $iri = new Requests_IRI(); - $iri->scheme = 'http'; - $iri->userinfo = 'user:password'; - $iri->host = 'example.com'; - $iri->path = '/test/'; - $iri->fragment = 'test'; - - $this->assertEquals('http', $iri->scheme); - $this->assertEquals('user:password', $iri->userinfo); - $this->assertEquals('example.com', $iri->host); - $this->assertEquals(80, $iri->port); - $this->assertEquals('/test/', $iri->path); - $this->assertEquals('test', $iri->fragment); - } - - public function testReadAliased() - { - $iri = new Requests_IRI(); - $iri->scheme = 'http'; - $iri->userinfo = 'user:password'; - $iri->host = 'example.com'; - $iri->path = '/test/'; - $iri->fragment = 'test'; - - $this->assertEquals('http', $iri->ischeme); - $this->assertEquals('user:password', $iri->iuserinfo); - $this->assertEquals('example.com', $iri->ihost); - $this->assertEquals(80, $iri->iport); - $this->assertEquals('/test/', $iri->ipath); - $this->assertEquals('test', $iri->ifragment); - } - - public function testWriteAliased() - { - $iri = new Requests_IRI(); - $iri->scheme = 'http'; - $iri->iuserinfo = 'user:password'; - $iri->ihost = 'example.com'; - $iri->ipath = '/test/'; - $iri->ifragment = 'test'; - - $this->assertEquals('http', $iri->scheme); - $this->assertEquals('user:password', $iri->userinfo); - $this->assertEquals('example.com', $iri->host); - $this->assertEquals(80, $iri->port); - $this->assertEquals('/test/', $iri->path); - $this->assertEquals('test', $iri->fragment); - } - - /** - * @expectedException PHPUnit_Framework_Error_Notice - */ - public function testNonexistantProperty() - { - $iri = new Requests_IRI(); - $this->assertFalse(isset($iri->nonexistant_prop)); - $should_fail = $iri->nonexistant_prop; - } - - public function testBlankHost() - { - $iri = new Requests_IRI('http://example.com/a/?b=c#d'); - $iri->host = null; - - $this->assertEquals(null, $iri->host); - $this->assertEquals('http:/a/?b=c#d', (string) $iri); - } - - public function testBadPort() - { - $iri = new Requests_IRI(); - $iri->port = 'example'; - - $this->assertEquals(null, $iri->port); - } -} diff --git a/vendor/rmccue/requests/tests/Proxy/HTTP.php b/vendor/rmccue/requests/tests/Proxy/HTTP.php deleted file mode 100644 index 3d81745de..000000000 --- a/vendor/rmccue/requests/tests/Proxy/HTTP.php +++ /dev/null @@ -1,131 +0,0 @@ -markTestSkipped('Proxy not available'); - } - } - - public function transportProvider() { - return array( - array('Requests_Transport_cURL'), - array('Requests_Transport_fsockopen'), - ); - } - - /** - * @dataProvider transportProvider - */ - public function testConnectWithString($transport) { - $this->checkProxyAvailable(); - - $options = array( - 'proxy' => REQUESTS_HTTP_PROXY, - 'transport' => $transport, - ); - $response = Requests::get(httpbin('/get'), array(), $options); - $this->assertEquals('http', $response->headers['x-requests-proxied']); - - $data = json_decode($response->body, true); - $this->assertEquals('http', $data['headers']['x-requests-proxy']); - } - - /** - * @dataProvider transportProvider - */ - public function testConnectWithArray($transport) { - $this->checkProxyAvailable(); - - $options = array( - 'proxy' => array(REQUESTS_HTTP_PROXY), - 'transport' => $transport, - ); - $response = Requests::get(httpbin('/get'), array(), $options); - $this->assertEquals('http', $response->headers['x-requests-proxied']); - - $data = json_decode($response->body, true); - $this->assertEquals('http', $data['headers']['x-requests-proxy']); - } - - /** - * @dataProvider transportProvider - * @expectedException Requests_Exception - */ - public function testConnectInvalidParameters($transport) { - $this->checkProxyAvailable(); - - $options = array( - 'proxy' => array(REQUESTS_HTTP_PROXY, 'testuser', 'password', 'something'), - 'transport' => $transport, - ); - $response = Requests::get(httpbin('/get'), array(), $options); - } - - /** - * @dataProvider transportProvider - */ - public function testConnectWithInstance($transport) { - $this->checkProxyAvailable(); - - $options = array( - 'proxy' => new Requests_Proxy_HTTP(REQUESTS_HTTP_PROXY), - 'transport' => $transport, - ); - $response = Requests::get(httpbin('/get'), array(), $options); - $this->assertEquals('http', $response->headers['x-requests-proxied']); - - $data = json_decode($response->body, true); - $this->assertEquals('http', $data['headers']['x-requests-proxy']); - } - - /** - * @dataProvider transportProvider - */ - public function testConnectWithAuth($transport) { - $this->checkProxyAvailable('auth'); - - $options = array( - 'proxy' => array( - REQUESTS_HTTP_PROXY_AUTH, - REQUESTS_HTTP_PROXY_AUTH_USER, - REQUESTS_HTTP_PROXY_AUTH_PASS - ), - 'transport' => $transport, - ); - $response = Requests::get(httpbin('/get'), array(), $options); - $this->assertEquals(200, $response->status_code); - $this->assertEquals('http', $response->headers['x-requests-proxied']); - - $data = json_decode($response->body, true); - $this->assertEquals('http', $data['headers']['x-requests-proxy']); - } - - /** - * @dataProvider transportProvider - */ - public function testConnectWithInvalidAuth($transport) { - $this->checkProxyAvailable('auth'); - - $options = array( - 'proxy' => array( - REQUESTS_HTTP_PROXY_AUTH, - REQUESTS_HTTP_PROXY_AUTH_USER . '!', - REQUESTS_HTTP_PROXY_AUTH_PASS . '!' - ), - 'transport' => $transport, - ); - $response = Requests::get(httpbin('/get'), array(), $options); - $this->assertEquals(407, $response->status_code); - } -} diff --git a/vendor/rmccue/requests/tests/Requests.php b/vendor/rmccue/requests/tests/Requests.php deleted file mode 100644 index 0ebdfe46e..000000000 --- a/vendor/rmccue/requests/tests/Requests.php +++ /dev/null @@ -1,162 +0,0 @@ -assertEquals(200, $request->status_code); - } - - /** - * Standard response header parsing - */ - public function testHeaderParsing() { - $transport = new RawTransport(); - $transport->data = - "HTTP/1.0 200 OK\r\n". - "Host: localhost\r\n". - "Host: ambiguous\r\n". - "Nospace:here\r\n". - "Muchspace: there \r\n". - "Empty:\r\n". - "Empty2: \r\n". - "Folded: one\r\n". - "\ttwo\r\n". - " three\r\n\r\n". - "stop\r\n"; - - $options = array( - 'transport' => $transport - ); - $response = Requests::get('http://example.com/', array(), $options); - $expected = new Requests_Response_Headers(); - $expected['host'] = 'localhost,ambiguous'; - $expected['nospace'] = 'here'; - $expected['muchspace'] = 'there'; - $expected['empty'] = ''; - $expected['empty2'] = ''; - $expected['folded'] = 'one two three'; - foreach ($expected as $key => $value) { - $this->assertEquals($value, $response->headers[$key]); - } - - foreach ($response->headers as $key => $value) { - $this->assertEquals($value, $expected[$key]); - } - } - - public function testProtocolVersionParsing() { - $transport = new RawTransport(); - $transport->data = - "HTTP/1.0 200 OK\r\n". - "Host: localhost\r\n\r\n"; - - $options = array( - 'transport' => $transport - ); - - $response = Requests::get('http://example.com/', array(), $options); - $this->assertEquals(1.0, $response->protocol_version); - } - - public function testRawAccess() { - $transport = new RawTransport(); - $transport->data = - "HTTP/1.0 200 OK\r\n". - "Host: localhost\r\n\r\n". - "Test"; - - $options = array( - 'transport' => $transport - ); - $response = Requests::get('http://example.com/', array(), $options); - $this->assertEquals($transport->data, $response->raw); - } - - /** - * Headers with only \n delimiting should be treated as if they're \r\n - */ - public function testHeaderOnlyLF() { - $transport = new RawTransport(); - $transport->data = "HTTP/1.0 200 OK\r\nTest: value\nAnother-Test: value\r\n\r\n"; - - $options = array( - 'transport' => $transport - ); - $response = Requests::get('http://example.com/', array(), $options); - $this->assertEquals('value', $response->headers['test']); - $this->assertEquals('value', $response->headers['another-test']); - } - - /** - * Check that invalid protocols are not accepted - * - * We do not support HTTP/0.9. If this is really an issue for you, file a - * new issue, and update your server/proxy to support a proper protocol. - * - * @expectedException Requests_Exception - */ - public function testInvalidProtocolVersion() { - $transport = new RawTransport(); - $transport->data = "HTTP/0.9 200 OK\r\n\r\n

Test"; - - $options = array( - 'transport' => $transport - ); - $response = Requests::get('http://example.com/', array(), $options); - } - - /** - * HTTP/0.9 also appears to use a single CRLF instead of two - * - * @expectedException Requests_Exception - */ - public function testSingleCRLFSeparator() { - $transport = new RawTransport(); - $transport->data = "HTTP/0.9 200 OK\r\n

Test"; - - $options = array( - 'transport' => $transport - ); - $response = Requests::get('http://example.com/', array(), $options); - } - - /** - * @expectedException Requests_Exception - */ - public function testInvalidStatus() { - $transport = new RawTransport(); - $transport->data = "HTTP/1.1 OK\r\nTest: value\nAnother-Test: value\r\n\r\nTest"; - - $options = array( - 'transport' => $transport - ); - $response = Requests::get('http://example.com/', array(), $options); - } - - public function test30xWithoutLocation() { - $transport = new MockTransport(); - $transport->code = 302; - - $options = array( - 'transport' => $transport - ); - $response = Requests::get('http://example.com/', array(), $options); - $this->assertEquals(302, $response->status_code); - $this->assertEquals(0, $response->redirects); - } - - /** - * @expectedException Requests_Exception - */ - public function testTimeoutException() { - $options = array('timeout' => 0.5); - $response = Requests::get(httpbin('/delay/3'), array(), $options); - } -} diff --git a/vendor/rmccue/requests/tests/Response/Headers.php b/vendor/rmccue/requests/tests/Response/Headers.php deleted file mode 100644 index 7541f374a..000000000 --- a/vendor/rmccue/requests/tests/Response/Headers.php +++ /dev/null @@ -1,55 +0,0 @@ -assertEquals('text/plain', $headers['Content-Type']); - } - public function testCaseInsensitiveArrayAccess() { - $headers = new Requests_Response_Headers(); - $headers['Content-Type'] = 'text/plain'; - - $this->assertEquals('text/plain', $headers['CONTENT-TYPE']); - $this->assertEquals('text/plain', $headers['content-type']); - } - - /** - * @depends testArrayAccess - */ - public function testIteration() { - $headers = new Requests_Response_Headers(); - $headers['Content-Type'] = 'text/plain'; - $headers['Content-Length'] = 10; - - foreach ($headers as $name => $value) { - switch (strtolower($name)) { - case 'content-type': - $this->assertEquals('text/plain', $value); - break; - case 'content-length': - $this->assertEquals(10, $value); - break; - default: - throw new Exception('Invalid name: ' . $name); - } - } - } - - /** - * @expectedException Requests_Exception - */ - public function testInvalidKey() { - $headers = new Requests_Response_Headers(); - $headers[] = 'text/plain'; - } - - public function testMultipleHeaders() { - $headers = new Requests_Response_Headers(); - $headers['Accept'] = 'text/html;q=1.0'; - $headers['Accept'] = '*/*;q=0.1'; - - $this->assertEquals('text/html;q=1.0,*/*;q=0.1', $headers['Accept']); - } -} \ No newline at end of file diff --git a/vendor/rmccue/requests/tests/SSL.php b/vendor/rmccue/requests/tests/SSL.php deleted file mode 100644 index 62bb998df..000000000 --- a/vendor/rmccue/requests/tests/SSL.php +++ /dev/null @@ -1,108 +0,0 @@ -assertTrue(Requests_SSL::match_domain($base, $dnsname)); - } - - /** - * @dataProvider domainNoMatchProvider - */ - public function testNoMatch($base, $dnsname) { - $this->assertFalse(Requests_SSL::match_domain($base, $dnsname)); - } - - protected function fakeCertificate($dnsname, $with_san = true) { - $certificate = array( - 'subject' => array( - 'CN' => $dnsname - ), - ); - - if ($with_san !== false) { - // If SAN is set to true, default it to the dNSName - if ($with_san === true) { - $with_san = $dnsname; - } - $certificate['extensions'] = array( - 'subjectAltName' => 'DNS: ' . $with_san, - ); - } - - return $certificate; - } - - /** - * @dataProvider domainMatchProvider - */ - public function testMatchViaCertificate($base, $dnsname) { - $certificate = $this->fakeCertificate($dnsname); - $this->assertTrue(Requests_SSL::verify_certificate($base, $certificate)); - } - - /** - * @dataProvider domainNoMatchProvider - */ - public function testNoMatchViaCertificate($base, $dnsname) { - $certificate = $this->fakeCertificate($dnsname); - $this->assertFalse(Requests_SSL::verify_certificate($base, $certificate)); - } - - public function testCNFallback() { - $certificate = $this->fakeCertificate('example.com', false); - $this->assertTrue(Requests_SSL::verify_certificate('example.com', $certificate)); - } - - public function testInvalidCNFallback() { - $certificate = $this->fakeCertificate('example.com', false); - $this->assertFalse(Requests_SSL::verify_certificate('example.net', $certificate)); - } - - /** - * Test a certificate with both CN and SAN fields - * - * As per RFC2818, if the SAN field exists, we should parse that and ignore - * the value of the CN field. - * - * @link http://tools.ietf.org/html/rfc2818#section-3.1 - */ - public function testIgnoreCNWithSAN() { - $certificate = $this->fakeCertificate('example.net', 'example.com'); - - $this->assertTrue(Requests_SSL::verify_certificate('example.com', $certificate), 'Checking SAN validation'); - $this->assertFalse(Requests_SSL::verify_certificate('example.net', $certificate), 'Checking CN non-validation'); - } -} diff --git a/vendor/rmccue/requests/tests/Session.php b/vendor/rmccue/requests/tests/Session.php deleted file mode 100644 index 86e799127..000000000 --- a/vendor/rmccue/requests/tests/Session.php +++ /dev/null @@ -1,213 +0,0 @@ -get('/get'); - $this->assertTrue($response->success); - $this->assertEquals(httpbin('/get'), $response->url); - - $data = json_decode($response->body, true); - $this->assertNotNull($data); - $this->assertArrayHasKey('url', $data); - $this->assertEquals(httpbin('/get'), $data['url']); - } - - public function testBasicGET() { - $session_headers = array( - 'X-Requests-Session' => 'BasicGET', - 'X-Requests-Request' => 'notset', - ); - $session = new Requests_Session(httpbin('/'), $session_headers); - $response = $session->get('/get', array('X-Requests-Request' => 'GET')); - $response->throw_for_status(false); - $this->assertEquals(200, $response->status_code); - - $data = json_decode($response->body, true); - $this->assertArrayHasKey('X-Requests-Session', $data['headers']); - $this->assertEquals('BasicGET', $data['headers']['X-Requests-Session']); - $this->assertArrayHasKey('X-Requests-Request', $data['headers']); - $this->assertEquals('GET', $data['headers']['X-Requests-Request']); - } - - public function testBasicHEAD() { - $session_headers = array( - 'X-Requests-Session' => 'BasicHEAD', - 'X-Requests-Request' => 'notset', - ); - $session = new Requests_Session(httpbin('/'), $session_headers); - $response = $session->head('/get', array('X-Requests-Request' => 'HEAD')); - $response->throw_for_status(false); - $this->assertEquals(200, $response->status_code); - } - - public function testBasicDELETE() { - $session_headers = array( - 'X-Requests-Session' => 'BasicDELETE', - 'X-Requests-Request' => 'notset', - ); - $session = new Requests_Session(httpbin('/'), $session_headers); - $response = $session->delete('/delete', array('X-Requests-Request' => 'DELETE')); - $response->throw_for_status(false); - $this->assertEquals(200, $response->status_code); - - $data = json_decode($response->body, true); - $this->assertArrayHasKey('X-Requests-Session', $data['headers']); - $this->assertEquals('BasicDELETE', $data['headers']['X-Requests-Session']); - $this->assertArrayHasKey('X-Requests-Request', $data['headers']); - $this->assertEquals('DELETE', $data['headers']['X-Requests-Request']); - } - - public function testBasicPOST() { - $session_headers = array( - 'X-Requests-Session' => 'BasicPOST', - 'X-Requests-Request' => 'notset', - ); - $session = new Requests_Session(httpbin('/'), $session_headers); - $response = $session->post('/post', array('X-Requests-Request' => 'POST'), array('postdata' => 'exists')); - $response->throw_for_status(false); - $this->assertEquals(200, $response->status_code); - - $data = json_decode($response->body, true); - $this->assertArrayHasKey('X-Requests-Session', $data['headers']); - $this->assertEquals('BasicPOST', $data['headers']['X-Requests-Session']); - $this->assertArrayHasKey('X-Requests-Request', $data['headers']); - $this->assertEquals('POST', $data['headers']['X-Requests-Request']); - } - - public function testBasicPUT() { - $session_headers = array( - 'X-Requests-Session' => 'BasicPUT', - 'X-Requests-Request' => 'notset', - ); - $session = new Requests_Session(httpbin('/'), $session_headers); - $response = $session->put('/put', array('X-Requests-Request' => 'PUT'), array('postdata' => 'exists')); - $response->throw_for_status(false); - $this->assertEquals(200, $response->status_code); - - $data = json_decode($response->body, true); - $this->assertArrayHasKey('X-Requests-Session', $data['headers']); - $this->assertEquals('BasicPUT', $data['headers']['X-Requests-Session']); - $this->assertArrayHasKey('X-Requests-Request', $data['headers']); - $this->assertEquals('PUT', $data['headers']['X-Requests-Request']); - } - - public function testBasicPATCH() { - $session_headers = array( - 'X-Requests-Session' => 'BasicPATCH', - 'X-Requests-Request' => 'notset', - ); - $session = new Requests_Session(httpbin('/'), $session_headers); - $response = $session->patch('/patch', array('X-Requests-Request' => 'PATCH'), array('postdata' => 'exists')); - $response->throw_for_status(false); - $this->assertEquals(200, $response->status_code); - - $data = json_decode($response->body, true); - $this->assertArrayHasKey('X-Requests-Session', $data['headers']); - $this->assertEquals('BasicPATCH', $data['headers']['X-Requests-Session']); - $this->assertArrayHasKey('X-Requests-Request', $data['headers']); - $this->assertEquals('PATCH', $data['headers']['X-Requests-Request']); - } - - public function testMultiple() { - $session = new Requests_Session(httpbin('/'), array('X-Requests-Session' => 'Multiple')); - $requests = array( - 'test1' => array( - 'url' => httpbin('/get') - ), - 'test2' => array( - 'url' => httpbin('/get') - ), - ); - $responses = $session->request_multiple($requests); - - // test1 - $this->assertNotEmpty($responses['test1']); - $this->assertInstanceOf('Requests_Response', $responses['test1']); - $this->assertEquals(200, $responses['test1']->status_code); - - $result = json_decode($responses['test1']->body, true); - $this->assertEquals(httpbin('/get'), $result['url']); - $this->assertEmpty($result['args']); - - // test2 - $this->assertNotEmpty($responses['test2']); - $this->assertInstanceOf('Requests_Response', $responses['test2']); - $this->assertEquals(200, $responses['test2']->status_code); - - $result = json_decode($responses['test2']->body, true); - $this->assertEquals(httpbin('/get'), $result['url']); - $this->assertEmpty($result['args']); - } - - public function testPropertyUsage() { - $headers = array( - 'X-TestHeader' => 'testing', - 'X-TestHeader2' => 'requests-test' - ); - $data = array( - 'testdata' => 'value1', - 'test2' => 'value2', - 'test3' => array( - 'foo' => 'bar', - 'abc' => 'xyz' - ) - ); - $options = array( - 'testoption' => 'test', - 'foo' => 'bar' - ); - - $session = new Requests_Session('http://example.com/', $headers, $data, $options); - $this->assertEquals('http://example.com/', $session->url); - $this->assertEquals($headers, $session->headers); - $this->assertEquals($data, $session->data); - $this->assertEquals($options['testoption'], $session->options['testoption']); - - // Test via property access - $this->assertEquals($options['testoption'], $session->testoption); - - // Test setting new property - $session->newoption = 'foobar'; - $options['newoption'] = 'foobar'; - $this->assertEquals($options['newoption'], $session->options['newoption']); - - // Test unsetting property - unset($session->newoption); - $this->assertFalse(isset($session->newoption)); - - // Update property - $session->testoption = 'foobar'; - $options['testoption'] = 'foobar'; - $this->assertEquals($options['testoption'], $session->testoption); - - // Test getting invalid property - $this->assertNull($session->invalidoption); - } - - public function testSharedCookies() { - $session = new Requests_Session(httpbin('/')); - - $options = array( - 'follow_redirects' => false - ); - $response = $session->get('/cookies/set?requests-testcookie=testvalue', array(), $options); - $this->assertEquals(302, $response->status_code); - - // Check the cookies - $response = $session->get('/cookies'); - $this->assertTrue($response->success); - - // Check the response - $data = json_decode($response->body, true); - $this->assertNotNull($data); - $this->assertArrayHasKey('cookies', $data); - - $cookies = array( - 'requests-testcookie' => 'testvalue' - ); - $this->assertEquals($cookies, $data['cookies']); - } -} diff --git a/vendor/rmccue/requests/tests/Transport/Base.php b/vendor/rmccue/requests/tests/Transport/Base.php deleted file mode 100644 index 5ddce18c1..000000000 --- a/vendor/rmccue/requests/tests/Transport/Base.php +++ /dev/null @@ -1,826 +0,0 @@ -transport, 'test'); - $supported = call_user_func($callback); - - if (!$supported) { - $this->markTestSkipped($this->transport . ' is not available'); - return; - } - - $ssl_supported = call_user_func($callback, array('ssl' => true)); - if (!$ssl_supported) { - $this->skip_https = true; - } - } - protected $skip_https = false; - - protected function getOptions($other = array()) { - $options = array( - 'transport' => $this->transport - ); - $options = array_merge($options, $other); - return $options; - } - - public function testResponseByteLimit() { - $limit = 104; - $options = array( - 'max_bytes' => $limit, - ); - $response = Requests::get(httpbin('/bytes/325'), array(), $this->getOptions($options)); - $this->assertEquals($limit, strlen($response->body)); - } - - public function testResponseByteLimitWithFile() { - $limit = 300; - $options = array( - 'max_bytes' => $limit, - 'filename' => tempnam(sys_get_temp_dir(), 'RLT') // RequestsLibraryTest - ); - $response = Requests::get(httpbin('/bytes/482'), array(), $this->getOptions($options)); - $this->assertEmpty($response->body); - $this->assertEquals($limit, filesize($options['filename'])); - unlink($options['filename']); - } - - public function testSimpleGET() { - $request = Requests::get(httpbin('/get'), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(httpbin('/get'), $result['url']); - $this->assertEmpty($result['args']); - } - - public function testGETWithArgs() { - $request = Requests::get(httpbin('/get?test=true&test2=test'), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(httpbin('/get?test=true&test2=test'), $result['url']); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['args']); - } - - public function testGETWithData() { - $data = array( - 'test' => 'true', - 'test2' => 'test', - ); - $request = Requests::request(httpbin('/get'), array(), $data, Requests::GET, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(httpbin('/get?test=true&test2=test'), $result['url']); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['args']); - } - - public function testGETWithNestedData() { - $data = array( - 'test' => 'true', - 'test2' => array( - 'test3' => 'test', - 'test4' => 'test-too', - ), - ); - $request = Requests::request(httpbin('/get'), array(), $data, Requests::GET, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(httpbin('/get?test=true&test2%5Btest3%5D=test&test2%5Btest4%5D=test-too'), $result['url']); - $this->assertEquals(array('test' => 'true', 'test2[test3]' => 'test', 'test2[test4]' => 'test-too'), $result['args']); - } - - public function testGETWithDataAndQuery() { - $data = array( - 'test2' => 'test', - ); - $request = Requests::request(httpbin('/get?test=true'), array(), $data, Requests::GET, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(httpbin('/get?test=true&test2=test'), $result['url']); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['args']); - } - - public function testGETWithHeaders() { - $headers = array( - 'Requested-At' => time(), - ); - $request = Requests::get(httpbin('/get'), $headers, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals($headers['Requested-At'], $result['headers']['Requested-At']); - } - - public function testChunked() { - $request = Requests::get(httpbin('/stream/1'), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(httpbin('/stream/1'), $result['url']); - $this->assertEmpty($result['args']); - } - - public function testHEAD() { - $request = Requests::head(httpbin('/get'), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - $this->assertEquals('', $request->body); - } - - public function testTRACE() { - $request = Requests::trace(httpbin('/trace'), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - } - - public function testRawPOST() { - $data = 'test'; - $request = Requests::post(httpbin('/post'), array(), $data, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals('test', $result['data']); - } - - public function testFormPost() { - $data = 'test=true&test2=test'; - $request = Requests::post(httpbin('/post'), array(), $data, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['form']); - } - - public function testPOSTWithArray() { - $data = array( - 'test' => 'true', - 'test2' => 'test', - ); - $request = Requests::post(httpbin('/post'), array(), $data, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['form']); - } - - public function testPOSTWithNestedData() { - $data = array( - 'test' => 'true', - 'test2' => array( - 'test3' => 'test', - 'test4' => 'test-too', - ), - ); - $request = Requests::post(httpbin('/post'), array(), $data, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(array('test' => 'true', 'test2[test3]' => 'test', 'test2[test4]' => 'test-too'), $result['form']); - } - - public function testRawPUT() { - $data = 'test'; - $request = Requests::put(httpbin('/put'), array(), $data, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals('test', $result['data']); - } - - public function testFormPUT() { - $data = 'test=true&test2=test'; - $request = Requests::put(httpbin('/put'), array(), $data, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['form']); - } - - public function testPUTWithArray() { - $data = array( - 'test' => 'true', - 'test2' => 'test', - ); - $request = Requests::put(httpbin('/put'), array(), $data, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['form']); - } - - public function testRawPATCH() { - $data = 'test'; - $request = Requests::patch(httpbin('/patch'), array(), $data, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals('test', $result['data']); - } - - public function testFormPATCH() { - $data = 'test=true&test2=test'; - $request = Requests::patch(httpbin('/patch'), array(), $data, $this->getOptions()); - $this->assertEquals(200, $request->status_code, $request->body); - - $result = json_decode($request->body, true); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['form']); - } - - public function testPATCHWithArray() { - $data = array( - 'test' => 'true', - 'test2' => 'test', - ); - $request = Requests::patch(httpbin('/patch'), array(), $data, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['form']); - } - - public function testOPTIONS() { - $request = Requests::options(httpbin('/options'), array(), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - } - - public function testDELETE() { - $request = Requests::delete(httpbin('/delete'), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(httpbin('/delete'), $result['url']); - $this->assertEmpty($result['args']); - } - - public function testDELETEWithData() { - $data = array( - 'test' => 'true', - 'test2' => 'test', - ); - $request = Requests::request(httpbin('/delete'), array(), $data, Requests::DELETE, $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(httpbin('/delete?test=true&test2=test'), $result['url']); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['args']); - } - - public function testLOCK() { - $request = Requests::request(httpbin('/lock'), array(), array(), 'LOCK', $this->getOptions()); - $this->assertEquals(200, $request->status_code); - } - - public function testLOCKWithData() { - $data = array( - 'test' => 'true', - 'test2' => 'test', - ); - $request = Requests::request(httpbin('/lock'), array(), $data, 'LOCK', $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['form']); - } - - public function testRedirects() { - $request = Requests::get(httpbin('/redirect/6'), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $this->assertEquals(6, $request->redirects); - } - - public function testRelativeRedirects() { - $request = Requests::get(httpbin('/relative-redirect/6'), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $this->assertEquals(6, $request->redirects); - } - - /** - * @expectedException Requests_Exception - * @todo This should also check that the type is "toomanyredirects" - */ - public function testTooManyRedirects() { - $options = array( - 'redirects' => 10, // default, but force just in case - ); - $request = Requests::get(httpbin('/redirect/11'), array(), $this->getOptions($options)); - } - - public static function statusCodeSuccessProvider() { - return array( - array(200, true), - array(201, true), - array(202, true), - array(203, true), - array(204, true), - array(205, true), - array(206, true), - array(300, false), - array(301, false), - array(302, false), - array(303, false), - array(304, false), - array(305, false), - array(306, false), - array(307, false), - array(400, false), - array(401, false), - array(402, false), - array(403, false), - array(404, false), - array(405, false), - array(406, false), - array(407, false), - array(408, false), - array(409, false), - array(410, false), - array(411, false), - array(412, false), - array(413, false), - array(414, false), - array(415, false), - array(416, false), - array(417, false), - array(418, false), // RFC 2324 - array(428, false), // RFC 6585 - array(429, false), // RFC 6585 - array(431, false), // RFC 6585 - array(500, false), - array(501, false), - array(502, false), - array(503, false), - array(504, false), - array(505, false), - array(511, false), // RFC 6585 - ); - } - - /** - * @dataProvider statusCodeSuccessProvider - */ - public function testStatusCode($code, $success) { - $transport = new MockTransport(); - $transport->code = $code; - - $url = sprintf(httpbin('/status/%d'), $code); - - $options = array( - 'follow_redirects' => false, - 'transport' => $transport, - ); - $request = Requests::get($url, array(), $options); - $this->assertEquals($code, $request->status_code); - $this->assertEquals($success, $request->success); - } - - /** - * @dataProvider statusCodeSuccessProvider - */ - public function testStatusCodeThrow($code, $success) { - $transport = new MockTransport(); - $transport->code = $code; - - $url = sprintf(httpbin('/status/%d'), $code); - $options = array( - 'follow_redirects' => false, - 'transport' => $transport, - ); - - if (!$success) { - if ($code >= 400) { - $this->setExpectedException('Requests_Exception_HTTP_' . $code, '', $code); - } - elseif ($code >= 300 && $code < 400) { - $this->setExpectedException('Requests_Exception'); - } - } - $request = Requests::get($url, array(), $options); - $request->throw_for_status(false); - } - - /** - * @dataProvider statusCodeSuccessProvider - */ - public function testStatusCodeThrowAllowRedirects($code, $success) { - $transport = new MockTransport(); - $transport->code = $code; - - $url = sprintf(httpbin('/status/%d'), $code); - $options = array( - 'follow_redirects' => false, - 'transport' => $transport, - ); - - if (!$success) { - if ($code >= 400 || $code === 304 || $code === 305 || $code === 306) { - $this->setExpectedException('Requests_Exception_HTTP_' . $code, '', $code); - } - } - $request = Requests::get($url, array(), $options); - $request->throw_for_status(true); - } - - public function testStatusCodeUnknown(){ - $transport = new MockTransport(); - $transport->code = 599; - - $options = array( - 'transport' => $transport, - ); - - $request = Requests::get(httpbin('/status/599'), array(), $options); - $this->assertEquals(599, $request->status_code); - $this->assertEquals(false, $request->success); - } - - /** - * @expectedException Requests_Exception_HTTP_Unknown - */ - public function testStatusCodeThrowUnknown(){ - $transport = new MockTransport(); - $transport->code = 599; - - $options = array( - 'transport' => $transport, - ); - - $request = Requests::get(httpbin('/status/599'), array(), $options); - $request->throw_for_status(true); - } - - public function testGzipped() { - $request = Requests::get(httpbin('/gzip'), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body); - $this->assertEquals(true, $result->gzipped); - } - - public function testStreamToFile() { - $options = array( - 'filename' => tempnam(sys_get_temp_dir(), 'RLT') // RequestsLibraryTest - ); - $request = Requests::get(httpbin('/get'), array(), $this->getOptions($options)); - $this->assertEquals(200, $request->status_code); - $this->assertEmpty($request->body); - - $contents = file_get_contents($options['filename']); - $result = json_decode($contents, true); - $this->assertEquals(httpbin('/get'), $result['url']); - $this->assertEmpty($result['args']); - - unlink($options['filename']); - } - - public function testNonblocking() { - $options = array( - 'blocking' => false - ); - $request = Requests::get(httpbin('/get'), array(), $this->getOptions($options)); - $empty = new Requests_Response(); - $this->assertEquals($empty, $request); - } - - /** - * @expectedException Requests_Exception - */ - public function testBadIP() { - $request = Requests::get('http://256.256.256.0/', array(), $this->getOptions()); - } - - public function testHTTPS() { - if ($this->skip_https) { - $this->markTestSkipped('SSL support is not available.'); - return; - } - - $request = Requests::get(httpbin('/get', true), array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - // Disable, since httpbin always returns http - // $this->assertEquals(httpbin('/get', true), $result['url']); - $this->assertEmpty($result['args']); - } - - /** - * @expectedException Requests_Exception - */ - public function testExpiredHTTPS() { - if ($this->skip_https) { - $this->markTestSkipped('SSL support is not available.'); - return; - } - - $request = Requests::get('https://testssl-expire.disig.sk/index.en.html', array(), $this->getOptions()); - } - - /** - * @expectedException Requests_Exception - */ - public function testRevokedHTTPS() { - if ($this->skip_https) { - $this->markTestSkipped('SSL support is not available.'); - return; - } - - $request = Requests::get('https://testssl-revoked.disig.sk/index.en.html', array(), $this->getOptions()); - } - - /** - * Test that SSL fails with a bad certificate - * - * @expectedException Requests_Exception - */ - public function testBadDomain() { - if ($this->skip_https) { - $this->markTestSkipped('SSL support is not available.'); - return; - } - - $request = Requests::head('https://wrong.host.badssl.com/', array(), $this->getOptions()); - } - - /** - * Test that the transport supports Server Name Indication with HTTPS - * - * badssl.com is used for SSL testing, and the common name is set to - * `*.badssl.com` as such. Without alternate name support, this will fail - * as `badssl.com` is only in the alternate name - */ - public function testAlternateNameSupport() { - if ($this->skip_https) { - $this->markTestSkipped('SSL support is not available.'); - return; - } - - $request = Requests::head('https://badssl.com/', array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - } - - /** - * Test that the transport supports Server Name Indication with HTTPS - * - * feelingrestful.com (owned by hmn.md and used with permission) points to - * CloudFlare, and will fail if SNI isn't sent. - */ - public function testSNISupport() { - if ($this->skip_https) { - $this->markTestSkipped('SSL support is not available.'); - return; - } - - $request = Requests::head('https://feelingrestful.com/', array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - } - - /** - * @expectedException Requests_Exception - */ - public function testTimeout() { - $options = array( - 'timeout' => 1, - ); - $request = Requests::get(httpbin('/delay/10'), array(), $this->getOptions($options)); - var_dump($request); - } - - public function testMultiple() { - $requests = array( - 'test1' => array( - 'url' => httpbin('/get') - ), - 'test2' => array( - 'url' => httpbin('/get') - ), - ); - $responses = Requests::request_multiple($requests, $this->getOptions()); - - // test1 - $this->assertNotEmpty($responses['test1']); - $this->assertInstanceOf('Requests_Response', $responses['test1']); - $this->assertEquals(200, $responses['test1']->status_code); - - $result = json_decode($responses['test1']->body, true); - $this->assertEquals(httpbin('/get'), $result['url']); - $this->assertEmpty($result['args']); - - // test2 - $this->assertNotEmpty($responses['test2']); - $this->assertInstanceOf('Requests_Response', $responses['test2']); - $this->assertEquals(200, $responses['test2']->status_code); - - $result = json_decode($responses['test2']->body, true); - $this->assertEquals(httpbin('/get'), $result['url']); - $this->assertEmpty($result['args']); - } - - public function testMultipleWithDifferingMethods() { - $requests = array( - 'get' => array( - 'url' => httpbin('/get'), - ), - 'post' => array( - 'url' => httpbin('/post'), - 'type' => Requests::POST, - 'data' => 'test', - ), - ); - $responses = Requests::request_multiple($requests, $this->getOptions()); - - // get - $this->assertEquals(200, $responses['get']->status_code); - - // post - $this->assertEquals(200, $responses['post']->status_code); - $result = json_decode($responses['post']->body, true); - $this->assertEquals('test', $result['data']); - } - - /** - * @depends testTimeout - */ - public function testMultipleWithFailure() { - $requests = array( - 'success' => array( - 'url' => httpbin('/get'), - ), - 'timeout' => array( - 'url' => httpbin('/delay/10'), - 'options' => array( - 'timeout' => 1, - ), - ), - ); - $responses = Requests::request_multiple($requests, $this->getOptions()); - $this->assertEquals(200, $responses['success']->status_code); - $this->assertInstanceOf('Requests_Exception', $responses['timeout']); - } - - public function testMultipleUsingCallback() { - $requests = array( - 'get' => array( - 'url' => httpbin('/get'), - ), - 'post' => array( - 'url' => httpbin('/post'), - 'type' => Requests::POST, - 'data' => 'test', - ), - ); - $this->completed = array(); - $options = array( - 'complete' => array($this, 'completeCallback'), - ); - $responses = Requests::request_multiple($requests, $this->getOptions($options)); - - $this->assertEquals($this->completed, $responses); - $this->completed = array(); - } - - public function testMultipleUsingCallbackAndFailure() { - $requests = array( - 'success' => array( - 'url' => httpbin('/get'), - ), - 'timeout' => array( - 'url' => httpbin('/delay/10'), - 'options' => array( - 'timeout' => 1, - ), - ), - ); - $this->completed = array(); - $options = array( - 'complete' => array($this, 'completeCallback'), - ); - $responses = Requests::request_multiple($requests, $this->getOptions($options)); - - $this->assertEquals($this->completed, $responses); - $this->completed = array(); - } - - public function completeCallback($response, $key) { - $this->completed[$key] = $response; - } - - public function testMultipleToFile() { - $requests = array( - 'get' => array( - 'url' => httpbin('/get'), - 'options' => array( - 'filename' => tempnam(sys_get_temp_dir(), 'RLT') // RequestsLibraryTest - ), - ), - 'post' => array( - 'url' => httpbin('/post'), - 'type' => Requests::POST, - 'data' => 'test', - 'options' => array( - 'filename' => tempnam(sys_get_temp_dir(), 'RLT') // RequestsLibraryTest - ), - ), - ); - $responses = Requests::request_multiple($requests, $this->getOptions()); - - // GET request - $contents = file_get_contents($requests['get']['options']['filename']); - $result = json_decode($contents, true); - $this->assertEquals(httpbin('/get'), $result['url']); - $this->assertEmpty($result['args']); - unlink($requests['get']['options']['filename']); - - // POST request - $contents = file_get_contents($requests['post']['options']['filename']); - $result = json_decode($contents, true); - $this->assertEquals(httpbin('/post'), $result['url']); - $this->assertEquals('test', $result['data']); - unlink($requests['post']['options']['filename']); - } - - public function testAlternatePort() { - $request = Requests::get('http://portquiz.net:8080/', array(), $this->getOptions()); - $this->assertEquals(200, $request->status_code); - $num = preg_match('#You have reached this page on port (\d+)#i', $request->body, $matches); - $this->assertEquals(1, $num, 'Response should contain the port number'); - $this->assertEquals(8080, $matches[1]); - } - - public function testProgressCallback() { - $mock = $this->getMockBuilder('stdClass')->setMethods(array('progress'))->getMock(); - $mock->expects($this->atLeastOnce())->method('progress'); - $hooks = new Requests_Hooks(); - $hooks->register('request.progress', array($mock, 'progress')); - $options = array( - 'hooks' => $hooks, - ); - $options = $this->getOptions($options); - - $response = Requests::get(httpbin('/get'), array(), $options); - } - - public function testAfterRequestCallback() { - $mock = $this->getMockBuilder('stdClass') - ->setMethods(array('after_request')) - ->getMock(); - - $mock->expects($this->atLeastOnce()) - ->method('after_request') - ->with( - $this->isType('string'), - $this->logicalAnd($this->isType('array'), $this->logicalNot($this->isEmpty())) - ); - $hooks = new Requests_Hooks(); - $hooks->register('curl.after_request', array($mock, 'after_request')); - $hooks->register('fsockopen.after_request', array($mock, 'after_request')); - $options = array( - 'hooks' => $hooks, - ); - $options = $this->getOptions($options); - - $response = Requests::get(httpbin('/get'), array(), $options); - } - - public function testReusableTransport() { - $options = $this->getOptions(array('transport' => new $this->transport())); - - $request1 = Requests::get(httpbin('/get'), array(), $options); - $request2 = Requests::get(httpbin('/get'), array(), $options); - - $this->assertEquals(200, $request1->status_code); - $this->assertEquals(200, $request2->status_code); - - $result1 = json_decode($request1->body, true); - $result2 = json_decode($request2->body, true); - - $this->assertEquals(httpbin('/get'), $result1['url']); - $this->assertEquals(httpbin('/get'), $result2['url']); - - $this->assertEmpty($result1['args']); - $this->assertEmpty($result2['args']); - } - - public function testQueryDataFormat() { - $data = array('test' => 'true', 'test2' => 'test'); - $request = Requests::post(httpbin('/post'), array(), $data, $this->getOptions(array('data_format' => 'query'))); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(httpbin('/post').'?test=true&test2=test', $result['url']); - $this->assertEquals('', $result['data']); - } - - public function testBodyDataFormat() { - $data = array('test' => 'true', 'test2' => 'test'); - $request = Requests::post(httpbin('/post'), array(), $data, $this->getOptions(array('data_format' => 'body'))); - $this->assertEquals(200, $request->status_code); - - $result = json_decode($request->body, true); - $this->assertEquals(httpbin('/post'), $result['url']); - $this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['form']); - } -} diff --git a/vendor/rmccue/requests/tests/Transport/cURL.php b/vendor/rmccue/requests/tests/Transport/cURL.php deleted file mode 100644 index 55390adc2..000000000 --- a/vendor/rmccue/requests/tests/Transport/cURL.php +++ /dev/null @@ -1,5 +0,0 @@ - '100 Continue', - 101 => '101 Switching Protocols', - 200 => '200 OK', - 201 => '201 Created', - 202 => '202 Accepted', - 203 => '203 Non-Authoritative Information', - 204 => '204 No Content', - 205 => '205 Reset Content', - 206 => '206 Partial Content', - 300 => '300 Multiple Choices', - 301 => '301 Moved Permanently', - 302 => '302 Found', - 303 => '303 See Other', - 304 => '304 Not Modified', - 305 => '305 Use Proxy', - 306 => '306 (Unused)', - 307 => '307 Temporary Redirect', - 400 => '400 Bad Request', - 401 => '401 Unauthorized', - 402 => '402 Payment Required', - 403 => '403 Forbidden', - 404 => '404 Not Found', - 405 => '405 Method Not Allowed', - 406 => '406 Not Acceptable', - 407 => '407 Proxy Authentication Required', - 408 => '408 Request Timeout', - 409 => '409 Conflict', - 410 => '410 Gone', - 411 => '411 Length Required', - 412 => '412 Precondition Failed', - 413 => '413 Request Entity Too Large', - 414 => '414 Request-URI Too Long', - 415 => '415 Unsupported Media Type', - 416 => '416 Requested Range Not Satisfiable', - 417 => '417 Expectation Failed', - 418 => '418 I\'m a teapot', - 428 => '428 Precondition Required', - 429 => '429 Too Many Requests', - 431 => '431 Request Header Fields Too Large', - 500 => '500 Internal Server Error', - 501 => '501 Not Implemented', - 502 => '502 Bad Gateway', - 503 => '503 Service Unavailable', - 504 => '504 Gateway Timeout', - 505 => '505 HTTP Version Not Supported', - 511 => '511 Network Authentication Required', - ); - - public function request($url, $headers = array(), $data = array(), $options = array()) { - $status = isset(self::$messages[$this->code]) ? self::$messages[$this->code] : $this->code . ' unknown'; - $response = "HTTP/1.0 $status\r\n"; - $response .= "Content-Type: text/plain\r\n"; - if ($this->chunked) { - $response .= "Transfer-Encoding: chunked\r\n"; - } - $response .= $this->raw_headers; - $response .= "Connection: close\r\n\r\n"; - $response .= $this->body; - return $response; - } - - public function request_multiple($requests, $options) { - $responses = array(); - foreach ($requests as $id => $request) { - $handler = new MockTransport(); - $handler->code = $request['options']['mock.code']; - $handler->chunked = $request['options']['mock.chunked']; - $handler->body = $request['options']['mock.body']; - $handler->raw_headers = $request['options']['mock.raw_headers']; - $responses[$id] = $handler->request($request['url'], $request['headers'], $request['data'], $request['options']); - - if (!empty($options['mock.parse'])) { - $request['options']['hooks']->dispatch('transport.internal.parse_response', array(&$responses[$id], $request)); - $request['options']['hooks']->dispatch('multiple.request.complete', array(&$responses[$id], $id)); - } - } - - return $responses; - } - - public static function test() { - return true; - } -} - -class RawTransport implements Requests_Transport { - public $data = ''; - public function request($url, $headers = array(), $data = array(), $options = array()) { - return $this->data; - } - public function request_multiple($requests, $options) { - foreach ($requests as $id => &$request) { - $handler = new RawTransport(); - $handler->data = $request['options']['raw.data']; - $request = $handler->request($request['url'], $request['headers'], $request['data'], $request['options']); - } - - return $requests; - } - public static function test() { - return true; - } -} diff --git a/vendor/rmccue/requests/tests/phpunit.xml.dist b/vendor/rmccue/requests/tests/phpunit.xml.dist deleted file mode 100644 index 64e0b8260..000000000 --- a/vendor/rmccue/requests/tests/phpunit.xml.dist +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Auth - - - Transport - - - Proxy - - - ChunkedEncoding.php - Cookies.php - IDNAEncoder.php - IRI.php - Requests.php - Response/Headers.php - Session.php - SSL.php - - - - - - - - - - . - - - ../library - - - \ No newline at end of file diff --git a/vendor/rmccue/requests/tests/utils/proxy/proxy.py b/vendor/rmccue/requests/tests/utils/proxy/proxy.py deleted file mode 100755 index 4f252388c..000000000 --- a/vendor/rmccue/requests/tests/utils/proxy/proxy.py +++ /dev/null @@ -1,5 +0,0 @@ -def request(context, flow): - flow.request.headers["x-requests-proxy"] = "http" - -def response(context, flow): - flow.response.headers[b"x-requests-proxied"] = "http" \ No newline at end of file diff --git a/vendor/rmccue/requests/tests/utils/proxy/start.sh b/vendor/rmccue/requests/tests/utils/proxy/start.sh deleted file mode 100755 index 4e7edeca6..000000000 --- a/vendor/rmccue/requests/tests/utils/proxy/start.sh +++ /dev/null @@ -1,11 +0,0 @@ -PROXYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -PORT=${PORT:-9000} - -PROXYBIN=${PROXYBIN:-"$(which mitmdump)"} -ARGS="-s '$PROXYDIR/proxy.py' -p $PORT" -if [[ ! -z "$AUTH" ]]; then - ARGS="$ARGS --singleuser=$AUTH" -fi -PIDFILE="$PROXYDIR/proxy.pid" - -start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --exec $PROXYBIN -- $ARGS diff --git a/vendor/rmccue/requests/tests/utils/proxy/stop.sh b/vendor/rmccue/requests/tests/utils/proxy/stop.sh deleted file mode 100755 index 9854d04f5..000000000 --- a/vendor/rmccue/requests/tests/utils/proxy/stop.sh +++ /dev/null @@ -1,5 +0,0 @@ -PROXYDIR="$PWD/$(dirname $0)" - -PIDFILE="$PROXYDIR/proxy.pid" - -start-stop-daemon --stop --pidfile $PIDFILE --make-pidfile && rm $PROXYDIR/proxy.pid diff --git a/vendor/swiftmailer/swiftmailer/CHANGES b/vendor/swiftmailer/swiftmailer/CHANGES index 6de2ff08c..5a3e48a20 100644 --- a/vendor/swiftmailer/swiftmailer/CHANGES +++ b/vendor/swiftmailer/swiftmailer/CHANGES @@ -1,6 +1,24 @@ Changelog ========= +6.2.7 (2021-03-09) +------------------ + + * Allow egulias/email-validator 3.1+ + +6.2.6 (2021-03-05) +------------------ + + * Fix Bcc support + +6.2.5 (2021-01-12) +------------------ + + * Don't trust properties at destruct time + * Remove invalid PHPDocs param in EventDispatcher interface + * Bump license year + * Removes PHP version from README + 6.2.4 (2020-12-08) ------------------ diff --git a/vendor/swiftmailer/swiftmailer/LICENSE b/vendor/swiftmailer/swiftmailer/LICENSE index ccfbbd88d..ab720772e 100644 --- a/vendor/swiftmailer/swiftmailer/LICENSE +++ b/vendor/swiftmailer/swiftmailer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2020 Fabien Potencier +Copyright (c) 2013-2021 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/swiftmailer/swiftmailer/README.md b/vendor/swiftmailer/swiftmailer/README.md index e718bc685..0e1fb4ce2 100644 --- a/vendor/swiftmailer/swiftmailer/README.md +++ b/vendor/swiftmailer/swiftmailer/README.md @@ -1,7 +1,7 @@ Swift Mailer ------------ -Swift Mailer is a component based mailing solution for PHP 7. +Swift Mailer is a component based mailing solution for PHP. It is released under the MIT license. Swift Mailer is highly object-oriented by design and lends itself diff --git a/vendor/swiftmailer/swiftmailer/composer.json b/vendor/swiftmailer/swiftmailer/composer.json index d66dc4ce2..31d05fd68 100644 --- a/vendor/swiftmailer/swiftmailer/composer.json +++ b/vendor/swiftmailer/swiftmailer/composer.json @@ -16,7 +16,7 @@ ], "require": { "php": ">=7.0.0", - "egulias/email-validator": "^2.0", + "egulias/email-validator": "^2.0|^3.1", "symfony/polyfill-iconv": "^1.0", "symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-intl-idn": "^1.10" diff --git a/vendor/swiftmailer/swiftmailer/doc/sending.rst b/vendor/swiftmailer/swiftmailer/doc/sending.rst index 010420797..d3a10ad21 100644 --- a/vendor/swiftmailer/swiftmailer/doc/sending.rst +++ b/vendor/swiftmailer/swiftmailer/doc/sending.rst @@ -95,7 +95,8 @@ within your application and adjust the settings accordingly if the code is moved or if the SMTP server is changed. Some SMTP servers -- Google for example -- use encryption for security reasons. -Swift Mailer supports using both SSL and TLS encryption settings. +Swift Mailer supports using both ``ssl`` (SMTPS = SMTP over TLS) and ``tls`` +(SMTP with STARTTLS) encryption settings. Using the SMTP Transport ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -129,11 +130,14 @@ A connection to the SMTP server will be established upon the first call to Encrypted SMTP ^^^^^^^^^^^^^^ -You can use SSL or TLS encryption with the SMTP Transport by specifying it as a -parameter or with a method call:: +You can use ``ssl`` (SMTPS) or ``tls`` (STARTTLS) encryption with the SMTP Transport +by specifying it as a parameter or with a method call:: // Create the Transport + // Option #1: SMTPS = SMTP over TLS (always encrypted): $transport = new Swift_SmtpTransport('smtp.example.org', 587, 'ssl'); + // Option #2: SMTP with STARTTLS (best effort encryption): + $transport = new Swift_SmtpTransport('smtp.example.org', 587, 'tls'); // Create the Mailer using your created Transport $mailer = new Swift_Mailer($transport); @@ -143,8 +147,7 @@ A connection to the SMTP server will be established upon the first call to settings. .. note:: - - For SSL or TLS encryption to work your PHP installation must have + For SMTPS or STARTTLS encryption to work your PHP installation must have appropriate OpenSSL transports wrappers. You can check if "tls" and/or "ssl" are present in your PHP installation by using the PHP function ``stream_get_transports()``. @@ -153,6 +156,14 @@ settings. If you are using Mailcatcher_, make sure you do not set the encryption for the ``Swift_SmtpTransport``, since Mailcatcher does not support encryption. +.. note:: + When in doubt, try ``ssl`` first for higher security, since the communication + is always encrypted. + +.. note:: + Usually, port 587 or 465 is used for encrypted SMTP. Check the documentation + of your mail provider. + SMTP with a Username and Password ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php index 1de679623..ffe5a4885 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php @@ -15,7 +15,7 @@ */ abstract class Swift { - const VERSION = '6.2.4'; + const VERSION = '6.2.7'; public static $initialized = false; public static $inits = []; diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php index 2d00b6a0f..0dc61909d 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php @@ -39,4 +39,14 @@ class Swift_ByteStream_TemporaryFileByteStream extends Swift_ByteStream_FileByte @unlink($this->getPath()); } } + + public function __sleep() + { + throw new \BadMethodCallException('Cannot serialize '.__CLASS__); + } + + public function __wakeup() + { + throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); + } } diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php index c57222f24..df25a1248 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php @@ -18,8 +18,6 @@ interface Swift_Events_EventDispatcher /** * Create a new SendEvent for $source and $message. * - * @param Swift_Mime_SimpleMessage - * * @return Swift_Events_SendEvent */ public function createSendEvent(Swift_Transport $source, Swift_Mime_SimpleMessage $message); diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php index 7f2962c10..33b6367cb 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php @@ -286,4 +286,9 @@ class Swift_KeyCache_DiskKeyCache implements Swift_KeyCache $this->clearAll($nsKey); } } + + public function __wakeup() + { + $this->keys = []; + } } diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php deleted file mode 100644 index 18556989a..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php +++ /dev/null @@ -1,47 +0,0 @@ -createDependenciesFor('transport.mail') - ); - - $this->setExtraParams($extraParams); - } - - /** - * Create a new MailTransport instance. - * - * @param string $extraParams To be passed to mail() - * - * @return self - */ - public static function newInstance($extraParams = '-f%s') - { - return new self($extraParams); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NullContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NullContentEncoder.php index e23507337..6539de77b 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NullContentEncoder.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NullContentEncoder.php @@ -21,7 +21,7 @@ class Swift_Mime_ContentEncoder_NullContentEncoder implements Swift_Mime_Content * * @var string */ - private $_name; + private $name; /** * Creates a new NullContentEncoder with $name (probably 7bit or 8bit). @@ -30,7 +30,7 @@ class Swift_Mime_ContentEncoder_NullContentEncoder implements Swift_Mime_Content */ public function __construct($name) { - $this->_name = $name; + $this->name = $name; } /** @@ -67,7 +67,7 @@ class Swift_Mime_ContentEncoder_NullContentEncoder implements Swift_Mime_Content */ public function getName() { - return $this->_name; + return $this->name; } /** diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php index dcea0c9cc..4fcdff418 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php @@ -9,6 +9,7 @@ */ use Egulias\EmailValidator\EmailValidator; +use Egulias\EmailValidator\Validation\MessageIDValidation; use Egulias\EmailValidator\Validation\RFCValidation; /** @@ -179,7 +180,9 @@ class Swift_Mime_Headers_IdentificationHeader extends Swift_Mime_Headers_Abstrac */ private function assertValidId($id) { - if (!$this->emailValidator->isValid($id, new RFCValidation())) { + $emailValidation = class_exists(MessageIDValidation::class) ? new MessageIDValidation() : new RFCValidation(); + + if (!$this->emailValidator->isValid($id, $emailValidation)) { throw new Swift_RfcComplianceException('Invalid ID given <'.$id.'>'); } } diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php index d55cf66a7..3eed5517f 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php @@ -177,7 +177,7 @@ class Swift_Mime_SimpleHeaderSet implements Swift_Mime_CharsetObserver * @param string $name * @param int $index * - * @return Swift_Mime_Header + * @return Swift_Mime_Header|null */ public function get($name, $index = 0) { diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php index 6ee4b7e43..fa18aa8da 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php @@ -817,4 +817,10 @@ class Swift_Mime_SimpleMimeEntity implements Swift_Mime_CharsetObserver, Swift_M } $this->setChildren($children); } + + public function __wakeup() + { + $this->cacheKey = bin2hex(random_bytes(16)); // set 32 hex values + $this->cache = new Swift_KeyCache_ArrayKeyCache(new Swift_KeyCache_SimpleKeyCacheInputStream()); + } } diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php index 726b468eb..ff4d7faae 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php @@ -25,7 +25,10 @@ class Swift_SmtpTransport extends Swift_Transport_EsmtpTransport /** * @param string $host * @param int $port - * @param string $encryption + * @param string|null $encryption SMTP encryption mode: + * - null for plain SMTP (no encryption), + * - 'tls' for SMTP with STARTTLS (best effort encryption), + * - 'ssl' for SMTPS = SMTP over TLS (always encrypted). */ public function __construct($host = 'localhost', $port = 25, $encryption = null) { diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php index 82b86e482..d2dbd7a66 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php @@ -197,14 +197,13 @@ abstract class Swift_Transport_AbstractSmtpTransport implements Swift_Transport $to = (array) $message->getTo(); $cc = (array) $message->getCc(); - $tos = array_merge($to, $cc); $bcc = (array) $message->getBcc(); + $tos = array_merge($to, $cc, $bcc); $message->setBcc([]); try { $sent += $this->sendTo($message, $reversePath, $tos, $failedRecipients); - $sent += $this->sendBcc($message, $reversePath, $bcc, $failedRecipients); } finally { $message->setBcc($bcc); } @@ -519,20 +518,6 @@ abstract class Swift_Transport_AbstractSmtpTransport implements Swift_Transport $failedRecipients); } - /** Send a message to all Bcc: recipients */ - private function sendBcc(Swift_Mime_SimpleMessage $message, $reversePath, array $bcc, array &$failedRecipients) - { - $sent = 0; - foreach ($bcc as $forwardPath => $name) { - $message->setBcc([$forwardPath => $name]); - $sent += $this->doMailTransaction( - $message, $reversePath, [$forwardPath], $failedRecipients - ); - } - - return $sent; - } - /** * Destructor. */ @@ -543,4 +528,14 @@ abstract class Swift_Transport_AbstractSmtpTransport implements Swift_Transport } catch (Exception $e) { } } + + public function __sleep() + { + throw new \BadMethodCallException('Cannot serialize '.__CLASS__); + } + + public function __wakeup() + { + throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); + } } diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php deleted file mode 100644 index 55e932384..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php +++ /dev/null @@ -1,294 +0,0 @@ -_extraParams = $params; - - return $this; - } - - /** - * Get the additional parameters used on the mail() function. - * - * This string is formatted for sprintf() where %s is the sender address. - * - * @return string - */ - public function getExtraParams() - { - return $this->_extraParams; - } - - /** - * Send the given Message. - * - * Recipient/sender data will be retrieved from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * - * @param Swift_Mime_Message $message - * @param string[] $failedRecipients An array of failures by-reference - * - * @return int - */ - public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) - { - $failedRecipients = (array) $failedRecipients; - - $count = ( - count((array) $message->getTo()) - + count((array) $message->getCc()) - + count((array) $message->getBcc()) - ); - - $toHeader = $message->getHeaders()->get('To'); - $subjectHeader = $message->getHeaders()->get('Subject'); - - if (0 === $count) { - $this->_throwException(new Swift_TransportException('Cannot send message without a recipient')); - } - $to = $toHeader ? $toHeader->getFieldBody() : ''; - $subject = $subjectHeader ? $subjectHeader->getFieldBody() : ''; - - $reversePath = $this->_getReversePath($message); - - // Remove headers that would otherwise be duplicated - $message->getHeaders()->remove('To'); - $message->getHeaders()->remove('Subject'); - - $messageStr = $message->toString(); - - if ($toHeader) { - $message->getHeaders()->set($toHeader); - } - $message->getHeaders()->set($subjectHeader); - - // Separate headers from body - if (false !== $endHeaders = strpos($messageStr, "\r\n\r\n")) { - $headers = substr($messageStr, 0, $endHeaders)."\r\n"; //Keep last EOL - $body = substr($messageStr, $endHeaders + 4); - } else { - $headers = $messageStr."\r\n"; - $body = ''; - } - - unset($messageStr); - - if ("\r\n" != PHP_EOL) { - // Non-windows (not using SMTP) - $headers = str_replace("\r\n", PHP_EOL, $headers); - $subject = str_replace("\r\n", PHP_EOL, $subject); - $body = str_replace("\r\n", PHP_EOL, $body); - $to = str_replace("\r\n", PHP_EOL, $to); - } else { - // Windows, using SMTP - $headers = str_replace("\r\n.", "\r\n..", $headers); - $subject = str_replace("\r\n.", "\r\n..", $subject); - $body = str_replace("\r\n.", "\r\n..", $body); - $to = str_replace("\r\n.", "\r\n..", $to); - } - - if ($this->mail($to, $subject, $body, $headers, $this->_formatExtraParams($this->_extraParams, $reversePath))) { - if ($evt) { - $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); - $evt->setFailedRecipients($failedRecipients); - } - } else { - $failedRecipients = array_merge( - $failedRecipients, - array_keys((array) $message->getTo()), - array_keys((array) $message->getCc()), - array_keys((array) $message->getBcc()) - ); - - if ($evt) { - $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); - $evt->setFailedRecipients($failedRecipients); - } - - $message->generateId(); - - $count = 0; - } - - return $count; - } - - /** - * Register a plugin. - * - * @param Swift_Events_EventListener $plugin - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - - } - - /** Throw a TransportException, first sending it to any listeners */ - protected function _throwException(Swift_TransportException $e) - { - throw $e; - } - - /** - * Send mail via the mail() function. - * - * This method takes the same arguments as PHP mail(). - * - * @param string $to - * @param string $subject - * @param string $body - * @param string $headers - * @param string $extraParams - * - * @return bool - */ - public function mail($to, $subject, $body, $headers = null, $extraParams = null) - { - return @mail($to, $subject, $body, $headers, $extraParams); - } - - /** Determine the best-use reverse path for this message */ - private function _getReversePath(Swift_Mime_SimpleMessage $message) - { - $return = $message->getReturnPath(); - $sender = $message->getSender(); - $from = $message->getFrom(); - $path = null; - if (!empty($return)) { - $path = $return; - } elseif (!empty($sender)) { - $keys = array_keys($sender); - $path = array_shift($keys); - } elseif (!empty($from)) { - $keys = array_keys($from); - $path = array_shift($keys); - } - - return $path; - } - - /** - * Fix CVE-2016-10074 by disallowing potentially unsafe shell characters. - * - * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. - * - * @param string $string The string to be validated - * - * @return bool - */ - private function _isShellSafe($string) - { - // Future-proof - if (escapeshellcmd($string) !== $string || !in_array(escapeshellarg($string), array("'$string'", "\"$string\""))) { - return false; - } - - $length = strlen($string); - for ($i = 0; $i < $length; ++$i) { - $c = $string[$i]; - // All other characters have a special meaning in at least one common shell, including = and +. - // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. - // Note that this does permit non-Latin alphanumeric characters based on the current locale. - if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { - return false; - } - } - - return true; - } - - /** - * Return php mail extra params to use for invoker->mail. - * - * @param $extraParams - * @param $reversePath - * - * @return string|null - */ - private function _formatExtraParams($extraParams, $reversePath) - { - if (false !== strpos($extraParams, '-f%s')) { - if (empty($reversePath) || false === $this->_isShellSafe($reversePath)) { - $extraParams = str_replace('-f%s', '', $extraParams); - } else { - $extraParams = sprintf($extraParams, $reversePath); - } - } - - return !empty($extraParams) ? $extraParams : null; - } -}