From 5212b91ccaec8fab1c5cc60b0816eec1dff9b94e Mon Sep 17 00:00:00 2001 From: Mitsukarenai Date: Tue, 16 Aug 2016 00:00:33 +0200 Subject: [PATCH] [whitelist] trim content for wildcard (contrib: @Piokaz) --- lib/Bridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Bridge.php b/lib/Bridge.php index c3f76ae..b943158 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -316,7 +316,7 @@ class Bridge{ return $listBridge; } static function isWhitelisted( $whitelist, $name ) { - if(in_array("$name", $whitelist) or in_array("$name.php", $whitelist) or count($whitelist) === 1 and $whitelist[0] === '*') + if(in_array("$name", $whitelist) or in_array("$name.php", $whitelist) or count($whitelist) === 1 and trim($whitelist[0]) === '*') return TRUE; else return FALSE;