Sicherheitsupdate nach Audit (0.29.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m50s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m34s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m45s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m30s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m7s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m9s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m8s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m5s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 48s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m5s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m50s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m34s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m45s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m30s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m7s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m9s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m8s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m5s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 48s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m5s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a37895a16a
commit
f1202bea08
226 changed files with 1952 additions and 450 deletions
|
|
@ -51,6 +51,12 @@ class IdentitySync
|
|||
? User::query()->where('email', $email)->first()
|
||||
: null;
|
||||
|
||||
// Konten mit Passwort oder Backend-Rechten nur verknüpfen, wenn die Adresse verlässlich
|
||||
// ist – sonst könnte, wer beim Anbieter seine E-Mail ändern kann, fremde Konten übernehmen.
|
||||
if ($user && ($user->password !== null || $user->canAccessAdmin()) && ! $this->emailTrusted($provider, $profile)) {
|
||||
throw new IdentityException('Für diese E-Mail-Adresse gibt es bereits ein Portal-Konto. Bitte melden Sie sich mit Ihrem Passwort an oder bitten Sie die Administration, die Anmeldung freizuschalten.');
|
||||
}
|
||||
|
||||
if (! $user) {
|
||||
if (! $allowCreate) {
|
||||
return null;
|
||||
|
|
@ -254,6 +260,19 @@ class IdentitySync
|
|||
return array_values(array_unique($desired));
|
||||
}
|
||||
|
||||
/**
|
||||
* Stammt die E-Mail-Adresse sicher von der Person? Microsoft Entra ID prüft Adressen,
|
||||
* OIDC meldet es per „email_verified“, sonst entscheidet die Administration je Anbieter.
|
||||
*
|
||||
* @param array<string, mixed> $profile
|
||||
*/
|
||||
private function emailTrusted(IdentityProvider $provider, array $profile): bool
|
||||
{
|
||||
return $provider->type === 'entra'
|
||||
|| ($profile['email_verified'] ?? false) === true
|
||||
|| (bool) $provider->setting('trust_email', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Konto wurde beim Anbieter deaktiviert oder gelöscht: im Portal deaktivieren
|
||||
* und die Rollen aus diesem Anbieter entfernen.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue