Skip to content

fix: persist errormail throttle state via setConfig instead of getConfig#6534

Merged
gharlan merged 1 commit into
6.xfrom
fix/mailer-errormail-setconfig
May 31, 2026
Merged

fix: persist errormail throttle state via setConfig instead of getConfig#6534
gharlan merged 1 commit into
6.xfrom
fix/mailer-errormail-setconfig

Conversation

@gharlan
Copy link
Copy Markdown
Member

@gharlan gharlan commented May 31, 2026

Problem

In Mailer::errorMail() wurden der Hash der letzten Fehler und der Sende-Zeitstempel mit getConfig statt setConfig gespeichert:

Core::getConfig('phpmailer_last_errors', $currentErrorsHash);
Core::getConfig('phpmailer_last_log_file_send_time', time());

Dadurch wurden die Werte nie persistiert – das zweite Argument wird von getConfig lediglich als Default-Wert interpretiert und verworfen. Die kombinierte Zeit-/Inhalts-Drosselung beim Versand von Fehler-Mails lief damit faktisch ins Leere.

Ursache

Eingeschleppt in #5894, als das PhpMailer-Addon in den Core aufgelöst wurde. Im Original-Addon war es noch korrekt $addon->setConfig(...); beim Umbau auf die rex::-Config-API ist set zu get verrutscht.

Fix

Beide Aufrufe auf setConfig korrigiert.

The errormail throttling stored the last error hash and send time with
getConfig instead of setConfig, so the values were never persisted and
the time-/content-based throttling never took effect.

Introduced in #5894 when the phpmailer addon was dissolved into core.
@gharlan gharlan added this to the REDAXO 6.0 milestone May 31, 2026
@rex-bot rex-bot added the bug label May 31, 2026
@gharlan gharlan merged commit 63542e8 into 6.x May 31, 2026
16 checks passed
@gharlan gharlan deleted the fix/mailer-errormail-setconfig branch May 31, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants