I was digging through the Twisted IMAP code tonight and I noticed something puzzling...<br><br>PLAINAuthenticator.challengeResponse() uses the following statement to send auth credentials to the server<br><br>        return &#39;%s\0%s\0&#39; % (self.user, secret)<br>
<br>which would give auth credentials of the form:<br><br>        authid&lt;NUL&gt;password&lt;NUL&gt;<br><br>        (where &lt;NUL&gt; is the NUL character)<br><br>However, both RFC2595 and RFC4616 (both define the PLAIN SASL mechanism), say that credentials should be passed this way:<br>
<br>        [authzid]&lt;NUL&gt;authnid&lt;NUL&gt;password<br><br>        (where &lt;NUL&gt; is the NUL character and [authzid] is optional)<br><br>Now even if one was to leave the authzid out of the equation, you would end up with something like this:<br>
<br>        &lt;NUL&gt;authnid&lt;NUL&gt;password<br><br>and the version Twisted&#39;s IMAP code uses appears to be invalid.<br><br>Am I crazy? <br>Am I missing something?  <br>Is it just way too late and I should put the RFCs down and back away slowly?<br>
<br>Kevin Horn<br>