From e584df647a9287b81f7e746cbfcf4205c9ac3bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=81=E7=81=AB=E8=A1=8C=E8=80=85?= Date: Wed, 13 Oct 2021 11:57:07 +0800 Subject: [PATCH] =?UTF-8?q?url=E5=8C=B9=E9=85=8Dshcma?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Utils.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Common/Utils.php b/src/Common/Utils.php index bc1e722..c0df8cd 100644 --- a/src/Common/Utils.php +++ b/src/Common/Utils.php @@ -346,6 +346,9 @@ class Utils public static function isCosUrl($url) { + if (!preg_match('/https?:\/\/.+/i', $url)) { + return false; + } $parseUrl = parse_url($url); $host = $parseUrl['host']; $path = $parseUrl['path']; -- Gitee