diff --git a/plugins/c9.vfs.server/vfs_wrapper.js b/plugins/c9.vfs.server/vfs_wrapper.js index 808f2ff4..8fe1192a 100644 --- a/plugins/c9.vfs.server/vfs_wrapper.js +++ b/plugins/c9.vfs.server/vfs_wrapper.js @@ -83,6 +83,9 @@ module.exports = function(vfs, options) { if (!options.file) return callback(new error.Forbidden("Option 'file' is missing")); + + if (typeof options.file != "string") + return callback(new error.Forbidden("Invalid option 'file'")); if (extendDirectory) { var file = options.file = path.normalize(path.join(extendDirectory, options.file));