summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/validator.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/validator.lua b/lib/validator.lua
index a7e807f..ca8ed41 100755
--- a/lib/validator.lua
+++ b/lib/validator.lua
@@ -165,7 +165,7 @@ function is_port(numstr)
end
function is_valid_filename ( path, restriction )
- if not (path) or ((restriction) and (string.find (path, "^" .. restriction ) == nil or string.find (path, "/", #restriction+2) )) then
+ if not (path) or ((restriction) and (string.find (path, "^" .. format.escapemagiccharacters(restriction) ) == nil or string.find (path, "/", #restriction+2) )) then
return false
end
return true