Commit Graph
22 Commits
Author SHA1 Message Date
David Goodwin ae85e51f6e Security fixes (master only) (#1165)
Someone wishing to remain anonymous emailed @cboltz a number of security issues, summarised below.

1. fix sql injection bug in getPageBrowser - search keys bypass the field filter, due to 2a6f27c3 / #1127
2. when performing a password change, do not start the session before the new password has been validated for compexity etc - as things stand someone with a recovery code gets logged in even if their password gets
rejected. Also invalid recovery code on failure.
3. broadcast-message.php was using smtp_mail() with incorrect args, and passing the SMTP password in as the mail body. - probably related to commit 7f1d78e and 42a664e9c2
4. a regular (non-admin) user could submit an arbitrary username in the POST data and create/edit a TOTP exception for another user or entire domain

PR includes refactoring of the password change code (into PasswordChangeAttempt) to make it easier to test/verify.
2026-10-17 09:27:59 +01:00
Rodrigo Cortés Cano 852cb6fb39 Test user alias creation guard directly 2026-07-22 18:13:16 +00:00
Rodrigo Cortés Cano 3ab0104d1a Address forwarding editor review feedback 2026-07-22 18:13:16 +00:00
Rodrigo Cortés Cano 8d631d2ce8 Skip internal vacation target validation 2026-07-22 18:13:16 +00:00
Rodrigo Cortés Cano 9a9078ce21 Unify user and admin forwarding editor 2026-07-22 18:13:16 +00:00
David Goodwin 94d8ffcf78 squash merge #1058 - add the ability to bulk delete forwards from the alias list, thanks @knofte
see https://github.com/postfixadmin/postfixadmin/pull/1058
2026-07-07 21:22:33 +01:00
Kent Riboe a400db12dc Add active-status filter to the alias (forwards) list (#1038) (#1056)
Adds a **Forward status: All / Active / Inactive** selector above the
alias (forwards) list in the domain overview (`list-virtual.php`). 

see #1038, thanks @knofte
2026-07-07 20:44:43 +01:00
Justin Warren 2469e045d8 Add 'description' field to alias and alias_domain tables. (#1042)
Adds a `description` field to the `alias` and `alias_domain` tables, so you can add a comment explaining why the alias exists.

Partially addresses #1036

thanks @jpwarren
2026-06-08 09:08:02 +01:00
Copilot ae7339afd4 Use native booleans for prepared SQL params; stop binding db_get_boolean() values (#1019)
Prepared statements were binding DB-specific boolean literals (`'t'/'f'`) produced by `db_get_boolean()`, which breaks PostgreSQL parameter typing in some paths (notably mailbox creation via handler flows). 

This change standardizes bound boolean parameters to native PHP `true`/`false` (which are then cast to 0/1 which seems to work fine within PDO/PostgreSQL).

fixes https://github.com/postfixadmin/postfixadmin/issues/1017
2026-04-23 19:28:01 +01:00
David Goodwin 284e1f7eb2 fix test after language change 2021-07-08 19:44:11 +01:00
David Goodwin 2edabc3e03 phpcs insists on some brace changes 2021-04-13 21:19:16 +01:00
David Goodwin 823f27b29d phpcs wants to change ... 2021-03-22 09:28:28 +00:00
David Goodwin 7107e17c4c composer format 2020-09-25 21:33:26 +01:00
David Goodwin 3c7da4f3b8 Refactor some methods
PFAHandler::store() -> PFAHandler::save();
 PFAHandler::storemore() -> PFAHandler::postSave();
 PFAHandler::beforestore() -> PFAHandler::preSave();
2020-09-25 21:29:45 +01:00
David Goodwin 12f68a6e3a composer format time 2020-08-13 15:27:47 +01:00
David Goodwin 5bd5bdc25b merge https://github.com/postfixadmin/postfixadmin/pull/375 add unit test 2020-08-13 15:00:22 +01:00
David Goodwin ef1fb36133 improve unit tests for PostgreSQL 2020-06-23 21:43:19 +01:00
David Goodwin 3cd62f9f4f update to phpunit v8, try changing coveralls library, update github action 2020-04-14 21:03:10 +01:00
David Goodwin 01b4d6c587 cleanup db after running 2020-03-02 09:55:35 +00:00
David Goodwin 6a7abbe663 fix formatting 2020-03-02 09:41:31 +00:00
David Goodwin 28a3f5f157 better testing 2020-03-02 09:37:17 +00:00
David Goodwin cd8cf289b4 more empty tests 2019-09-17 21:40:41 +01:00