PLAINAuthenticator in twisted.mail.imap4 does not follow RFCs

[email protected]
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from khorn <None>:

PLAINAuthenticator.challengeResponse() uses the following statement to send auth credentials to the server

        return '%s\0%s\0' % (self.user, secret)

which would give auth credentials of the form:

        authid<NUL>password<NUL>

        (where <NUL> is the NUL character)

However, both RFC2595 and RFC4616 (both define the PLAIN SASL mechanism), say that credentials should be passed this way:

        [authzid]<NUL>authnid<NUL>password

        (where <NUL> is the NUL character and [authzid] is optional)

Now even if one was to leave the authzid out of the equation, you would end up with something like this:

        <NUL>authnid<NUL>password

and the version Twisted's IMAP code uses appears to be invalid.

NOTE: PLAINCredentials may also need to be modified to follow RFCs

----------
Type     : defect
Component: mail
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/3939
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.