Skip to content

Commit

Permalink
[TASK] Improve httpProxy setting validation regex
Browse files Browse the repository at this point in the history
  • Loading branch information
rtp-cgs committed Jan 9, 2024
1 parent b597530 commit ba2156e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/RequestMethod/CurlPostWithProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function injectSettings(array $settings)
$httpProxy = $settings['httpProxy'];
$this->emitHttpProxyRetrieved($httpProxy);

$formatIsValid = preg_match('@(.*):(\d{1,5})@', $httpProxy, $httpProxyParts);
$formatIsValid = preg_match('@^(.*):(\d{1,5})$@', $httpProxy, $httpProxyParts);
$this->proxyHost = $httpProxyParts[1];
$this->proxyPort = (int)$httpProxyParts[2];

Expand Down

0 comments on commit ba2156e

Please sign in to comment.