summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2016-01-13 14:19:35 +0100
committerChristian Schneider2016-01-13 14:19:35 +0100
commit9fe04aea4c1b245a8f8750729df826b82bdedde4 (patch)
treecfb138167dd42b167ce14bf8962f6edb0f724db7
parent14a2baa53b557c22d6fe4abca6864699c3161b72 (diff)
downloaditools-9fe04aea4c1b245a8f8750729df826b82bdedde4.tar.gz
itools-9fe04aea4c1b245a8f8750729df826b82bdedde4.tar.bz2
itools-9fe04aea4c1b245a8f8750729df826b82bdedde4.zip
Anchor regex for my peace of mind
-rw-r--r--itjs.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/itjs.class b/itjs.class
index 45b68de..0a57465 100644
--- a/itjs.class
+++ b/itjs.class
@@ -133,10 +133,10 @@ static function filenames($filelist)
foreach (it::match("[-\w.=?&]+", basename($filelist), array('all' => true)) as $file) # split by comma but ignore illegal chars
{
- $filenames = $special[$file] ?: (file_exists("$local/" . it::match('[^?]*', $file)) ? "$local/$file" : "$libsearch/itjs/$file");
+ $filenames = $special[$file] ?: (file_exists("$local/" . it::match('^[^?]*', $file)) ? "$local/$file" : "$libsearch/itjs/$file");
foreach (explode(",", $filenames) as $filename)
- if (!$seen[$filename]++ && file_exists(it::match('[^?]*', $filename)))
+ if (!$seen[$filename]++ && file_exists(it::match('^[^?]*', $filename)))
$result[] = $filename;
}