From 308ca01b3cd6d0a3c22ef0b25aa0d2cb03bcb328 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 --- services/clsi/app/coffee/StaticServerForbidSymlinks.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/clsi/app/coffee/StaticServerForbidSymlinks.coffee b/services/clsi/app/coffee/StaticServerForbidSymlinks.coffee index 83ca4ca703..1b3cd45836 100644 --- a/services/clsi/app/coffee/StaticServerForbidSymlinks.coffee +++ b/services/clsi/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"