[tor-bugs] #6955 [Onionoo]: Illegal value for type parameter leads to uncaught exception in Pyonionoo
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Sun Sep 23 19:16:48 UTC 2012
#6955: Illegal value for type parameter leads to uncaught exception in Pyonionoo
---------------------+------------------------------------------------------
Reporter: karsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Onionoo | Version:
Keywords: | Parent:
Points: | Actualpoints:
---------------------+------------------------------------------------------
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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6955>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list