Bad URL causes ratelimit middleware to send traceback to the client

Bug #668144 reported by John Dickinson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Critical
David Goetz
1.1
Fix Committed
Critical
David Goetz

Bug Description

A bad URL (http://storage.domain.com//) causes the rate limiting middleware to crash and send a traceback to the client.

Related branches

Changed in swift:
assignee: nobody → David Goetz (david-goetz)
Revision history for this message
clayg (clay-gerrard) wrote :

Two things:

1) we need a top level middleware that will catch log and return 500 on unhandled exceptions in middleware

2) we need to hunt down calls to split_path that don't have a try/except and make sure they're returning 404's

clayg@saio:~/swift$ curl http://localhost:8080//
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/eventlet-0.9.9-py2.6.egg/eventlet/wsgi.py", line 335, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/home/clayg/swift/swift/common/middleware/healthcheck.py", line 38, in __call__
    return self.app(env, start_response)
  File "/home/clayg/swift/swift/common/middleware/memcache.py", line 31, in __call__
    return self.app(env, start_response)
  File "/home/clayg/swift/swift/common/middleware/auth.py", line 86, in __call__
    1, 2, True)
  File "/home/clayg/swift/swift/common/utils.py", line 223, in split_path
    raise ValueError('Invalid path: %s' % quote(path))
ValueError: Invalid path: //

^ auth middleware line 86

Revision history for this message
John Dickinson (notmyname) wrote :
Chuck Thier (cthier)
Changed in swift:
milestone: none → 1.2.0
clayg (clay-gerrard)
Changed in swift:
status: New → Fix Committed
Chuck Thier (cthier)
Changed in swift:
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.