Stored TOTP-exception and application-password descriptions bypass PFASmarty escaping on maintained 4.x, allowing mailbox-controlled markup to execute when a global administrator views the lists. Both controllers
now use the existing recursive HTML escaping so stored descriptions render as text, including records already in the database.
thanks @TrapoSAMA
postfixadmin 4.0 does not pass user supplied keys as SQL column names, so is not vulnerable - this just provides a bit of defense in depth.
cherry picked from commit 317696013fe3a0c0b1135af0418f94d20599a5ef; test adjusted for 4.0's domain alias limit
Port the final merged behavior of #1150 to `postfixadmin_4.0`, completing the wording-only port in #1152 (discussion #886).
Alias destinations with no matching local record within the administrator's managed domains are marked red; destinations outside those domains are marked blue without inspecting another administrator's
records. Mixed destinations can show both indicators.
thanks @TrapoSAMA
After TOTP activation, the 4.x template hides the form with `visibility:hidden` but keeps its height, leaving the configured notice below a large empty area.
See also #1166 (master), thanks @TrapoSAMA
when a user is part way through an MFA login (username/password auth done, but not the MFA bit),
authentication_get_username() will return their current username. This function is used in various other places
and historically it was a suitable check to determine if someone was also authenticated.
Commit updates authentication_get_username() to include a call to authentication_mfa_incomplete() by default, the only exclusion being on the login-mfa.php pages.
Thanks to Wenhao Wu (Southeast University) for the security report "MFA-incomplete (password-only) mailbox session can rewrite its own alias forwarding via /edit.php (CWE-308)"
Ports #1150 to `postfixadmin_4.0` and addresses discussion #886.
An alias destination absent from local records can be a valid external
address. Replace the misleading “maybe UNDELIVERABLE” label with
“Possible external destination” and add the short tooltip “Not listed as
a local destination.” English and Spanish wording matches #1150.
thanks @TrapoSAMA
Require a completed authenticated role for TOTP management and verify the current password before removing a TOTP secret.
See #1129 and #1128
thanks @TrapoSAMA
Limit the Roundcube preference update to the selected user and prevent serialized preferences from instantiating classes.
This ports PR #1133 with PHP 7.4 compatibility and validates the script arguments before accessing them.
Refs #1128
Thanks @TrapoAMA
Require a validated canonical site_url for recovery links, keep responses uniform, and persist a five-minute per-account request limit.
This ports the behavior of PR #1130 while preserving PHP 7.4 compatibility and the 4.x database boolean handling.
Refs #1128
Thanks @TrapoSAMA
Reject password-only XML-RPC authentication for mailbox accounts that require TOTP while preserving existing behavior for accounts without TOTP.
This ports PR #1131 with PHP 7.4 compatibility and includes the documented XML-RPC/TOTP limitation requested during master review.
Refs #1128
thanks @TrapoSAMA
Restore default output sanitisation for viewlog records and replace the
inline JavaScript detail popup with native details markup.
This ports PR #1134 while preserving Smarty 3/4 and Bootstrap 3
compatibility.
Refs #1128
Thanks @TrapoSAMA
- restore `md5crypt` as the PostfixAdmin 3.x-compatible alias for MD5-CRYPT
- verify stored unprefixed MD5-CRYPT, prefixed MD5-CRYPT, bcrypt, and SHA512 crypt hashes from their stored format
- document the canonical `MD5-CRYPT` setting, the legacy alias, and the 3.x upgrade implications
This addresses #1123 on `postfixadmin_4.0`. The `master` correction is in #1125 so each maintained branch can be reviewed and tested against its own PHP requirements.
thanks @TrapoSAMA
- port the `doveadm pw` stderr and exit-status handling from #1121 to
`postfixadmin_4.0`
- preserve PHP 7.4-compatible syntax and the branch-specific password flow
- add the same portable regression coverage for password generation and verification
See #1119.
thanks @TrapoSAMA
- add the missing Spanish translation for `pException_ip_error`, which is used by the 4.x TOTP exception flow
- remove the master-only `pDkim_field_domain_and_selector` key from the 4.x Spanish catalog
- restore exact key parity between `languages/en.lang` and `languages/es.lang`
related to #1114
thanks @TrapoSAMA
- port the password-expiration correction to `postfixadmin_4.0`
- make password expiration optional and disabled by default
- make 0 consistently mean that domain passwords do not expire
- validate whole-day policies from 0 through 36500
- align password-change paths and preserve the existing Login fallback
- show mailbox expiration states in lists and CSV output
- add the new labels to every 4.x language file
- document how to enable the feature in `config.local.php`
thanks @TrapoSAMA
- identify TOTP inputs as one-time codes and request numeric keyboards
on supported devices
- keep TOTP digits visible while they are entered
- fix the TOTP input IDs so their labels point to the actual controls
thanks @TrapoSAMA
- distinguish the per-mailbox maximum quota error from insufficient remaining domain quota
- add the domain-quota error message to every language catalog
- add focused coverage for both quota failure causes
see also #1096 (same changes on master).
fix regression in MySQL schema upgrade from 3.3 where vacation.domain, vacation.email and quota2.username had the wrong collation. (Thanks @TrapoSAMA + @knofte)
Restrict recreating $_SESSION to only those where the user has been logged in previously; this should help stop anonymous users from failing a CSRF check.
thanks @TrapoSAMA
- Adds optional Rspamd DKIM post-creation and post-deletion hook examples to the `postfixadmin_4.0` branch.
- Adds a narrow composite domain-deletion wrapper so the mail domain and its DKIM material can be archived together.
- Documents the related `config.local.php` and least-privilege `sudoers` configuration.
- Clarifies that the `sudoers` rules apply across all enabled base and Rspamd hooks.
thanks @TrapoSAMA
- backport only the generic hardening of the existing optional Maildir and Dovecot hook examples
- validate the documented hook argument contracts before constructing filesystem paths
- quote filesystem operations, replace legacy shell constructs and propagate command failures
- make domain and mailbox deletion safely retryable when their target is already absent
- update the Dovecot password example for Dovecot 2.3.19 or newer, with a Dovecot 2.4 setting note
The hooks remain optional and disabled by default. Administrators must review `basedir`, `trashbase` and the service account used by sudo. The mail-crypt password example now requires Dovecot 2.3.19 or newer.
This PR contains corrective UI and Spanish i18n fixes for the 4.0.x
branch.
Fixes included:
- Fix domain list layout stability by adding explicit column classes and
widths.
- Fix horizontal overflow in the domain list so wide tables remain
usable on smaller screens.
- Fix quota bar rendering consistency in domain and mailbox listings.
- Fix action buttons in list views by using compact icon buttons with
title and aria-label attributes.
- Fix top menu spacing and labels so the navigation remains readable in
constrained widths.
- Fix untranslated dashboard/global search labels by adding language
strings.
- Fix Spanish labels and wording used by the affected 4.0.x screens.
- Fix the total quota label shown in the domain list.
Thanks @TrapoSAMA
This backports existing Spanish translations from master to the 4.0.x
Spanish language file, limited to strings that already exist in 4.0.x
and were still untranslated there.
Thanks @TrapoSAMA
This backports the invalid-token/session-expired UX improvement to the 4.0 branch.
When a session expires and an old CSRF token is submitted, PostfixAdmin
currently shows a raw invalid token error.
This change renders a translated session-expired page instead, returning HTTP 419.
thanks @TrapoSAMA