[Zope-dev] ZPublisher.Client and encrypted passwords

Leonardo Rochael Almeida leo@hiper.com.br
26 Mar 2003 16:12:30 -0300


On Tue, 2003-03-25 at 23:35, Jamie Heilman wrote:
> Danny W. Adair wrote:
> > At 10:23 AM 3/26/2003 +1100, Adrian van den Dries wrote:
> > >On March 26, Danny W. Adair wrote:
> > >> Thanks. How would I do that?
> > >> ZPublisher.Client.call() is very convenient but only takes
> > >> url,username,pwd...
> > >
> > >import base64
> > >user, pass = base64.decodestring(req._auth.split(' ')[1]).split(':')
> 
> and then when the users's password contains a ':' ...

user, pass = base64.decodestring(req._auth.split(' ')[1]).split(':', 1)

	Cheers, Leo

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.