logging out while in project view creates an internal server error

Bug #914546 reported by Guy K. Kloss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sloecode
Fix Released
Medium
Unassigned

Bug Description

steps to reproduce:

* be logged in to sloecode
* go to a project view (e. g. http://example.org/p/myproject42/index)
* hit the logout button
* BANG!

Content in /var/log/apache2/sloecode.error.log:

[Wed Jan 11 14:07:23 2012] [error] [client 156.62.70.135] [error] [client 156.62.70.135] Error - <type 'exceptions.KeyError'>: 'repoze.who.identity'

 Content in /var/apache2/sloecode.log:

156.62.70.135 - - [11/Jan/2012:14:07:23 +1300] "GET /sc/p/dms717287/index HTTP/1.1" 500 1072
156.62.70.135 - - [11/Jan/2012:14:07:23 +1300] "GET /sc/error/style/black.css HTTP/1.1" 404 1352

Stack trace by mail:

Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"

URL: http://putake.aut.ac.nz/sc/p/dms717287/index
File '/usr/lib/pymodules/python2.6/weberror/errormiddleware.py', line 162 in __call__
  app_iter = self.application(environ, sr_checker)
File '/usr/lib/pymodules/python2.6/repoze/who/middleware.py', line 107 in __call__
  app_iter = app(environ, wrapper.wrap_start_response)
File '/usr/lib/pymodules/python2.6/beaker/middleware.py', line 152 in __call__
  return self.wrap_app(environ, session_start_response)
File '/usr/lib/pymodules/python2.6/routes/middleware.py', line 131 in __call__
  response = self.app(environ, start_response)
File '/usr/lib/pymodules/python2.6/pylons/wsgiapp.py', line 124 in __call__
  response = self.dispatch(controller, environ, start_response)
File '/usr/lib/pymodules/python2.6/pylons/wsgiapp.py', line 327 in dispatch
  return controller(environ, start_response)
File '/usr/lib/python2.6/dist-packages/sloecode/lib/base.py', line 22 in __call__
  return WSGIController.__call__(self, environ, start_response)
File '/usr/lib/pymodules/python2.6/pylons/controllers/core.py', line 225 in __call__
  response = self._dispatch_call()
File '/usr/lib/pymodules/python2.6/pylons/controllers/core.py', line 176 in _dispatch_call
  response = self._inspect_call(func)
File '/usr/lib/pymodules/python2.6/pylons/controllers/core.py', line 108 in _inspect_call
  result = self._perform_call(func, args)
File '/usr/lib/pymodules/python2.6/pylons/controllers/core.py', line 60 in _perform_call
  return func(**args)
File '/usr/lib/python2.6/dist-packages/sloecode/controllers/project.py', line 37 in index
  user = request.environ['repoze.who.identity'].get('user')
KeyError: 'repoze.who.identity'

CGI Variables
-------------
  DOCUMENT_ROOT: '/var/www'
  GATEWAY_INTERFACE: 'CGI/1.1'
  HTTP_ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
  HTTP_ACCEPT_CHARSET: 'ISO-8859-15,utf-8;q=0.7,*;q=0.7'
  HTTP_ACCEPT_LANGUAGE: 'en-nz,en;q=0.7,en-us;q=0.3'
  HTTP_CONNECTION: 'Keep-Alive'
  HTTP_COOKIE: 'sloecode=bc9df3aa97ec271598cd83e1336e76612acf9bfb9e00dba6341a5d8ebe7f006f687b09c8; __utma=95478083.824699417.1280966703.1288654595.1288658055.10'
  HTTP_DNT: '1'
  HTTP_HOST: 'putake.aut.ac.nz'
  HTTP_REFERER: 'http://putake.aut.ac.nz/sc/p/dms717287/index'
  HTTP_USER_AGENT: 'Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1'
  HTTP_X_FORWARDED_FOR: '156.62.70.135'
  HTTP_X_FORWARDED_HOST: 'putake.aut.ac.nz'
  HTTP_X_FORWARDED_SERVER: 'putake.aut.ac.nz'
  PATH_INFO: '/p/dms717287/index'
  PATH_TRANSLATED: '/var/www/p/dms717287/index'
  REMOTE_ADDR: '156.62.70.135'
  REMOTE_PORT: '60919'
  REQUEST_METHOD: 'GET'
  REQUEST_URI: '/sc/p/dms717287/index'
  SCRIPT_FILENAME: '/usr/share/sloecode/wsgi/sloecode.wsgi'
  SCRIPT_NAME: '/sc'
  SERVER_ADDR: '127.0.0.1'
  SERVER_ADMIN: '<email address hidden>'
  SERVER_NAME: 'putake.aut.ac.nz'
  SERVER_PORT: '8001'
  SERVER_PROTOCOL: 'HTTP/1.1'
  SERVER_SIGNATURE: '<address>Apache/2.2.16 (Debian) Server at putake.aut.ac.nz Port 8001</address>\n'
  SERVER_SOFTWARE: 'Apache/2.2.16 (Debian)'

WSGI Variables
--------------
  application: <repoze.who.middleware.PluggableAuthenticationMiddleware object at 0xba282d0c>
  beaker.get_session: <bound method SessionMiddleware._get_session of <beaker.middleware.SessionMiddleware object at 0xb9f79b4c>>
  beaker.session: {'_accessed_time': 1326244037.5890861, '_creation_time': 1326066463.573936}
  mod_wsgi.application_group: 'putake.aut.ac.nz:8001|/sc'
  mod_wsgi.callable_object: 'application'
  mod_wsgi.handler_script: ''
  mod_wsgi.input_chunked: '0'
  mod_wsgi.listener_host: ''
  mod_wsgi.listener_port: '8001'
  mod_wsgi.process_group: 'SloecodeWsgiDaemon'
  mod_wsgi.request_handler: 'wsgi-script'
  mod_wsgi.script_reloading: '1'
  mod_wsgi.version: (3, 3)
  paste.cookies: (<SimpleCookie: __utma='95478083.824699417.1280966703.1288654595.1288658055.10' sloecode='bc9df3aa97ec271598cd83e1336e76612acf9bfb9e00dba6341a5d8ebe7f006f687b09c8'>, 'sloecode=bc9df3aa97ec271598cd83e1336e76612acf9bfb9e00dba6341a5d8ebe7f006f687b09c8; __utma=95478083.824699417.1280966703.1288654595.1288658055.10')
  paste.registry: <paste.registry.Registry object at 0xbb5c730c>
  paste.throw_errors: True
  pylons.action_method: <bound method ProjectController.index of <sloecode.controllers.project.ProjectController object at 0xbb5dfd6c>>
  pylons.controller: <sloecode.controllers.project.ProjectController object at 0xbb5dfd6c>
  pylons.environ_config: {'session': 'beaker.session', 'cache': 'beaker.cache'}
  pylons.pylons: <pylons.util.PylonsContext object at 0xbb5dfa8c>
  pylons.routes_dict: {'action': u'index', 'controller': u'project', 'project_name': u'dms717287'}
  repoze.who.logger: None
  repoze.who.plugins: {'sa_md': <repoze.who.plugins.sa.SQLAlchemyUserMDPlugin object at 0xba278f4c>, 'sa_auth': <repoze.who.plugins.sa.SQLAlchemyAuthenticatorPlugin object at 0xb9fe524c>, 'auth_tkt': <AuthTktCookiePlugin 3123195660>, 'form': <FriendlyFormPlugin 3123193868>, 'authorization_md': <repoze.what.middleware.AuthorizationMetadata object at 0xba282bec>}
  routes.route: <routes.route.Route object at 0xb9f6f5cc>
  routes.url: <routes.util.URLGenerator object at 0xbb5c760c>
  webob.adhoc_attrs: {'language': 'en-us'}
  wsgi process: 'Multithreaded'
  wsgi.file_wrapper: <built-in method file_wrapper of mod_wsgi.Adapter object at 0xbb4be0f8>
  wsgi.version: (1, 1)
  wsgiorg.routing_args: (<routes.util.URLGenerator object at 0xbb5c760c>, {'action': u'index', 'controller': u'project', 'project_name': u'dms717287'})

Related branches

Changed in sloecode:
milestone: none → 1.1
Changed in sloecode:
assignee: nobody → Christopher Lee (veebers)
Changed in sloecode:
status: New → Confirmed
importance: Undecided → Medium
assignee: Christopher Lee (veebers) → Thomi Richards (thomir)
status: Confirmed → Fix Committed
Changed in sloecode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.