Skip to content

Commit

Permalink
Merge branch 'master' of github.com:vivina/node-paperboy
Browse files Browse the repository at this point in the history
Conflicts:
	lib/paperboy.js
  • Loading branch information
sidneyfilho committed Aug 5, 2011
2 parents 221692a + 38d9aef commit d4b5eb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/paperboy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ exports.filepath = function (webroot, url) {
fp = path.normalize(path.join(webroot, (url.match(/\/$/)=='/') ? url+'index.html' : url));
// Sanitize input, make sure people can't use .. to get above webroot
if (/\/|\\$/.test(webroot[webroot.length - 1])) webroot += '/';

if (fp.substr(0, webroot.length) != webroot)
return(['Permission Denied', null]);
else
Expand Down

0 comments on commit d4b5eb5

Please sign in to comment.