Hi,

Today I've updated repoze.what.plugins.sql from egg
repoze.what.plugins.sql-1.0a5_r3122-py2.5.egg to egg
repoze.what.plugins.sql-1.0b1-py2.5.egg, and it breaks my
authentication system in pylons.
Looking at source code, it comes from method _find_sections from
SqlGroupsAdapter which expect to receive dict "credentials" as
argument from repoze.what middleware, but receive instead the
"identity" dict which doesn't contains key 'repoze.what.userid'.
Looks like confusion between identity and credentials dicts...
Is that a newly introduced bug?

Here is the traceback from pylons :

URL: http://127.0.0.1:5000/dummy_auth/credentials
File 
'/home/bbinet/dev/mapcat/util/VP_mapcat/lib/python2.5/site-packages/WebError-0.9.1-py2.5.egg/weberror/evalexception.py',
line 428 in respond
  app_iter = self.application(environ, detect_start_response)
File 
'/home/bbinet/dev/mapcat/util/VP_mapcat/lib/python2.5/site-packages/Beaker-1.1.2-py2.5.egg/beaker/middleware.py',
line 81 in __call__
  return self.app(environ, start_response)
File 
'/home/bbinet/dev/mapcat/util/VP_mapcat/lib/python2.5/site-packages/Beaker-1.1.2-py2.5.egg/beaker/middleware.py',
line 159 in __call__
  return self.wrap_app(environ, session_start_response)
File 
'/home/bbinet/dev/mapcat/util/VP_mapcat/lib/python2.5/site-packages/Routes-1.10.1-py2.5.egg/routes/middleware.py',
line 118 in __call__
  response = self.app(environ, start_response)
File 
'/home/bbinet/dev/mapcat/util/VP_mapcat/lib/python2.5/site-packages/repoze.who-1.0.10-py2.5.egg/repoze/who/middleware.py',
line 85 in __call__
  self.add_metadata(environ, classification, identity)
File 
'/home/bbinet/dev/mapcat/util/VP_mapcat/lib/python2.5/site-packages/repoze.who-1.0.10-py2.5.egg/repoze/who/middleware.py',
line 171 in add_metadata
  plugin.add_metadata(environ, identity)
File 
'/home/bbinet/dev/mapcat/util/VP_mapcat/lib/python2.5/site-packages/repoze.what-1.0.2-py2.5.egg/repoze/what/middleware.py',
line 94 in add_metadata
  groups, permissions = self._find_groups(identity)
File 
'/home/bbinet/dev/mapcat/util/VP_mapcat/lib/python2.5/site-packages/repoze.what-1.0.2-py2.5.egg/repoze/what/middleware.py',
line 74 in _find_groups
  groups |= set(grp_fetcher.find_sections(identity))
File 
'/home/bbinet/dev/mapcat/util/VP_mapcat/lib/python2.5/site-packages/repoze.what-1.0.2-py2.5.egg/repoze/what/adapters/__init__.py',
line 170 in find_sections
  return self._find_sections(hint)
File 
'/home/bbinet/dev/mapcat/util/VP_mapcat/lib/python2.5/site-packages/repoze.what.plugins.sql-1.0b1-py2.5.egg/repoze/what/plugins/sql/adapters.py',
line 302 in _find_sections
  id_ = credentials['repoze.what.userid']
KeyError: 'repoze.what.userid'

Cheers,

Bruno
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to