kopia lustrzana https://github.com/c9/core
validate `file` option
rodzic
dcd8e9df98
commit
d195ab7317
|
@ -84,6 +84,9 @@ module.exports = function(vfs, options) {
|
||||||
if (!options.file)
|
if (!options.file)
|
||||||
return callback(new error.Forbidden("Option 'file' is missing"));
|
return callback(new error.Forbidden("Option 'file' is missing"));
|
||||||
|
|
||||||
|
if (typeof options.file != "string")
|
||||||
|
return callback(new error.Forbidden("Invalid option 'file'"));
|
||||||
|
|
||||||
if (extendDirectory) {
|
if (extendDirectory) {
|
||||||
var file = options.file = path.normalize(path.join(extendDirectory, options.file));
|
var file = options.file = path.normalize(path.join(extendDirectory, options.file));
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue