Просмотр исходного кода

Allow non-latin characters in the rootResourcePath

James Allen 11 лет назад
Родитель
Сommit
80382d5c15
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      services/clsi/app/coffee/RequestParser.coffee

+ 2 - 1
services/clsi/app/coffee/RequestParser.coffee

@@ -75,4 +75,5 @@ module.exports = RequestParser =
 		return attribute
 
 	_sanitizePath: (path) ->
-		path.replace(/[^a-zA-Z0-9_\-;.,\/ ]/g, "")
+		# See http://php.net/manual/en/function.escapeshellcmd.php
+		path.replace(/[\#\&\;\`\|\*\?\~\<\>\^\(\)\[\]\{\}\$\\\,\x0A\xFF]/g, "")