mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
404 for hidden files to not revleal their existence.
This commit is contained in:
parent
7ab69652ea
commit
0c794b5d2c
@ -266,7 +266,7 @@ class AuthenticatedFileHandler(IPythonHandler, web.StaticFileHandler):
|
||||
abs_path = super(AuthenticatedFileHandler, self).validate_absolute_path(root, absolute_path)
|
||||
abs_root = os.path.abspath(root)
|
||||
if is_hidden(abs_root, abs_path):
|
||||
raise web.HTTPError(403)
|
||||
raise web.HTTPError(404)
|
||||
return abs_path
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user