Show More
@@ -304,11 +304,11 b' class AuthenticatedFileHandler(IPythonHandler, web.StaticFileHandler):' | |||||
304 |
|
304 | |||
305 | # check UF_HIDDEN on any location up to root |
|
305 | # check UF_HIDDEN on any location up to root | |
306 | path = absolute_path |
|
306 | path = absolute_path | |
307 | while path and path.startswith(absolute_root): |
|
307 | while path and path.startswith(absolute_root) and path != absolute_root: | |
308 | st = os.stat(path) |
|
308 | st = os.stat(path) | |
309 | if getattr(st, 'st_flags', 0) & UF_HIDDEN: |
|
309 | if getattr(st, 'st_flags', 0) & UF_HIDDEN: | |
310 | raise web.HTTPError(403) |
|
310 | raise web.HTTPError(403) | |
311 |
path |
|
311 | path = os.path.dirname(path) | |
312 |
|
312 | |||
313 | return absolute_path |
|
313 | return absolute_path | |
314 |
|
314 |
General Comments 0
You need to be logged in to leave comments.
Login now