http://kenai.com/bugzilla/show_bug.cgi?id=5233
Bug #: 5233
Summary: Infinity loop if Quota information is not correctly
reported by imap server
Classification: Unclassified
Product: javamail
Version: 1.4.5
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P5
Component: imap
AssignedTo: shannon_at_kenai.com
ReportedBy: tking_at_kenai.com
CC: issues_at_javamail.kenai.com
Dear Javamail community,
while I was connecting to the IMAP server of the Canadian telco Telus
(imap.telus.net) I experienced an infinity loop with Javamail. The reason was
that Javamail tries to parse an invalid Quota response from the IMAP server and
infinitely loops.
The broken response from the IMAP server looks like this:
C: A168 GETQUOTAROOT "folderB/TESTfolder(S)C"
S: * QUOTAROOT folderB/TESTfolder(S)C ""
S: * QUOTA "" (STORAGE 79 102401 MESSAGE 26 10000)
S: A168 OK GETQUOTAROOT completed
Please note the missing " characters around the folder's full name in the
server's response.
While parsing the readAtom method of the Response class keeps returning empty
strings. This leads to an infinity loop in the getQuotaRoot method of the
IMAPProtocol class.
To resolve this situation the getQuotaRoot method must be slightly adjusted to
check for empty strings as well:
...
while (((root = ir.readAtomString()) != null) && (!root.isEmpty()))
tab.put(root, new Quota(root));
...
What do you think about this bugfix? Please consider this bugfix to be added to
the javamail source as it helps making the library more robust!
Thanks in advance,
Thomas
--
Configure bugmail: http://kenai.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.