Skip to content

Commit

Permalink
Add sensitive data attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed May 29, 2024
1 parent f9cd3e5 commit 3a63cec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/Auth/Source/Hash.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ public function __construct(array $info, array $config)
*
* @throws \SimpleSAML\Error\Error if authentication fails.
*/
protected function login(string $username, string $password): array
{
protected function login(
string $username,
#[\SensitiveParameter]
string $password,
): array {
$cryptoUtils = new Utils\Crypto();
foreach ($this->users as $userpass => $attrs) {
$matches = explode(':', $userpass, 2);
Expand Down
7 changes: 5 additions & 2 deletions src/Auth/Source/Htpasswd.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ public function __construct(array $info, array $config)
*
* @throws \SimpleSAML\Error\Error if authentication fails.
*/
protected function login(string $username, string $password): array
{
protected function login(
string $username,
#[\SensitiveParameter]
string $password,
): array {
$cryptoUtils = new Utils\Crypto();
foreach ($this->users as $userpass) {
$matches = explode(':', $userpass, 2);
Expand Down

0 comments on commit 3a63cec

Please sign in to comment.