Google Groups Home
Help | Sign in
Message from discussion tgrepozewho
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
chrism  
View profile
 More options May 9, 10:52 am
From: chrism <chr...@plope.com>
Date: Fri, 9 May 2008 07:52:38 -0700 (PDT)
Local: Fri, May 9 2008 10:52 am
Subject: Re: tgrepozewho
Isn't this what the "require" function in
http://svn.turbogears.org/projects/tgrepozewho/trunk/tgrepozewho/auth...
does?

On May 8, 2:58 pm, percious <ch...@percious.com> wrote:

> chris,

> Thanks for the fix.  Works great now....  Now if we could only get a
> way to authorize on TG Controllers (ie. requires) we would be in good
> shape.  I will probably be writing this code at the next sprint.

> cheers.
> -chris

> On May 7, 5:30 pm, chrism <chr...@plope.com> wrote:

> > See also:

> >http://lists.repoze.org/pipermail/repoze-checkins/2008-May/000768.html

> > On May 7, 7:20 pm, chrism <chr...@plope.com> wrote:

> > > I thought I fixed this in 0.9.1.  You might have found an additional
> > > bug.  I've only tested under Python 2.4 using Paste 1.5, that may be
> > > the difference. :-(  There is code in repoze.who's plugins/auth_tkt.py
> > > that is meant to cast an integer to a string on egress and back again
> > > on ingress but it doesn't handle longs.  Can you try the following
> > > patch?

> > > Index: repoze/who/plugins/auth_tkt.py
> > > ===================================================================
> > > --- repoze/who/plugins/auth_tkt.py      (revision 995)
> > > +++ repoze/who/plugins/auth_tkt.py      (working copy)
> > > @@ -15,6 +15,7 @@

> > >      userid_type_encoders = {
> > >          int: ('int', str),
> > > +        long: ('int', str),
> > >          }

> > >      def __init__(self, secret, cookie_name='auth_tkt',

> > > percious wrote:
> > > > I tried putting tgrepozewho up on our linux server and it failed
> > > > wonderfully.  Something about userid being a long that it doesnt
> > > > like.  Where is the right place to cast the userid into a string?

> > > > cheers.
> > > > -chris

> > > > URL:http://sccdata:13001/login_handler?came_from=http://sccdata:13001/
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > WebError-0.8a-py2.5.egg/weberror/evalexception/middleware.py', line
> > > > 364 in respond
> > > >   app_iter = self.application(environ, detect_start_response)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > ToscaWidgets-0.8.5-py2.5.egg/tw/core/middleware.py', line 39 in
> > > > __call__
> > > >   return self.wsgi_app(environ, start_response)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > Paste-1.6-py2.5.egg/paste/registry.py', line 334 in __call__
> > > >   app_iter = self.application(environ, start_response)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > ToscaWidgets-0.8.5-py2.5.egg/tw/core/middleware.py', line 54 in
> > > > wsgi_app
> > > >   app_iter = self.application(environ, start_response)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > Beaker-0.9.4-py2.5.egg/beaker/middleware.py', line 75 in __call__
> > > >   return self.app(environ, start_response)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > Beaker-0.9.4-py2.5.egg/beaker/middleware.py', line 147 in __call__
> > > >   return self.wrap_app(environ, session_start_response)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > Routes-1.8-py2.5.egg/routes/middleware.py', line 99 in __call__
> > > >   response = self.app(environ, start_response)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > repoze.who-0.9.1-py2.5.egg/repoze/who/middleware.py', line 131 in
> > > > __call__
> > > >   remember_headers = identifier.remember(environ, identity)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > repoze.who-0.9.1-py2.5.egg/repoze/who/plugins/form.py', line 59 in
> > > > remember
> > > >   return rememberer.remember(environ, identity)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > repoze.who-0.9.1-py2.5.egg/repoze/who/plugins/auth_tkt.py', line 130
> > > > in remember
> > > >   new_cookie_value = ticket.cookie_value()
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > Paste-1.6-py2.5.egg/paste/auth/auth_tkt.py', line 102 in cookie_value
> > > >   v = '%s%08x%s!' % (self.digest(), int(self.time), self.userid)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > Paste-1.6-py2.5.egg/paste/auth/auth_tkt.py', line 99 in digest
> > > >   self.user_data)
> > > > File '/var/scratch/sccdata/sites/mbms/lib/python2.5/site-packages/
> > > > Paste-1.6-py2.5.egg/paste/auth/auth_tkt.py', line 169 in
> > > > calculate_digest
> > > >   + tokens + '\0' + user_data).hexdigest()
> > > > TypeError: cannot concatenate 'str' and 'long' objects


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google