Commit Graph
3403 Commits
Author SHA1 Message Date
David Goodwin 59ec8b4f2b github actions build: stop clobbering $PATH in install.sh; add composer validate --no-check-lock before install.sh v4.0.6 postfixadmin-4.0.6 2026-11-06 10:18:27 +00:00
David Goodwin c8b92047a6 Try and update CHANGELOG.TXT adding missing attributions/thanks etc, get ready for 4.0.6 release 2026-11-06 10:02:21 +00:00
Christian Boltz cc8285551c CHANGELOG: Add CVE number for TOTP exception description 2026-11-04 21:25:15 +01:00
Rodrigo Cortés Cano 0a894b0876 [4.x] Fix stored XSS in TOTP-exception and application-password lists (#1186)
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
2026-11-01 16:17:55 +00:00
Rodrigo Cortés Cano 40306e6ea7 Use concise Spanish Backup MX label consistently on 4.x (#1180)
see also #1171 and #1179 (master branch variant of this)

thanks @TrapoSAMA
2026-11-01 10:42:49 +00:00
David Goodwin b82f7184fb silently ignore searching on fields of type pass 2026-10-11 10:26:14 +01:00
David Goodwin 92fe42dd95 ensure sql injection is not possible with user supplied data being used as SQL column names in getPageBrowser - due to 2a6f27c3 / #1127
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
2026-10-11 10:26:14 +01:00
Christian Boltz ba705d1a12 db_where_clause(): fix Exception message
... to mention the correct function name

(cherry picked from commit 047bf192fb)
2026-10-04 23:01:56 +02:00
Rodrigo Cortés Cano d3759ee6c8 Improve Spanish translations (#1171)
Update es.lang

thanks @TrapoSAMA
2026-10-04 09:56:32 +01:00
Rodrigo Cortés Cano 6c7146d2ea Distinguish local and external alias destinations on 4.x (#1168)
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
2026-10-03 14:58:25 +01:00
Rodrigo Cortés Cano 0985ce9d90 Show configured TOTP status and reset action in 4.x (#1167)
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
2026-10-03 11:27:53 +01:00
David GoodwinandCopilot Autofix powered by AI ff41c7dece add space around "." (string concatenation)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-29 12:05:32 +00:00
David Goodwin e16ed06976 fix from #1156, see also 3566e195c1 2026-09-29 12:05:32 +00:00
David Goodwin 54c130f2f0 fix from #1156 2026-09-29 12:05:32 +00:00
David Goodwin 2ee2504e56 should not need to pass in false here, as the init_session should have written mfa_complete to true etc 2026-09-29 12:05:32 +00:00
David Goodwin 77ccefdbf2 fix incomplete MFA logins having the ability to change state
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)"
2026-09-29 12:05:32 +00:00
David Goodwin 02305b0dd5 see #1162 - avoid passing null into explode(), thanks @danielsdadm-commits 2026-09-26 09:25:26 +01:00
Rodrigo Cortés Cano d1457da94f 4.x: improve alias destination status indicators (#1152)
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
2026-09-19 10:26:14 +01:00
Rodrigo Cortés Cano b5198b3ab3 4.x: require reauthentication for TOTP removal (#1135)
Require a completed authenticated role for TOTP management and verify the current password before removing a TOTP secret. 

See #1129 and #1128

thanks @TrapoSAMA
2026-09-16 15:00:47 +01:00
Rodrigo Cortés Cano bc80d14b76 4.x: scope Roundcube TOTP preference updates (#1139)
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
2026-09-02 20:30:36 +01:00
Rodrigo Cortés Cano f29ac152fb 4.x: harden password recovery requests (#1136)
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
2026-09-02 20:29:26 +01:00
Rodrigo Cortés Cano f6a29e570c 4.x: enforce TOTP policy for XML-RPC login (#1137)
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
2026-09-02 20:17:45 +01:00
Rodrigo Cortés Cano 4a23d84ac4 4.x: enforce SMTP protocol state (#1138)
Improve SMTP (see smtp_mail()) - treat unexpected SMTP replies, incomplete writes, and failed TLS
negotiation as delivery failures. 

Refs #1128

thanks @TrapoSAMA
2026-09-02 20:15:54 +01:00
Rodrigo Cortés Cano b07850f2d6 4.x: escape viewlog output by default (#1140)
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
2026-09-02 20:09:20 +01:00
Rodrigo Cortés Cano 852e719183 4.x: fix legacy md5crypt compatibility (#1126)
- 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
2026-08-29 15:11:10 +01:00
Rodrigo Cortés Cano e971465a5a pacrypt - be more tolerant of doveadm output (#1122)
- 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
2026-08-26 09:08:48 +01:00
Rodrigo Cortés Cano 564c47eaa3 Complete reviewed Spanish translations for 4.x (#1117)
Update Spanish translations.

thanks @TrapoSAMA
2026-08-14 10:15:03 +01:00
Rodrigo Cortés Cano 6e98667648 update languages/es.lang (#1115)
- 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
2026-08-12 09:08:40 +01:00
Rodrigo Cortés Cano 6e93d57766 Fix password expiration handling and visibility on 4.x (#1110)
- 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
2026-08-11 09:28:19 +01:00
Rodrigo Cortés Cano 4ed71f0218 Improve TOTP code input semantics (#1106)
- 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
2026-08-10 09:09:58 +01:00
Rodrigo Cortés Cano 3769505e77 Clarify password expiration units on 4.x (#1108)
update the spanish and english password expiration translations to make it clear the units are in days.

thanks @TrapoSAMA
2026-08-09 09:09:37 +01:00
David Goodwin 604a298d6c update CHANGELOG.TXT 2026-08-03 21:22:29 +01:00
Rodrigo Cortés Cano 3bdb75b633 Distinguish mailbox and domain quota validation errors on 4.x (#1097)
- 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).
2026-08-03 21:01:24 +01:00
Rodrigo Cortés Cano 99caaab292 Drop obsolete password expiration SQL (#1099)
Delete password_expiration.sql - no longer needed (covered in existing db migration routines)

thanks @TrapoSAMA
2026-08-02 10:13:06 +01:00
Rodrigo Cortés Cano 75ae036fb8 Update Spanish translations on 4.x (#1101)
update languages/es.lang 

thanks @TrapoSAMA
2026-08-02 10:12:13 +01:00
Rodrigo Cortés Cano a1724aa59a Reconcile 3.3 MySQL upgrades on 4.x (#1088)
fix regression in MySQL schema upgrade from 3.3 where vacation.domain, vacation.email and quota2.username had the wrong collation. (Thanks @TrapoSAMA + @knofte)
2026-07-28 16:25:09 +01:00
Rodrigo Cortés Cano 26c56cf0e8 Keep 4.x login CSRF token stable across repeated GETs (#1087)
Do not recreate the CSRF token in the session if one already exists, this should avoid people seeing an expired CSRF token error
thanks @TrapoSAMA
2026-07-22 08:55:32 +01:00
Rodrigo Cortés Cano bfe0b8cfd0 Avoid restarting anonymous login sessions on 4.x (#1086)
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
2026-07-22 08:51:38 +01:00
Rodrigo Cortés Cano db376c92a4 Document Dovecot 2.4 configuration for 4.0 (#1076)
Add Dovecot 2.4 oriented documentation for the PostfixAdmin 4.0 branch. See also #1075 

thanks @TrapoSAMA
2026-07-20 14:13:38 +01:00
Rodrigo Cortés Cano f5965bc8ba Add optional Rspamd DKIM hook examples (#1081)
- 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
2026-07-19 19:36:53 +01:00
Rodrigo Cortés Cano 510715cef0 Harden optional mailbox hook scripts (#1080)
- 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.
2026-07-19 09:52:50 +01:00
Rodrigo Cortés Cano dcf9318d27 Fix 4.0.x UI layout and Spanish i18n issues (#1077)
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
2026-07-13 08:47:57 +01:00
Rodrigo Cortés Cano ead844eced Improve spanish transation (#1073)
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
2026-07-11 08:20:54 +01:00
David Goodwin 2cb5fe291c add changelog etc for 4.0.5 release postfixadmin-4.0.5 v4.0.5 2026-07-05 14:10:28 +01:00
Rodrigo Cortés Cano 719935d17a Improve error message for expired CSRF token errors
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
2026-07-03 18:38:14 +01:00
David Goodwin 703b62d414 see #1049 - when building a 4.0.x release, include a build for PHP 8.4 as well as 7.4 2026-06-29 09:03:01 +01:00
David Goodwin 3643626ff1 update CHANGELOG etc for 4.0.4 release, add some info for the spomky-labs/otphp issues and why we are ignoring them for 4.0.x postfixadmin-4.0.4 v4.0.4 2026-06-27 11:38:42 +01:00
David Goodwin 3449c278d9 spomky-labs/otphp has two vulnerabilities, there is no php7.4 compatible fix, so ignore them if building on PHP7.4. When installing on PHP 8.1 or above, "composer update" will install a version with fixes (11.4.3 and above) 2026-06-27 11:34:33 +01:00
David Goodwin d57fc2d0f3 when building a release, include composer.lock in the .tar.gz as it does allow us to easily tell what versions of various libraries we have installed 2026-06-27 11:31:02 +01:00
David Goodwin 3db559caa5 start new changelog entry for what might become 4.0.4 2026-06-16 13:19:03 +01:00