Dev #32

Merged
NiekRabelink merged 2 commits from dev into main 2026-09-10 10:50:23 +00:00
2 changed files with 14 additions and 5 deletions
Showing only changes of commit ffc824f27c - Show all commits
+14 -5
View File
@@ -53,12 +53,21 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Verstuur herstelmail via de nieuwe FocizMailer
$mailResult = FocizMailer::sendPasswordResetEmail($user['email'], $user['name'], $resetUrl);
if (!$mailResult['success']) {
error_log("Fout bij verzenden wachtwoordherstel mail naar {$email}: " . ($mailResult['error'] ?? 'Onbekend'));
}
}
// Anti-enumeratie: Toon altijd succes ongeacht of het e-mailadres bestaat
$errMsg = $mailResult['error'] ?? 'Mailserver fout';
error_log("Fout bij verzenden wachtwoordherstel mail naar {$email}: {$errMsg}");
$error = "De herstelmail kon niet worden verzonden via de mailserver: " . htmlspecialchars($errMsg);
} else {
$submitted = true;
}
} else {
// In development omgeving geven we directe diagnostische feedback
if (defined('APP_ENV') && APP_ENV === 'development') {
$error = "Er is geen Fociz account gevonden met het e-mailadres '{$email}'. Controleer of dit e-mailadres correct is ingevoerd.";
} else {
// Anti-enumeratie op productie: toon altijd succes
$submitted = true;
}
}
} catch (Throwable $e) {
error_log("Wachtwoord vergeten fout: " . $e->getMessage());
+1 -1
View File
@@ -136,7 +136,7 @@ define('SMTP_PORT', (int)fociz_env('SMTP_PORT', 587));
define('SMTP_USER', fociz_env('SMTP_USER', 'info@fociz.nl'));
define('SMTP_PASS', fociz_env('SMTP_PASS', '6swpQSBg5uWFmjar7F6a'));
define('SMTP_SECURE', fociz_env('SMTP_SECURE', 'tls')); // 'tls' (STARTTLS port 587) of 'ssl' (port 465)
define('SMTP_FROM_EMAIL', fociz_env('SMTP_FROM_EMAIL', 'no-reply@fociz.nl'));
define('SMTP_FROM_EMAIL', fociz_env('SMTP_FROM_EMAIL', 'info@fociz.nl'));
define('SMTP_FROM_NAME', fociz_env('SMTP_FROM_NAME', 'Fociz'));
define('SMTP_REPLY_TO', fociz_env('SMTP_REPLY_TO', 'info@fociz.nl'));