From 9e713dba29246babefaa40ef45c4792d2d620158 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Mon, 21 Aug 2017 16:37:01 +0200 Subject: [PATCH] break if a matching trusted host is found fix for https://github.com/yiisoft/yii2/pull/13780#discussion_r134186910 thanks to @krukru ! PR #13780 --- framework/web/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/Request.php b/framework/web/Request.php index b8fa303..c5589b4 100644 --- a/framework/web/Request.php +++ b/framework/web/Request.php @@ -292,7 +292,7 @@ class Request extends \yii\base\Request } if (preg_match($hostRegex, $host) || preg_match($hostRegex, $ip)) { $trustedHeaders = $headers; - continue; + break; } } }