Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9.0
-
Fix Version/s: 1.9.6
-
Component/s: Zend_Mail_Storage
-
Labels:None
Description
For example, call $imap->_decodeLine('("A B C")') returns array('"A', 'B', 'C"') instead of array('"A B C"')
In the same time calls like $imap->_decodeLine('(X "A B C")') are working fine: array('X', '"A B C"')
$imap is an instance of Zend_Mail_Protocol_Imap (visibility modifier changed from protected to public for testing purposes).
This bug affects IMAP responses parsing and makes IMAP using almost impossible. For example, IMAP request like "FETCH 1 (ENVELOPE)" returns garbage instead of valid envelope.
Attachments
Issue Links
| This issue is related to: | ||||
| ZF-7978 | method Zend_Mail_Protocol_Imap::_decodeLine() incorrectly parse some tokens |
|
|
|
The problem could be saved by replacing line
if (preg_match('%^"((.|\\\\|
")*?)" *%', $line, $matches)) {
with
if (preg_match('%^("((.|\\\\|
")?)" *%', $line, $matches)) {
added '(*'
")*?)" *%', $line, $matches)) { with if (preg_match('%^("((.|\\\\|
")?)" *%', $line, $matches)) { added '(*'