Skip to content

Commit

Permalink
Fix so untagged COPYUID responses are also supported according to RFC…
Browse files Browse the repository at this point in the history
…6851 (#5982)
  • Loading branch information
alecpl committed Oct 6, 2017
1 parent 0ad7e4c commit b07a5e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ CHANGELOG Roundcube Webmail
- Fix (again) bug where image data URIs in css style were treated as evil/remote in mail preview (#5580)
- Fix bug where mail search could return empty result on servers without SORT capability (#5973)
- Fix bug where assets_path wasn't added to some watermark frames
- Fix so untagged COPYUID responses are also supported according to RFC6851 (#5982)

RELEASE 1.3.1
-------------
Expand Down
8 changes: 8 additions & 0 deletions program/lib/Roundcube/rcube_imap_generic.php
Original file line number Diff line number Diff line change
Expand Up @@ -3727,9 +3727,17 @@ public function execute($command, $arguments=array(), $options=0)
// Parse response
do {
$line = $this->readLine(4096);

if ($response !== null) {
$response .= $line;
}

// parse untagged response for [COPYUID 1204196876 3456:3457 123:124] (RFC6851)
if ($line && $command == 'UID MOVE' && substr_compare($line, '* OK', 0, 4, true)) {
if (preg_match("/^\* OK \[COPYUID [0-9]+ ([0-9,:]+) ([0-9,:]+)\]/i", $line, $m)) {
$this->data['COPYUID'] = array($m[1], $m[2]);
}
}
}
while (!$this->startsWith($line, $tag . ' ', true, true));

Expand Down

0 comments on commit b07a5e5

Please sign in to comment.