ZF-9714: _decodeLine() issue in Mail/Protocol/Imap.php

Issue Type: Bug Created: 2010-04-19T18:33:45.000+0000 Last Updated: 2012-11-20T21:37:50.000+0000 Status: Open Fix version(s): Reporter: George Breahna (catharsis3k) Assignee: None Tags: - Zend_Mail

Related issues: Attachments:


With Dovecot IMAP server, some messages are not retrieved properly and eventually the connection times out because ZF tries to read too many lines.

The problem is in the _decodeLine() function when ZF has to read a specific string length. The server will reply with a line like this: * 767 FETCH (UID 19111 RFC822.TEXT {11825}

Where 11825 is the number of characters ZF has to read.

The problem is that somehow the internal mechanism for tracking the characters read ( strlen($token) ) reports for some messages, the wrong count and this makes ZF ask for more lines using _nextLine() which eventually breaks everything.

At first I thought this was an issue with Dovecot, but testing with other IMAP clients didn't result in any bug. There must be something wrong in the way ZF reads and counts the data from the server.


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.