Skip to content

Commit

Permalink
sanitize user input
Browse files Browse the repository at this point in the history
  • Loading branch information
yefuwang committed Feb 20, 2016
1 parent 15746ce commit 197d463
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ ImageBuf makes my photo sharing cheap and easy to maintain. Just drop the pics f

## Usage

sudo apt-get install graphicsmagick

node.js app.js OPTIONS

Required Options:
Expand All @@ -39,7 +41,3 @@ node.js app.js OPTIONS

--memoryCacheSize [Size] The amount of memory that ImageBuf uses as a in-memory cache. The format can be: 1024, 1000KB. 128MB, etc.Default: 0





7 changes: 6 additions & 1 deletion lib/localFileServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@
var parentFolder = path.dirname(folder);
if(!fs.existsSync(parentFolder)){
this.log('Parent folder does not exist. Making it');
this.mkdirP(parentFolder);
try {
this.mkdirP(parentFolder);
}
catch(err){
console.log("Error making folder " + parentFolder);
}
}
else{
}
Expand Down

0 comments on commit 197d463

Please sign in to comment.