Skip to content

Commit

Permalink
Add workaround for broken DBMail versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jan 30, 2015
1 parent bb20fa7 commit b2a327c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion framework/ManageSieve/lib/Horde/ManageSieve.php
Expand Up @@ -976,7 +976,9 @@ protected function _doCmd($cmd = '', $auth = false)

if (preg_match('/^(OK|NO)/i', $line, $tag)) {
// Check for string literal message.
if (preg_match('/{([0-9]+)}$/', $line, $matches)) {
// DBMail has some broken versions that send the trailing
// plus even though it's disallowed.
if (preg_match('/{([0-9]+)\+?}$/', $line, $matches)) {
$line = substr($line, 0, -(strlen($matches[1]) + 2))
. str_replace(
"\r\n", ' ', $this->_recvBytes($matches[1] + 2)
Expand Down

0 comments on commit b2a327c

Please sign in to comment.