Skip to content

Commit

Permalink
Merge pull request #3 from totten/seamuslee001-CRM-20561
Browse files Browse the repository at this point in the history
CRM-8597, CRM-20561 - Restore fix for `&`
  • Loading branch information
seamuslee001 authored Jun 16, 2017
2 parents 5b0dd2c + 764b4bf commit e737bf0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
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))) {

0 comments on commit e737bf0

Please sign in to comment.