From fe46a96fd2473fbbf62433a716fa9efb5d9a3aae Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 31 Mar 2016 11:14:39 +0100 Subject: [PATCH] don't log missing files as warnings, but do report file access errors --- app/coffee/StaticServerForbidSymlinks.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/coffee/StaticServerForbidSymlinks.coffee b/app/coffee/StaticServerForbidSymlinks.coffee index 83ca4ca..1b3cd45 100644 --- a/app/coffee/StaticServerForbidSymlinks.coffee +++ b/app/coffee/StaticServerForbidSymlinks.coffee @@ -29,10 +29,10 @@ module.exports = ForbidSymlinks = (staticFn, root, options) -> # check that the requested path is not a symlink fs.realpath requestedFsPath, (err, realFsPath)-> if err? - logger.warn err:err, requestedFsPath:requestedFsPath, realFsPath:realFsPath, path: req.params[0], project_id: req.params.project_id, "error checking file access" if err.code == 'ENOENT' return res.sendStatus(404) else + logger.error err:err, requestedFsPath:requestedFsPath, realFsPath:realFsPath, path: req.params[0], project_id: req.params.project_id, "error checking file access" return res.sendStatus(500) else if requestedFsPath != realFsPath logger.warn requestedFsPath:requestedFsPath, realFsPath:realFsPath, path: req.params[0], project_id: req.params.project_id, "trying to access a different file (symlink), aborting"