From 90cb5a2f9bf0145326afdcd95665f333ad7f435b Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Thu, 1 Sep 2022 15:52:33 +0200 Subject: [PATCH] Mark passwords and URIs as `#[\SensitiveParameter]` (PHP 8.2+) --- src/ProxyConnector.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ProxyConnector.php b/src/ProxyConnector.php index a3dc166..165e8ba 100644 --- a/src/ProxyConnector.php +++ b/src/ProxyConnector.php @@ -57,8 +57,12 @@ class ProxyConnector implements ConnectorInterface * @param array $httpHeaders Custom HTTP headers to be sent to the proxy. * @throws InvalidArgumentException if the proxy URL is invalid */ - public function __construct($proxyUrl, ConnectorInterface $connector = null, array $httpHeaders = array()) - { + public function __construct( + #[\SensitiveParameter] + $proxyUrl, + ConnectorInterface $connector = null, + array $httpHeaders = array() + ) { // support `http+unix://` scheme for Unix domain socket (UDS) paths if (preg_match('/^http\+unix:\/\/(.*?@)?(.+?)$/', $proxyUrl, $match)) { // rewrite URI to parse authentication from dummy host