[ python-Bugs-845560 ] imaplib: traceback from _checkquote with empty string

SourceForge.net noreply at sourceforge.net
Wed Nov 19 23:01:01 EST 2003


Bugs item #845560, was opened at 2003-11-20 17:01
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=845560&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Tony Meyer (anadelonbrin)
Assigned to: Nobody/Anonymous (nobody)
Summary: imaplib: traceback from _checkquote with empty string

Initial Comment:
Python 2.3.2 and also 18/11/03 CVS; Windows XP.

If _checkquote is passed the empty string, it raises and 
exception (because it tries to get an index into the 
string).  The easiest way to reproduce this is:

>>> import imaplib
>>> i = imaplib.IMAP4('server.name')
>>> i.login("username", "password")
>>> i.select("")
[Traceback here]

While it's unlikely that there's a folder called "", this 
should really give the 'invalid folder name' error, rather 
than an exception.

The attached diff fixes this, simply by checking for the 
empty string in _checkquote.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=845560&group_id=5470



More information about the Python-bugs-list mailing list