Task: Hash user password before storing in session

This commit is contained in:
Björn Fromme
2023-10-21 10:04:59 +02:00
parent 5ac8ea7491
commit e3dc2b22fd
2 changed files with 8 additions and 4 deletions
+3 -3
View File
@@ -44,7 +44,7 @@ class ApiClient
'satz' => ['@typ' => static::TYPE_CUSTOMER_DATA],
'art' => 'Adressdaten',
'email' => $email,
'passwort' => md5($password),
'passwort' => $password,
],
];
@@ -67,7 +67,7 @@ class ApiClient
'satz' => ['@typ' => static::TYPE_CUSTOMER_DATA],
'art' => 'Adressdaten_Ändern',
'email' => $user->getEmail(),
'passwort' => md5($password),
'passwort' => $password,
'idadresse' => $user->getBusProAddressId(),
'adressdaten' => $teamer->toPayload(),
],
@@ -106,7 +106,7 @@ class ApiClient
'satz' => ['@typ' => static::TYPE_CUSTOMER_DATA],
'art' => 'SelektionCRM',
'email' => $email,
'passwort' => md5($password),
'passwort' => $password,
],
];
+5 -1
View File
@@ -46,7 +46,11 @@ class BpnAuthenticator extends AbstractLoginFormAuthenticator implements Authent
public function authenticate(Request $request): Passport
{
$email = trim($request->request->get('_username', ''));
$password = trim($request->request->get('_password', ''));
$passwordPlain = trim($request->request->get('_password', ''));
// Very lame hashing applied here as required by BPN
$password = md5($passwordPlain);
$csrfToken = $request->request->get('_csrf_token', '');
return new SelfValidatingPassport(