Skip to content

Commit 49ef9b9

Browse files
committed
AC-9913: Configuration url validation
1 parent 4ff8b0f commit 49ef9b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Usps/Model/Config/Backend/UspsUrl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function beforeSave()
6666
// phpcs:ignore Magento2.Functions.DiscouragedFunction
6767
$host = parse_url((string)$this->getValue(), \PHP_URL_HOST);
6868

69-
if (!empty($host) && !preg_match("/(?:.+\.|^)usps|shippingapis\.com$/i", $host)) {
69+
if (!empty($host) && !preg_match("/(?:.+\.|^)(usps|shippingapis)\.com$/i", $host)) {
7070
throw new ValidatorException(__('USPS API endpoint URL\'s must use usps.com or shippingapis.com'));
7171
}
7272
}

0 commit comments

Comments
 (0)