[Twisted-Python] mail and web server authentication: yet to come or already there?
andrew-twisted at puzzling.org
Thu Nov 21 20:10:04 EST 2002
On Fri, Nov 22, 2002 at 01:48:25AM +0100, Stefano Debenedetti wrote:
> Andrew Bennetts wrote:
> >I *think* twisted.web.guard has this functionality... I've heard it's going
> >to be overhauled at some point, it's not as nice as it could be.
> Unfortunately this seems to handle authentication at an application level
> while I need to use HTTP protocol authentication mechanisms, ok I'll have
> to give it a go myself.
Ok. I'm pretty sure glyph or someone has some ideas on how best to do this;
it'd be good if they'd speak up :)
> >I'm even less of a twisted.mail expert than a twisted.web expert, but I
> >think that twisted.mail's auth stuff predates twisted.cred, and we haven't
> >had time to migrate it to twisted.cred yet.
> Again, I'm going to try and do that, of course it would be easier if I had
> some more samples of twisted.cred I could start from :-)
> >Hmm. That looks like a dubious change to me. Wouldn't that fail for
> >headers like:
> > To: Mr. Example <dude at example.com>
> >I'm not familiar with smtp.py though...
> :-) seems you are victim of a similar misunderstanding of SMTP that I had
> until recently: MAIL FROM and RCPT TO can only specify a mail address (in
> angle brackets). Headers like:
Ah, ok. I didn't realise (although I probably should've) that you were
changing the handling of MAIL FROM and RCPT TO... in my defense, you didn't
use unidiff format for that patch, which would've made that clear :)
> Indeed the current code is already handling RFC821 correctly, as that RFC
> doesn't allow to put spaces after the column and before the first angle
> bracket but I have at least one mailer that does that and I've seen other
> SMTP implementations that forgive that (for example see ), so I'll post
> my patch here again:
Ah, ok. Looks good to me, but I'm not the SMTP maintainer, so that doesn't
count for much... in general, I believe we aim to be "liberal in what we
accept, and strict in what we send" to maximise interoperability, so this
patch seems fine. Does Moshe or Itamar want to express an opinion here? :)
> So even at the second attempt the only way to run the Twisted installer for
> me was to remove the parts of setup.py that mention external modules, that
> makes me feel like a bad boy but I found no other solution.
That's fine. It'd be nice if there was a better way to do it than hacking
setup.py, but Twisted runs perfectly well as pure python.
Note also that we distribute Win32 installers for released versions, like
1.0.0, and soon also for 1.0.1, and these include prebuilt C modules.
> >Eek. The UI shouldn't crash, but regardless usually I use "runtests -t",
> >i.e. run in text mode.
> >Unfortunately Win32 support isn't 100% -- which tests are failing for you?
> Thanks for the -t tip. I found out that the testcases hang only if I use
> the cygwin python and that they behave differently if I run them with the
> -t flag, I copy here (by hand) the outputs of the graphical UI, both under
> cygwin and with regular python:
Thanks for these details, I'll have a look at them in more detail later.
It might be worth attaching the full output and your test.log file to a bug
report in our Sourceforge bug tracker, so we can't forget about them :)
More information about the Twisted-Python