Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-8597, CRM-20561 - Restore fix for & #3

Merged
merged 1 commit into from
Jun 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tools/scripts/composer/net-smtp-fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ fi
if ! grep -q 'function __construct' vendor/pear/net_smtp/Net/SMTP.php; then
patch vendor/pear/net_smtp/Net/SMTP.php < tools/scripts/composer/patches/net-smtp-php7-patch.txt
fi
if grep -q '&Auth_SASL::factory' vendor/pear/net_smtp/Net/SMTP.php; then
patch vendor/pear/net_smtp/Net/SMTP.php < tools/scripts/composer/patches/net-smtp-ref-patch.txt
fi
22 changes: 22 additions & 0 deletions tools/scripts/composer/patches/net-smtp-ref-patch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- SMTP.php 2017-06-15 20:08:34.696988543 -0700
+++ SMTP.php.new 2017-06-15 20:08:25.951703778 -0700
@@ -732,7 +732,8 @@
}

$challenge = base64_decode($this->_arguments[0]);
- $digest = &Auth_SASL::factory('digest-md5');
+ // CRM-8597
+ $digest = Auth_SASL::factory('digest-md5');
$auth_str = base64_encode($digest->getResponse($uid, $pwd, $challenge,
$this->host, "smtp",
$authz));
@@ -784,7 +785,8 @@
}

$challenge = base64_decode($this->_arguments[0]);
- $cram = &Auth_SASL::factory('cram-md5');
+ // CRM-8597
+ $cram = Auth_SASL::factory('cram-md5');
$auth_str = base64_encode($cram->getResponse($uid, $pwd, $challenge));

if (PEAR::isError($error = $this->_put($auth_str))) {