Explorar o código

[bugfix] trim non-alphanum chars from urls

isundil %!s(int64=9) %!d(string=hai) anos
pai
achega
9d844bf162
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/httpServer.js

+ 1 - 0
src/httpServer.js

@@ -50,6 +50,7 @@ HttpServer.prototype.isRequestPublic = function(url) {
 };
 
 HttpServer.prototype.servePublic = function(url, res) {
+	url.replace(/\W/g, '');
 	var pathTokens = url.split('/')
 		,localPath = './public';