Skip to content

Commit fcbd9b1

Browse files
authored
Marking password parameter in Database connector with SensitiveParameter attribute (#53580)
1 parent e8c9f0a commit fcbd9b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Database/Connectors/Connector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function createConnection($dsn, array $config, array $options)
6060
* @param array $options
6161
* @return \PDO
6262
*/
63-
protected function createPdoConnection($dsn, $username, $password, $options)
63+
protected function createPdoConnection($dsn, $username, #[\SensitiveParameter] $password, $options)
6464
{
6565
return version_compare(phpversion(), '8.4.0', '<')
6666
? new PDO($dsn, $username, $password, $options)
@@ -79,7 +79,7 @@ protected function createPdoConnection($dsn, $username, $password, $options)
7979
*
8080
* @throws \Throwable
8181
*/
82-
protected function tryAgainIfCausedByLostConnection(Throwable $e, $dsn, $username, $password, $options)
82+
protected function tryAgainIfCausedByLostConnection(Throwable $e, $dsn, $username, #[\SensitiveParameter] $password, $options)
8383
{
8484
if ($this->causedByLostConnection($e)) {
8585
return $this->createPdoConnection($dsn, $username, $password, $options);

0 commit comments

Comments
 (0)