summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-12-22 16:28:50 +0000
committerTed Trask <ttrask01@yahoo.com>2009-12-22 16:28:50 +0000
commitcc1fca725c652ac4823da6a294188503079196c9 (patch)
tree4d9af4bf80c277c526dc1657ab6b8293aab2709b /lib
parent8dc0bbaefbfe43ad4cc4eb027b391827d2cb5bf3 (diff)
downloadacf-core-cc1fca725c652ac4823da6a294188503079196c9.tar.bz2
acf-core-cc1fca725c652ac4823da6a294188503079196c9.tar.xz
Fixed bug in is_valid_filename when restriction has magic characters.
Diffstat (limited to 'lib')
-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