From 95312f9c09cc6f1ecfd441a453c6511e82aa59cb Mon Sep 17 00:00:00 2001 From: raphael Date: Tue, 13 Jul 2021 00:11:23 +0200 Subject: [PATCH] fix code styling --- scripts/s_whiteboard.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/s_whiteboard.js b/scripts/s_whiteboard.js index a543bec..2e2d43f 100644 --- a/scripts/s_whiteboard.js +++ b/scripts/s_whiteboard.js @@ -148,7 +148,10 @@ module.exports = { //read saved board from file var fileName = wid + ".json"; var filePath = FILE_DATABASE_FOLDER + "/" + fileName; - if(path.dirname(filePath) !== FILE_DATABASE_FOLDER || path.basename(fileName) !== fileName) { + if ( + path.dirname(filePath) !== FILE_DATABASE_FOLDER || + path.basename(fileName) !== fileName + ) { var errorMessage = "Attempted path traversal attack: "; console.log(errorMessage, filePath); throw new Error(errorMessage + filePath);