diff options
author | Diogo Baeder <diogobaeder@yahoo.com.br> | 2015-12-17 18:56:43 -0200 |
---|---|---|
committer | Diogo Baeder <diogobaeder@yahoo.com.br> | 2015-12-17 18:56:43 -0200 |
commit | 7be45b6719b98c6973b3a4bf1df67ac1f62f4d25 (patch) | |
tree | f610fc8f2b620ba0c247bca6c57e89790dcc04ea /cherrypy/lib/static.py | |
parent | faed0f5803a1c894c33e6bb9850d42ba91872ab6 (diff) | |
download | cherrypy-git-7be45b6719b98c6973b3a4bf1df67ac1f62f4d25.tar.gz |
Returning HTTP 404 for static serving when the requested path has null bytes
Diffstat (limited to 'cherrypy/lib/static.py')
-rw-r--r-- | cherrypy/lib/static.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cherrypy/lib/static.py b/cherrypy/lib/static.py index a630dae6..a26dd4ac 100644 --- a/cherrypy/lib/static.py +++ b/cherrypy/lib/static.py @@ -49,7 +49,7 @@ def serve_file(path, content_type=None, disposition=None, name=None, try: st = os.stat(path) - except OSError: + except (OSError, TypeError): if debug: cherrypy.log('os.stat(%r) failed' % path, 'TOOLS.STATIC') raise cherrypy.NotFound() |