From 746b97ff171feed772b888e618638b741c2a6616 Mon Sep 17 00:00:00 2001 From: Philip Pryce Date: Tue, 19 Nov 2024 20:25:37 +0000 Subject: [PATCH] Marking password parameter in Database connector with SensitiveParameter attribute --- src/Illuminate/Database/Connectors/Connector.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Database/Connectors/Connector.php b/src/Illuminate/Database/Connectors/Connector.php index dc06068462b8..a40bd2c6b861 100755 --- a/src/Illuminate/Database/Connectors/Connector.php +++ b/src/Illuminate/Database/Connectors/Connector.php @@ -60,7 +60,7 @@ public function createConnection($dsn, array $config, array $options) * @param array $options * @return \PDO */ - protected function createPdoConnection($dsn, $username, $password, $options) + protected function createPdoConnection($dsn, $username, #[\SensitiveParameter] $password, $options) { return version_compare(phpversion(), '8.4.0', '<') ? new PDO($dsn, $username, $password, $options) @@ -79,7 +79,7 @@ protected function createPdoConnection($dsn, $username, $password, $options) * * @throws \Throwable */ - protected function tryAgainIfCausedByLostConnection(Throwable $e, $dsn, $username, $password, $options) + protected function tryAgainIfCausedByLostConnection(Throwable $e, $dsn, $username, #[\SensitiveParameter] $password, $options) { if ($this->causedByLostConnection($e)) { return $this->createPdoConnection($dsn, $username, $password, $options);