You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
imaplib support for quoting arguments accidentally removed #92835
imaplib does not quote command arguments, which leads to problems e.g. if a user specifies a mailbox with a name that contains a space.
>>> imap = imaplib.IMAP4_SSL('server', 993)
>>> imap.login('user', 'password')
>>> # Note: mailbox named "TPS Reports 2009-2010" does exist on server
>>> imap.append(b'TPS Reports 2009-2010', None, None, b'From: nobody\r\nTo: nobody\r\nSubject: nothing\r\n\r\n')
('NO', [b"[TRYCREATE] Mailbox doesn't exist: TPS (0.001 + 0.000 secs)."])
It appears that this functionality was removed by accident. A call in _command to a function _checkquote was commented out in fb5faf0 and then the function and everything connected to it was removed in f241afa.
Your environment
CPython versions tested on: 3.10.4 (has issue), 2.7.18.4 (does not have issue)
Operating system and architecture: Void Linux, ppc64el
Activity
vadmium commentedon Apr 18, 2024
Pull Request #6395 includes some tests which may be useful if the quoting ever gets restored