Upload via GUI (267 Dateien)
This commit is contained in:
@@ -35,16 +35,16 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$pass = $_POST['password'] ?? '';
|
||||
if (!rate_limit_check('staff_login_attempt', client_ip(), 10, 15)) {
|
||||
$errors[] = 'Zu viele Anmeldeversuche. Bitte versuchen Sie es in einigen Minuten erneut.';
|
||||
} elseif ($email && !rate_limit_check('staff_login_email', $email, 5, 15)) {
|
||||
} elseif ($email && !rate_limit_check('staff_login_email', strtolower($email), 5, 15)) {
|
||||
// Konto-basierte Sperre – verhindert Brute-Force über wechselnde IPs
|
||||
$errors[] = 'Zu viele Anmeldeversuche für dieses Konto. Bitte warten Sie einige Minuten.';
|
||||
} else {
|
||||
$stmt = get_db()->prepare('SELECT * FROM staff WHERE email = ? AND is_active = 1');
|
||||
$stmt = get_db()->prepare('SELECT * FROM staff WHERE LOWER(email) = LOWER(?) AND is_active = 1');
|
||||
$stmt->execute([$email]);
|
||||
$staff = $stmt->fetch();
|
||||
if ($staff && password_verify($pass, $staff['password_hash'])) {
|
||||
// Erfolgreicher Login – Zähler zurücksetzen
|
||||
rate_limit_reset('staff_login_email', $email);
|
||||
rate_limit_reset('staff_login_email', strtolower($email));
|
||||
if ($staff['totp_enabled']) {
|
||||
$_SESSION['totp_pending_staff_id'] = $staff['id'];
|
||||
$need2fa = true;
|
||||
@@ -79,7 +79,7 @@ $displayName = get_setting('display_name', config()['site']['name']);
|
||||
<?php endif; ?>
|
||||
<link rel="manifest" href="/manifest-staff.php">
|
||||
<meta name="theme-color" content="#0f6f6a">
|
||||
<?php if ($logo): ?><link rel="icon" href="<?= e($logo) ?>"><?php endif; ?>
|
||||
<?= site_icon_links() ?>
|
||||
<script>if('serviceWorker' in navigator){navigator.serviceWorker.register('/sw.js').catch(function(){});}</script>
|
||||
</head>
|
||||
<body class="login-page staff-login-page" style="margin:0; display:flex; flex-direction:column; min-height:100vh; background:#16202a <?php if($banner): ?>; background-image:url('<?= e($banner) ?>'); background-size:cover; background-position:center<?php endif; ?>">
|
||||
@@ -90,7 +90,9 @@ $displayName = get_setting('display_name', config()['site']['name']);
|
||||
<?php if ($logo): ?>
|
||||
<img src="<?= e($logo) ?>" alt="" style="height:32px; width:auto">
|
||||
<?php endif; ?>
|
||||
<span style="color:#fff; font-weight:700; font-size:.95rem"><?= e($displayName) ?></span>
|
||||
<?php if (!$logo || get_setting('logo_hide_name', '0') !== '1'): ?>
|
||||
<span style="color:#fff; font-weight:700; font-size:.95rem"><?= e($displayName) ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<a href="/login.php" style="color:rgba(255,255,255,.5); font-size:.8rem; text-decoration:none">← Zum Kundenportal</a>
|
||||
</header>
|
||||
@@ -125,9 +127,9 @@ $displayName = get_setting('display_name', config()['site']['name']);
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="action" value="login">
|
||||
<label for="email">E-Mail-Adresse</label>
|
||||
<input type="email" id="email" name="email" required autofocus autocomplete="email">
|
||||
<input type="email" id="email" name="email" required autofocus autocomplete="email" autocapitalize="none" autocorrect="off" spellcheck="false">
|
||||
<label for="password">Passwort</label>
|
||||
<input type="password" id="password" name="password" required autocomplete="current-password">
|
||||
<input type="password" id="password" name="password" required autocomplete="current-password" autocapitalize="none" autocorrect="off" spellcheck="false">
|
||||
<div style="text-align:right; margin-top:6px">
|
||||
<a href="/staff/forgot_password.php" style="font-size:.8rem">Passwort vergessen?</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user