Skip to content

Commit

Permalink
fix security problem (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-niessner authored Nov 19, 2020
1 parent e607e63 commit 64c0886
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Python/dawgie/fe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,13 @@ def __init__ (self, name):
return

def getChild (self, path, request):
msg = request.uri.decode() if os.environ.get('DAWGIE_FE_DEBUG','') else 'DAWGIE_FE_DEBUG'
return twisted.web.resource.ErrorPage(404,
'Could not locate requested URI',
'<p>%(my_name)s.getChild().name: %(name)s<br>%(my_name)s.getChild().request.uri: %(uri)s</p>' %
{'my_name':self.__name,
'name': path.decode(),
'uri':request.uri.decode()})
'uri':msg})
pass

class StaticContent(twisted.web.resource.Resource):
Expand Down

0 comments on commit 64c0886

Please sign in to comment.