Commit Graph
17 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 8c6057b54b Distinguish mailbox and domain quota validation errors (#1096)
- distinguish the per-mailbox maximum quota error from insufficient remaining domain quota
- add the domain-quota error message to every language catalog

Thanks @TrapoSAMA
2026-08-02 10:15:08 +01:00
David Goodwin 24b3b12581 MailboxHandler: change mailbox_postcreation_hook and maildir_name_hook CONF callable check to use is_callable() and not is_string() && function_exists() - this should allow someone to define a PHP 7+ style anonymous function within their config, add unit test to illustrate behaviour etc
see also #869 and #812
2024-11-12 20:12:53 +00:00
David Goodwin 2d6ded2786 PSR2 -> PSR12 formatting 2022-06-28 13:46:11 +01:00
David Goodwin 2edabc3e03 phpcs insists on some brace changes 2021-04-13 21:19:16 +01:00
David Goodwin c300a8070e ensure timestamps are non-empty after update for mailbox 2021-04-05 21:11:39 +01:00
David Goodwin 3ad0591006 ensure MailboxHandler does result in modified timestamp being updated, and they are both set on insertion - see #469 2021-04-05 21:11:39 +01:00
David Goodwin 823f27b29d phpcs wants to change ... 2021-03-22 09:28:28 +00:00
David Goodwin d65d70c6ed fix test if quota is turned on 2021-01-18 20:46:37 +00:00
David Goodwin 7107e17c4c composer format 2020-09-25 21:33:26 +01:00
David Goodwin b868f950bf refactor Login stuff out of Handler classes into Login... add tests 2020-09-25 21:32:53 +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 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 5e1a4e27dd ensure edit works 2020-03-03 09:49:46 +00:00
David Goodwin 79ee5f82cb add a far better MailboxHandler test case 2020-03-02 09:55:44 +00:00
David Goodwin e9ed15143e add token MailboxHandler test 2019-02-18 21:20:07 +00:00