Fix (harmless) regex flaw when determining maildir flags

The regex for catching Maildir message flags was
self.infosep + '.*2,([A-Z]+)' (infosep being ':').

The .* is bogus, as there is nothing between the : and the 2, per
maildir name specification, so remove that unneeded piece.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-01-05 14:39:09 +01:00
parent a280a905ca
commit 64f5e557bc

View File

@ -70,7 +70,7 @@ class MaildirFolder(BaseFolder):
self.infosep = '!' if self.wincompatible else ':'
"""infosep is the separator between maildir name and flag appendix"""
self.flagmatchre = re.compile(self.infosep + '.*2,([A-Z]+)')
self.flagmatchre = re.compile(self.infosep + '2,([A-Z]+)')
#self.ui is set in BaseFolder.init()
# Cache the full folder path, as we use getfullname() very often
self._fullname = os.path.join(self.getroot(), self.getname())