Bad URL causes ratelimit middleware to send traceback to the client
Bug #668144 reported by
John Dickinson
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://
Related branches
lp://staging/~david-goetz/swift/invalid_url_bug
- Chuck Thier (community): Approve
-
Diff: 251 lines (+76/-17)11 files modifiedswift/account/server.py (+6/-1)
swift/auth/server.py (+5/-2)
swift/common/middleware/auth.py (+12/-6)
swift/common/middleware/ratelimit.py (+5/-1)
swift/common/utils.py (+2/-0)
swift/obj/server.py (+6/-2)
swift/proxy/server.py (+2/-0)
swift/stats/access_processor.py (+7/-4)
test/functional/tests.py (+9/-0)
test/unit/auth/test_server.py (+2/-1)
test/unit/common/middleware/test_ratelimit.py (+20/-0)
lp://staging/~david-goetz/swift/invalid_url_backport
- Chuck Thier: Approve
-
Diff: 251 lines (+76/-17)11 files modifiedswift/account/server.py (+6/-1)
swift/auth/server.py (+5/-2)
swift/common/middleware/auth.py (+12/-6)
swift/common/middleware/ratelimit.py (+5/-1)
swift/common/utils.py (+2/-0)
swift/obj/server.py (+6/-2)
swift/proxy/server.py (+2/-0)
swift/stats/access_processor.py (+7/-4)
test/functional/tests.py (+9/-0)
test/unit/auth/test_server.py (+2/-1)
test/unit/common/middleware/test_ratelimit.py (+20/-0)
Changed in swift: | |
assignee: | nobody → David Goetz (david-goetz) |
Changed in swift: | |
milestone: | none → 1.2.0 |
Changed in swift: | |
status: | New → Fix Committed |
Changed in swift: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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// lib/python2. 6/dist- packages/ eventlet- 0.9.9-py2. 6.egg/eventlet/ wsgi.py" , line 335, in handle_one_response n(self. environ, start_response) clayg/swift/ swift/common/ middleware/ healthcheck. py", line 38, in __call__ clayg/swift/ swift/common/ middleware/ memcache. py", line 31, in __call__ clayg/swift/ swift/common/ middleware/ auth.py" , line 86, in __call__ clayg/swift/ swift/common/ utils.py" , line 223, in split_path
Traceback (most recent call last):
File "/usr/local/
result = self.applicatio
File "/home/
return self.app(env, start_response)
File "/home/
return self.app(env, start_response)
File "/home/
1, 2, True)
File "/home/
raise ValueError('Invalid path: %s' % quote(path))
ValueError: Invalid path: //
^ auth middleware line 86