David Goodwin
49c254a4e6
avoid undefined array key quota.... see #853
2024-09-01 19:23:58 +01:00
David Goodwin
b18ed591a2
bumping php-cs-fixer; formatting rules change slightly
2022-06-28 13:31:37 +01:00
David Goodwin
ede15de662
see #575 - fix "Warning: Declaration of ...::init($id): bool should be compatabile with ... ::init(string $id): bool"
2021-12-16 20:54:01 +00:00
David Goodwin
34e0367a0b
check if config option exists and do not require it is a string - see https://github.com/postfixadmin/postfixadmin/issues/437
2021-01-25 17:00:04 +00:00
David Goodwin
23cec95153
fix php8 moaning about string vs int
2021-01-18 20:49:49 +00:00
David Goodwin
b8fa60bb8a
more type hints / psalm fixes
2020-09-28 20:33:54 +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
3d46ec7959
revert: 1d1960a476
- see https://github.com/postfixadmin/postfixadmin/issues/384
2020-09-12 21:04:18 +01:00
David Goodwin
bbf41c7acc
formatting
2020-06-02 12:59:47 +01:00
David Goodwin
864065cd37
fix MailboxHandler -> adding mailbox with empty quota field
2020-05-15 20:30:31 +01:00
David Goodwin
d81363541a
fix psalm
2020-03-18 21:03:27 +00:00
David Goodwin
338fb8c564
Fix quota storage; see https://github.com/postfixadmin/postfixadmin/issues/342
2020-03-18 14:36:53 +00:00
David Goodwin
d3295a59bb
format
2020-03-16 14:10:05 +00:00
David Goodwin
d540d904db
cast mailbox['quota'] to be integer.
...
see: https://github.com/postfixadmin/postfixadmin/issues/342
2020-03-16 13:11:51 +00:00
David Goodwin
3303f25bcc
add some php 7+ array type hints.
2020-03-16 13:11:15 +00:00
David Goodwin
30f97c97ee
avoid: A non-numeric value encountered errors from no quota being specified
2020-03-02 09:55:13 +00:00
David Goodwin
1ad184641d
php7.4 / psalm fixes
2020-01-31 16:30:46 +00:00
David Goodwin
87824ef970
psalm fixes/workarounds; require PHP 5.6+
2019-10-19 20:51:05 +01:00
David Goodwin
f7c7e35b34
fix formatting
2019-09-15 11:42:21 +01:00
David Goodwin
34cf66110e
see https://github.com/postfixadmin/postfixadmin/issues/251 - avoid things breaking if imap_open is not present
2019-09-05 18:10:07 +01:00
David Goodwin
296fc2f48e
silence psalm error - cast $show_password_fields to an int in model/MailboxHandler.php lines 33/34
2019-08-13 08:53:43 +01:00
Felix Ableitner
600248e955
Add option to use smtp password when sending admin emails ( fixes #272 )
2019-07-02 13:41:58 +02:00
David Goodwin
651688c802
if we are generating passwords, there will only be one password value; so reduce the fields we check before deciding whether to update password_expiry - see https://github.com/postfixadmin/postfixadmin/issues/266
2019-06-11 21:05:53 +01:00
David Goodwin
1d1960a476
if CONF['generate_password'] == 'YES' then do not display password fields
...
Given we autogenerate a password ....
2019-06-11 21:03:39 +01:00
David Goodwin
3ff2436f2f
try a bit harder to avoid non-numeric argument issues with $multiplier
...
(see https://github.com/postfixadmin/postfixadmin/issues/266 )
2019-06-10 20:13:22 +01:00
David Goodwin
8e2e4eb189
run: composer format
2019-06-08 20:38:54 +01:00
David Goodwin
03b9483204
default to providing a password_expiry datetime value - even if password_expiry is turned off - this should fix https://github.com/postfixadmin/postfixadmin/issues/280
2019-06-08 20:34:07 +01:00
David Goodwin
3322b43bb6
see: https://github.com/postfixadmin/postfixadmin/issues/282 - try and ensure local_part contains an @ on creating a mailbox
2019-06-08 20:05:33 +01:00
David Goodwin
045a19ae33
re-format
2019-02-27 14:44:20 +00:00
David Goodwin
9024dddf46
move password_expiration code into the MailboxHandler.
2019-02-27 14:44:20 +00:00
David Goodwin
df99e66b2d
try and stop "A non-numeric value encountered in ..."; see #239
2019-02-27 14:44:20 +00:00
David Goodwin
803e2342f8
fix psalm issues; reformat; rename new db functions
2019-01-06 21:32:58 +00:00
David Goodwin
ea33d9951a
try migrating to pdo
2019-01-06 21:32:58 +00:00
David Goodwin
4fcdba9cf4
run php-cs-fixer (code reforamt)
2018-12-28 19:31:43 +00:00
David Goodwin
19cda31849
remove psalm warnings from code; fix password_expiry behaviour when enabled/disabled on MySQL
2018-12-28 19:27:33 +00:00
David Goodwin
74002bbf57
psalm fixes
2018-12-27 21:43:11 +00:00
David Goodwin
69e234f668
Merge pull request #200 from doktoil-makresh/master
...
Support for password expiration, managed in PostFix Admin
2018-11-27 09:14:36 +00:00
David Goodwin
afd418675c
pointless comment
2018-09-07 11:01:50 +01:00
David Goodwin
77d1b6c2e7
rename sql fields to just have mailbox.password_expiry and domain.password_expiry
2018-08-28 21:19:56 +01:00
Damien Martins
e786609aa9
Adding support for password expiration. Please read README.password_expiration for more details
2018-08-17 16:07:14 +02:00
David Goodwin
9c0e1dd575
phpdoc fixes
2018-06-18 21:34:10 +01:00
Christian Boltz
24ad5cc3d8
Set $reset_by_sms even if password reset is disabled
...
... to avoid an "undefined variable" warning
2018-04-27 23:23:57 +02:00
Christian Boltz
3f1866d041
display phone number field only if $CONF[sms_send_function] is set
...
Without a way to send a SMS, asking users for their mobile number is
pointless.
2018-04-22 22:55:55 +02:00
Christian Boltz
d2588a4de2
Fix phpcs whitespace breakage in initStruct etc.
2018-04-22 18:24:41 +02:00
Adrien Crivelli
15df6c1d7b
Reformat everything with PHP-Cs-Fixer
2018-01-26 23:54:37 +09:00
houmingtao
5f1ac12d72
use current time as default token_validity value
2017-11-24 16:04:39 +08:00
root
4670182d79
fix invalid value for token_validity
2017-10-12 14:54:47 +08:00
Sylvain Tissot
ffb84283c2
Harden password reset process
...
The improvements are:
- Die with an explicit message when a user is trying to reset his lost password and the option is disabled in config
- Redirect user to main page after password change using relative URL
- Don't leak info whether user exists or has recovery info defined
- Throttle password reset requests to prevent brute force attacks
- Show phone/alt email fields in mailbox/admin edit form only when the password reset option is enabled
- Make database upgrade code compatible with other databases types
- Use the existing password generator to generate OTP. It is now stored in database, unique to each user, valid only for 1 hour and can only by used once.
2017-10-09 11:45:51 +09:00
Sylvain Tissot
9c9ba64a7f
Allows a user or admin to reset his/her forgotten password with a code sent by email/SMS #18
2017-08-21 13:05:25 +02:00