Skip to content

Commit

Permalink
Marking password parameter in Database connector with SensitiveParame…
Browse files Browse the repository at this point in the history
…ter attribute (#53580)
  • Loading branch information
philo23 authored Nov 19, 2024
1 parent e8c9f0a commit fcbd9b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Connectors/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit fcbd9b1

Please sign in to comment.