summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-08-27 16:07:53 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-08-27 19:42:10 -0300
commit2b7fb76995905f0c91b39d95e49831da67d86cb0 (patch)
tree9d0f98151c786897bea46135482541c60fd7a71a /etc
parentd47fac4a6ffef04e55884ada3066b532e765ba88 (diff)
downloadpfsense-2b7fb76995905f0c91b39d95e49831da67d86cb0.zip
pfsense-2b7fb76995905f0c91b39d95e49831da67d86cb0.tar.gz
Do not use regex to check filetype to avoid being wrong since . is a regex metachar. It fixes #3817
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pkg-utils.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 417d6b3..923d130 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -293,6 +293,7 @@ function get_pkg_depends($pkg_name, $filetype = ".xml", $format = "files", $retu
$depend_file = substr(strrchr($item['item']['0'], '/'),1); // Strip URLs down to filenames.
$depend_name = substr(substr($depend_file,0,strpos($depend_file,".")+1),0,-1); // Strip filename down to dependency name.
if (($filetype != "all") && (!preg_match("/{$filetype}/i", $depend_file)))
+ if (($filetype != "all") && (strtolower(substr($depend_file, -strlen($filetype))) != strtolower($filetype)))
continue;
if ($item['prefix'] != "")
$prefix = $item['prefix'];
OpenPOWER on IntegriCloud