diff --git a/CHANGELOG b/CHANGELOG index 13b3b1bce..75d351cf8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -55,6 +55,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 ------------- diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index c46f9d36d..f1c87d562 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -3709,9 +3709,17 @@ class rcube_imap_generic // 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));