EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Fix method name
Yuriib67616401da3
diff --git a/application/Espo/Classes/FieldValidators/Webhook/Url/NotInternal.php b/application/Espo/Classes/FieldValidators/Webhook/Url/NotInternal.phpindex 35c9f9c48a..f468c25386 100644--- a/application/Espo/Classes/FieldValidators/Webhook/Url/NotInternal.php+++ b/application/Espo/Classes/FieldValidators/Webhook/Url/NotInternal.php@@ -62,7 +62,7 @@ class NotInternal implements Validatorreturn null;}- if (!$this->urlCheck->isUrlAndNotIternal($value)) {+ if (!$this->urlCheck->isUrlAndNotInternal($value)) {return Failure::create();}diff --git a/application/Espo/Core/HttpClient/Client.php b/application/Espo/Core/HttpClient/Client.phpindex 1b99f8ff55..225bf1052d 100644--- a/application/Espo/Core/HttpClient/Client.php+++ b/application/Espo/Core/HttpClient/Client.php@@ -93,7 +93,7 @@ class Client{if (!Util::matchUrlToAddressList($url, $allowed) &&- !$this->urlCheck->isUrlAndNotIternal($url)+ !$this->urlCheck->isUrlAndNotInternal($url)) {throw new NotAllowedInternalHost("Not allowed internal host in '$url'.");}diff --git a/application/Espo/Core/Utils/Security/UrlCheck.php b/application/Espo/Core/Utils/Security/UrlCheck.phpindex c5b7d0ed75..d51694d2a2 100644--- a/application/Espo/Core/Utils/Security/UrlCheck.php+++ b/application/Espo/Core/Utils/Security/UrlCheck.php@@ -43,9 +43,9 @@ class UrlCheck/*** Checks whether it's a URL, and it does not follow to an internal host.*- * @since 9.3.4+ * @since 10.0.8*/- public function isUrlAndNotIternal(string $url): bool+ public function isUrlAndNotInternal(string $url): bool{if (!$this->isUrl($url)) {return false;@@ -60,6 +60,19 @@ class UrlCheckreturn $this->hostCheck->isHostAndNotInternal($host);}++ /**+ * Checks whether it's a URL, and it does not follow to an internal host.+ *+ * @since 9.3.4+ * @deprecated Since 10.0.8.+ * @todo Remove in v10.1.0.+ */+ public function isUrlAndNotIternal(string $url): bool+ {+ return $this->isUrlAndNotInternal($url);+ }+/*** @return ?string[] Null if not a domain name or not a URL.* @internaldiff --git a/application/Espo/Tools/Attachment/UploadUrlService.php b/application/Espo/Tools/Attachment/UploadUrlService.phpindex ed67fe17b8..c69c1ac0ff 100644--- a/application/Espo/Tools/Attachment/UploadUrlService.php+++ b/application/Espo/Tools/Attachment/UploadUrlService.php@@ -67,7 +67,7 @@ class UploadUrlService*/public function uploadImage(string $url, FieldData $data): Attachment{- if (!$this->urlCheck->isUrlAndNotIternal($url)) {+ if (!$this->urlCheck->isUrlAndNotInternal($url)) {throw new ForbiddenSilent("Not allowed URL.");}