Illegal value for type parameter leads to uncaught exception in Pyonionoo
Asking for type=bridges lead to the following exception on the server and a 500 Internal Server Error response instead of the expected 400 Bad Request.
2012-09-23 20:47:18+0200 [-] [Failure instance: Traceback: <type
'exceptions.ValueError'>: zero length field name in format
/usr/lib/python2.6/dist-packages/twisted/internet/defer.py:
345:errback
/usr/lib/python2.6/dist-packages/twisted/internet/defer.py:
424:_startRunCallbacks
/usr/lib/python2.6/dist-packages/twisted/internet/defer.py:
441:_runCallbacks
/usr/lib/python2.6/dist-packages/twisted/internet/defer.py:
949:gotResult
--- <exception caught here> ---
/usr/lib/python2.6/dist-packages/twisted/internet/defer.py:
891:_inlineCallbacks
/usr/lib/python2.6/dist-packages/twisted/python/failure.py:
338:throwExceptionIntoGenerator
/home/karsten/src/pyonionoo/pyonionoo/handlers/summary.py:
27:get
/usr/lib/python2.6/dist-packages/twisted/python/threadpool.py:
207:_worker
/usr/lib/python2.6/dist-packages/twisted/python/context.py:
59:callWithContext
/usr/lib/python2.6/dist-packages/twisted/python/context.py:
37:callWithContext
/home/karsten/src/pyonionoo/pyonionoo/handlers/summary.py:
32:_get_results
/home/karsten/src/pyonionoo/pyonionoo/handlers/arguments.py:
64:parse
]
2012-09-23 20:47:18+0200 [-] Uncaught exception GET
/summary?type=bridges (127.0.0.1) :: HTTPRequest(protocol='http',
host='localhost:8888', method='GET', uri='/summary?type=bridges',
version='HTTP/1.1', remote_ip='127.0.0.1', body='', headers={'Host':
'localhost:8888', 'Accept': '*/*', 'User-Agent': 'curl/7.21.0
(x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4
libidn/1.15 libssh2/1.2.6'})
2012-09-23 20:47:18+0200 [-] 500 GET /summary?type=bridges (127.0.0.1)
2.29ms
(Added a few line breaks to the output above.)
Asking for an invalid "running" parameter value leads to a similar result. There may be more cases where parameters are not checked as thoroughly as they should.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information