Permalink
Browse files

Fixing security vulnerability reported by Francois Harvey (http://fra…

  • Loading branch information...
1 parent 6999abf commit d0778e5974d2cc010a165bdac9afe4d6ad0975d6 @farhadi committed Oct 31, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 smartoptimizer/index.php
View
@@ -126,7 +126,7 @@ function filesmtime() {
} else $files = array($fileNames);
foreach ($files as $key => $file) {
- if (preg_match('/\.([a-z0-9]+)$/i', $file, $matchResult)) {
+ if (preg_match('/^[^\x00]+\.([a-z0-9]+)$/i', $file, $matchResult)) {
$fileTypes[] = strtolower($matchResult[1]);
} else debugExit("Unsupported file ($file)");

0 comments on commit d0778e5

Please sign in to comment.