Permalink
Browse files

unescape urls

Change-Id: I1247b2fc8183ddd1a1d8a89d7c5833fc928f0534
  • Loading branch information...
1 parent 1fe551c commit 48212b1c0162a28e788ccda3a5fa92cd0202f533 Tim Caswell committed Feb 12, 2011
Showing with 5 additions and 4 deletions.
  1. +1 −1 listing.js
  2. +3 −2 package.json
  3. +1 −1 static.js
View
@@ -8,7 +8,7 @@ var ENOENT = process.ENOENT || require('constants').ENOENT;
// Super simple static file server
module.exports = function setup(mount, root) {
return function (req, res, next) {
- var path = Url.parse(req.url).pathname.replace(/\.\.+/g, '.');
+ var path = unescape(Url.parse(req.url).pathname).replace(/\.\.+/g, '.');
if (!path || path.substr(0, mount.length) !== mount) {
return next();
}
View
@@ -2,7 +2,7 @@
"name": "creationix",
"description": "Creationix is a meta package for my personal packages",
"tags": ["stack", "creationix", "meta", "sandbox"],
- "version": "0.0.6",
+ "version": "0.0.9",
"author": "Tim Caswell <tim@creationix.com>",
"repository": {
"type": "git",
@@ -13,7 +13,8 @@
"auth": "auth.js",
"listing": "listing.js",
"mount": "mount.js",
- "log": "log.js"
+ "log": "log.js",
+ "controllers": "controllers.js"
},
"dependencies": {
"stack": ">=0.0.3",
View
@@ -26,7 +26,7 @@ if (!process.EventEmitter.prototype.hasOwnProperty('once')) {
// Super simple static file server
module.exports = function setup(mount, root, index) {
return function (req, res, next) {
- var path = Url.parse(req.url).pathname.replace(/\.\.+/g, '.');
+ var path = unescape(Url.parse(req.url).pathname).replace(/\.\.+/g, '.');
if (!path || path.substr(0, mount.length) !== mount) {
return next();
}

0 comments on commit 48212b1

Please sign in to comment.