#24460 closed defect (fixed)

Fix unhandled error due to twisted changes in URLPath class

Reported by: isis Owned by: isis
Priority: Medium Milestone:
Component: Obfuscation/BridgeDB Version:
Severity: Normal Keywords: bridgedb-https
Cc: Actual Points:
Parent ID: Points: .2
Reviewer: Sponsor: SponsorM

Description

Not sure when this started happening (probably when we upgraded to Twisted-16.x.x), and it doesn't seem to have any actual effect from the users' point of view, but, on the BridgeDB server, using version 0.6.0, there's this error traceback:

Unhandled Error
Traceback (most recent call last):
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/twisted/protocols/basic.py", line 571, in dataReceived
    why = self.lineReceived(line)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/twisted/web/http.py", line 1688, in lineReceived
    self.allContentReceived()
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/twisted/web/http.py", line 1767, in allContentReceived
    req.requestReceived(command, path, version)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/twisted/web/http.py", line 768, in requestReceived
    self.process()
--- <exception caught here> ---
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/twisted/web/server.py", line 183, in process
    self.render(resrc)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/twisted/web/server.py", line 234, in render
    body = resrc.render(self)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/twisted/web/resource.py", line 250, in render
    return m(request)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.0+0.gb4d32c7.dirty-py2.7.egg/bridgedb/distributors/https/server.py", line 612, in render_POST
    return CaptchaProtectedResource.render_POST(self, request)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.0+0.gb4d32c7.dirty-py2.7.egg/bridgedb/distributors/https/server.py", line 478, in render_POST
    if self.checkSolution(request) is True:
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.0+0.gb4d32c7.dirty-py2.7.egg/bridgedb/distributors/https/server.py", line 538, in checkSolution
    challenge, solution = self.extractClientSolution(request)
  File "/home/bridgedb/virtualenvs/bridgedb/local/lib/python2.7/site-packages/bridgedb-0.6.0+0.gb4d32c7.dirty-py2.7.egg/bridgedb/distributors/https/server.py", line 414, in extractClientSolution
    return redirectTo(request.URLPath(), request)
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/twisted/web/util.py", line 73, in redirectTo
    """ % {'url': nativeString(URL)}
  File "/home/bridgedb/virtualenvs/bridgedb/lib/python2.7/site-packages/twisted/python/compat.py", line 361, innativeString
    raise TypeError("%r is neither bytes nor unicode" % s)
exceptions.TypeError: URLPath(scheme='http', netloc='127.0.0.1:3880', path='/bridges', query='', fragment='') is neither bytes nor unicode

Child Tickets

Change History (1)

comment:1 Changed 16 months ago by isis

Resolution: fixed
Status: newclosed

Fixed in my fix/24460 branch.

Note: See TracTickets for help on using tickets.