

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
2 messages in org.python.python-bugs-list[ python-Bugs-917120 ] imaplib: incor...| From | Sent On | Attachments |
|---|---|---|
| SourceForge.net | Mar 16, 2004 1:36 am | |
| SourceForge.net | Mar 16, 2004 1:48 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [ python-Bugs-917120 ] imaplib: incorrect quoting in commands | Actions... |
|---|---|---|
| From: | SourceForge.net (nore...@sourceforge.net) | |
| Date: | Mar 16, 2004 1:36:40 am | |
| List: | org.python.python-bugs-list | |
Bugs item #917120, was opened at 2004-03-16 19:36 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=917120&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: incorrect quoting in commands
Initial Comment: imaplib incorrectly chooses to quote some arguments.
In particular, doing "UID FETCH # BODY.PEEK[]" results in the BODY.PEEK[] being quoted, and it should not (according to the RFC), which means the command fails. This is demonstrated below. It's possible (and likely) that other UID FETCH arguments are incorrectly quoted.
This occurs with anon cvs python of 16/3/04, and 2.3.3. Windows XP SP1.
I'm happy to provide more info if required, just let me know. I could try and work up a patch, but it would be better from someone really familiar with imaplib so that I don't screw up legitimate quoting.
import imaplib i = imaplib.IMAP4("server") i.login("username", "password") ('OK', ['LOGIN Ok.']) i.select() ('OK', ['38']) i.debug = 4 i.uid("FETCH", "96", "BODY")
29:14.23 > GKGP7 UID FETCH 96 BODY 29:14.40 < * 31 FETCH (UID 96 BODY (("text" "plain" ("charset" "iso-8859-1") NIL NIL "quoted-printable" 32 0)("text" "html" ("charset" "iso-8859-1") NIL NIL "quoted-printable" 368 10) "alternative")) 29:14.40 < GKGP7 OK FETCH completed. ('OK', ['31 (UID 96 BODY (("text" "plain" ("charset" "iso-8859-1") NIL NIL "quoted-printable" 32 0)("text" "html" ("charset" "iso-8859-1") NIL NIL "quoted-printable" 368 10) "alternative"))'])
i.uid("FETCH", "96", "BODY.PEEK[]")
29:17.04 > GKGP8 UID FETCH 96 "BODY.PEEK[]" 29:17.21 < GKGP8 NO Error in IMAP command received by server. 29:17.21 NO response: Error in IMAP command received by server. ('NO', ['Error in IMAP command received by server.'])
i.logout()
29:31.26 > GKGP9 LOGOUT 29:31.42 < * BYE Courier-IMAP server shutting down 29:31.42 BYE response: Courier-IMAP server shutting down 29:31.42 < GKGP9 OK LOGOUT completed ('BYE', ['Courier-IMAP server shutting down'])
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=917120&group_id=5470







