diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-12-22 16:28:50 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-12-22 16:28:50 +0000 |
commit | cc1fca725c652ac4823da6a294188503079196c9 (patch) | |
tree | 4d9af4bf80c277c526dc1657ab6b8293aab2709b /lib | |
parent | 8dc0bbaefbfe43ad4cc4eb027b391827d2cb5bf3 (diff) | |
download | acf-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-x | lib/validator.lua | 2 |
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 |