Opened 11 years ago

Last modified 11 years ago

#43 defect closed fixed (fixed)

IMAPServer select_FETCH incorrect for non-UID

Reported by: radix Owned by:
Priority: high Milestone:
Component: Keywords:
Cc: radix, exarkun, anadelonbrin Branch:
Author: Launchpad Bug:

Description


Change History (4)

comment:1 Changed 11 years ago by radix

In select_FETCH (both today's cvs and the current
release) - line 718/667, the next UID is used as the top
value for the range.

This should only be the case if uid == 1 (i.e. we are
doing a UID FETCH). If uid != 1, then the top value
should be the message count + 1.

Replacing:
messages = parseIdList(messages,
self.mbox.getUIDNext())
with:
if uid:
top = int(self.mbox.getUIDNext())
else:
top = self.mbox.getMessageCount() + 1
messages = parseIdList(messages, top)

fixes this.

Note that this is especially a problem if very high UIDs
are used, because the later range call can run out of
memory unnecessarily.

comment:2 Changed 11 years ago by anadelonbrin

See also the original SF bug.  The problem listed here was 
solved, there was an additional problem (incorrect addition 
of UID when not present on a UID FETCH) that was not yet 
solved.

Note that discussion/patches are flowing on the list at the 
moment, though.

comment:3 Changed 11 years ago by exarkun

The secondary issue here has now been resolved, by way of
use of MessageSet objects, which are "automatically" the
right kind of identifier in all situations.

comment:4 Changed 4 years ago by <automation>

  • Owner exarkun deleted
Note: See TracTickets for help on using tickets.