diff options
Diffstat (limited to 'lib/validator.lua')
-rwxr-xr-x | lib/validator.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/validator.lua b/lib/validator.lua index afea72c..69797fb 100755 --- a/lib/validator.lua +++ b/lib/validator.lua @@ -217,7 +217,7 @@ function is_port(numstr) end function is_valid_filename ( path, restriction ) - if not (path) or ((restriction) and (string.find (path, "^" .. restriction ) == nil)) then + if not (path) or ((restriction) and (string.find (path, "^" .. restriction ) == nil or string.find (path, "/", #restriction+2) )) then return false, "* " .. validator.msg.err.FileInvalidPath1[lang.Current] .. "\n* ".. validator.msg.err.FileInvalidPath2[lang.Current] .. ":" .. string.format(restriction) end |