Reedy has uploaded a new change for review. https://gerrit.wikimedia.org/r/313661
Change subject: Update pear/net_smtp from v1.7.1 to v1.7.2 ...................................................................... Update pear/net_smtp from v1.7.1 to v1.7.2 https://github.com/pear/net_smtp/compare/1.7.1...1.7.2 Change-Id: I243094882591b20fc05740845c4940ca3cbfaba7 --- M composer.json M composer.lock M composer/installed.json M pear/net_smtp/.gitignore M pear/net_smtp/.travis.yml M pear/net_smtp/Net/SMTP.php M pear/net_smtp/package.xml M pear/net_smtp/tests/basic.phpt 8 files changed, 96 insertions(+), 89 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor refs/changes/61/313661/1 diff --git a/composer.json b/composer.json index 433f119..1775ccd 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "pear/mail": "1.3.0", "pear/mail_mime": "1.10.0", "pear/mail_mime-decode": "1.5.5.2", - "pear/net_smtp": "1.7.1", + "pear/net_smtp": "1.7.2", "pear/net_socket": "1.0.14", "pear/pear-core-minimal": "1.10.1", "pear/pear_exception": "1.0.0", diff --git a/composer.lock b/composer.lock index 58ca9d1..9e4d121 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "618ad555cbfed305fa164e3b3cfd3e50", + "content-hash": "62dbea389a0e8ae36e421cbbd00ae8ad", "packages": [ { "name": "composer/semver", @@ -769,16 +769,16 @@ }, { "name": "pear/net_smtp", - "version": "1.7.1", + "version": "1.7.2", "source": { "type": "git", "url": "https://github.com/pear/Net_SMTP.git", - "reference": "cf7e1bac4cdd38f3260e5c10d5ae366b7e22794c" + "reference": "8e83dfc6a355edace240aa8f5f8bf6c61eafcc98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/Net_SMTP/zipball/cf7e1bac4cdd38f3260e5c10d5ae366b7e22794c", - "reference": "cf7e1bac4cdd38f3260e5c10d5ae366b7e22794c", + "url": "https://api.github.com/repos/pear/Net_SMTP/zipball/8e83dfc6a355edace240aa8f5f8bf6c61eafcc98", + "reference": "8e83dfc6a355edace240aa8f5f8bf6c61eafcc98", "shasum": "" }, "require": { @@ -825,7 +825,7 @@ "mail", "smtp" ], - "time": "2015-09-07 17:04:16" + "time": "2016-05-30 00:31:43" }, { "name": "pear/net_socket", diff --git a/composer/installed.json b/composer/installed.json index 994e5c8..5c579a5 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -594,68 +594,6 @@ "description": "More info available on: http://pear.php.net/package/Net_Socket" }, { - "name": "pear/net_smtp", - "version": "1.7.1", - "version_normalized": "1.7.1.0", - "source": { - "type": "git", - "url": "https://github.com/pear/Net_SMTP.git", - "reference": "cf7e1bac4cdd38f3260e5c10d5ae366b7e22794c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/Net_SMTP/zipball/cf7e1bac4cdd38f3260e5c10d5ae366b7e22794c", - "reference": "cf7e1bac4cdd38f3260e5c10d5ae366b7e22794c", - "shasum": "" - }, - "require": { - "pear/net_socket": "*", - "pear/pear-core-minimal": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "*" - }, - "suggest": { - "pear/auth_sasl": "Install optionally via your project's composer.json" - }, - "time": "2015-09-07 17:04:16", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Net": "./" - } - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "./" - ], - "license": [ - "PHP License" - ], - "authors": [ - { - "name": "Jon Parise", - "email": "[email protected]", - "homepage": "http://www.indelible.org", - "role": "Lead" - }, - { - "name": "Chuck Hagenbuch", - "email": "[email protected]", - "role": "Lead" - } - ], - "description": "An implementation of the SMTP protocol", - "homepage": "http://pear.github.io/Net_SMTP/", - "keywords": [ - "email", - "mail", - "smtp" - ] - }, - { "name": "wikimedia/assert", "version": "v0.2.2", "version_normalized": "0.2.2.0", @@ -1967,5 +1905,67 @@ "validation", "versioning" ] + }, + { + "name": "pear/net_smtp", + "version": "1.7.2", + "version_normalized": "1.7.2.0", + "source": { + "type": "git", + "url": "https://github.com/pear/Net_SMTP.git", + "reference": "8e83dfc6a355edace240aa8f5f8bf6c61eafcc98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/Net_SMTP/zipball/8e83dfc6a355edace240aa8f5f8bf6c61eafcc98", + "reference": "8e83dfc6a355edace240aa8f5f8bf6c61eafcc98", + "shasum": "" + }, + "require": { + "pear/net_socket": "*", + "pear/pear-core-minimal": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "pear/auth_sasl": "Install optionally via your project's composer.json" + }, + "time": "2016-05-30 00:31:43", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Net": "./" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "./" + ], + "license": [ + "PHP License" + ], + "authors": [ + { + "name": "Jon Parise", + "email": "[email protected]", + "homepage": "http://www.indelible.org", + "role": "Lead" + }, + { + "name": "Chuck Hagenbuch", + "email": "[email protected]", + "role": "Lead" + } + ], + "description": "An implementation of the SMTP protocol", + "homepage": "http://pear.github.io/Net_SMTP/", + "keywords": [ + "email", + "mail", + "smtp" + ] } ] diff --git a/pear/net_smtp/.gitignore b/pear/net_smtp/.gitignore index 3dac7e9..d6a279e 100644 --- a/pear/net_smtp/.gitignore +++ b/pear/net_smtp/.gitignore @@ -1,4 +1,5 @@ .DS_Store +Net_SMTP-*.tgz # Tests run-tests.log diff --git a/pear/net_smtp/.travis.yml b/pear/net_smtp/.travis.yml index 1865e1d..1c9dcc2 100644 --- a/pear/net_smtp/.travis.yml +++ b/pear/net_smtp/.travis.yml @@ -4,4 +4,8 @@ - pear install package.xml php: - 5.4 -script: phpunit tests/ + - 5.5 + - 5.6 + - 7.0 + - nightly +script: pear run-tests tests/ diff --git a/pear/net_smtp/Net/SMTP.php b/pear/net_smtp/Net/SMTP.php index 8f4e92b..dd822a5 100644 --- a/pear/net_smtp/Net/SMTP.php +++ b/pear/net_smtp/Net/SMTP.php @@ -169,7 +169,7 @@ $this->socket_options = $socket_options; $this->timeout = $timeout; - /* Include the Auth_SASL package. If the package is available, we + /* Include the Auth_SASL package. If the package is available, we * enable the authentication methods that depend upon it. */ if (@include_once 'Auth/SASL.php') { $this->setAuthMethod('CRAM-MD5', array($this, 'authCramMD5')); @@ -1034,12 +1034,15 @@ if (PEAR::isError($result = $this->send($headers . "\r\n\r\n"))) { return $result; } + + /* Subtract the headers size now that they've been sent. */ + $size -= strlen($headers) + 4; } /* Now we can send the message body data. */ if (is_resource($data)) { - /* Stream the contents of the file resource out over our socket - * connection, line by line. Each line must be run through the + /* Stream the contents of the file resource out over our socket + * connection, line by line. Each line must be run through the * quoting routine. */ while (strlen($line = fread($data, 8192)) > 0) { /* If the last character is an newline, we need to grab the @@ -1060,15 +1063,15 @@ $last = $line; } else { /* - * Break up the data by sending one chunk (up to 512k) at a time. + * Break up the data by sending one chunk (up to 512k) at a time. * This approach reduces our peak memory usage. */ for ($offset = 0; $offset < $size;) { $end = $offset + 512000; /* - * Ensure we don't read beyond our data size or span multiple - * lines. quotedata() can't properly handle character data + * Ensure we don't read beyond our data size or span multiple + * lines. quotedata() can't properly handle character data * that's split across two line break boundaries. */ if ($end >= $size) { diff --git a/pear/net_smtp/package.xml b/pear/net_smtp/package.xml index 82cdab0..d05ca4c 100644 --- a/pear/net_smtp/package.xml +++ b/pear/net_smtp/package.xml @@ -19,10 +19,10 @@ <email>[email protected]</email> <active>yes</active> </lead> - <date>2015-09-07</date> - <time>10:00:00</time> + <date>2016-05-30</date> + <time>00:00:00</time> <version> - <release>1.7.1</release> + <release>1.7.2</release> <api>1.3.0</api> </version> <stability> @@ -30,9 +30,7 @@ <api>stable</api> </stability> <license uri="http://www.php.net/license/3_01.txt">PHP License</license> - <notes>- Fix a syntax error in the quotedata() test. -- Fix an undefined value resulting from a bad merge. (#23) -- Add TLSv1.1 and TLSv1.2 support for STARTTLS connections. (#22) + <notes>- Fix size calculation when headers are provided (#27) </notes> <contents> <dir baseinstalldir="/" name="/"> diff --git a/pear/net_smtp/tests/basic.phpt b/pear/net_smtp/tests/basic.phpt index 46ab7d0..5d85d2f 100644 --- a/pear/net_smtp/tests/basic.phpt +++ b/pear/net_smtp/tests/basic.phpt @@ -9,11 +9,11 @@ require_once 'config.php'; if (! ($smtp = new Net_SMTP(TEST_HOSTNAME, TEST_PORT, TEST_LOCALHOST))) { - die("Unable to instantiate Net_SMTP object\n"); + die("Unable to instantiate Net_SMTP object\n"); } if (PEAR::isError($e = $smtp->connect())) { - die($e->getMessage() . "\n"); + die($e->getMessage() . "\n"); } if (PEAR::isError($e = $smtp->auth(TEST_AUTH_USER, TEST_AUTH_PASS))) { @@ -21,16 +21,17 @@ } if (PEAR::isError($smtp->mailFrom(TEST_FROM))) { - die('Unable to set sender to <' . TEST_FROM . ">\n"); + die('Unable to set sender to <' . TEST_FROM . ">\n"); } if (PEAR::isError($res = $smtp->rcptTo(TEST_TO))) { - die('Unable to add recipient <' . TEST_TO . '>: ' . - $res->getMessage() . "\n"); + die('Unable to add recipient <' . TEST_TO . '>: ' . + $res->getMessage() . "\n"); } -if (PEAR::isError($smtp->data('Subject: ' . TEST_SUBJECT . "\r\n\r\n" . TEST_BODY))) { - die("Unable to send data\n"); +$headers = 'Subject: ' . TEST_SUBJECT; +if (PEAR::isError($smtp->data(TEST_BODY, $headers))) { + die("Unable to send data\n"); } $smtp->disconnect(); -- To view, visit https://gerrit.wikimedia.org/r/313661 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I243094882591b20fc05740845c4940ca3cbfaba7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vendor Gerrit-Branch: master Gerrit-Owner: Reedy <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
