David Goodwin
34e0367a0b
check if config option exists and do not require it is a string - see https://github.com/postfixadmin/postfixadmin/issues/437
5 years ago
David Goodwin
23cec95153
fix php8 moaning about string vs int
5 years ago
David Goodwin
b8fa60bb8a
more type hints / psalm fixes
5 years ago
David Goodwin
b868f950bf
refactor Login stuff out of Handler classes into Login... add tests
5 years ago
David Goodwin
3c7da4f3b8
Refactor some methods
PFAHandler::store() -> PFAHandler::save();
PFAHandler::storemore() -> PFAHandler::postSave();
PFAHandler::beforestore() -> PFAHandler::preSave();
5 years ago
David Goodwin
3d46ec7959
revert: 1d1960a476 - see https://github.com/postfixadmin/postfixadmin/issues/384
6 years ago
David Goodwin
bbf41c7acc
formatting
6 years ago
David Goodwin
864065cd37
fix MailboxHandler -> adding mailbox with empty quota field
6 years ago
David Goodwin
d81363541a
fix psalm
6 years ago
David Goodwin
338fb8c564
Fix quota storage; see https://github.com/postfixadmin/postfixadmin/issues/342
6 years ago
David Goodwin
d3295a59bb
format
6 years ago
David Goodwin
d540d904db
cast mailbox['quota'] to be integer.
see: https://github.com/postfixadmin/postfixadmin/issues/342
6 years ago
David Goodwin
3303f25bcc
add some php 7+ array type hints.
6 years ago
David Goodwin
30f97c97ee
avoid: A non-numeric value encountered errors from no quota being specified
6 years ago
David Goodwin
1ad184641d
php7.4 / psalm fixes
6 years ago
David Goodwin
87824ef970
psalm fixes/workarounds; require PHP 5.6+
6 years ago
David Goodwin
f7c7e35b34
fix formatting
7 years ago
David Goodwin
34cf66110e
see https://github.com/postfixadmin/postfixadmin/issues/251 - avoid things breaking if imap_open is not present
7 years ago
David Goodwin
296fc2f48e
silence psalm error - cast $show_password_fields to an int in model/MailboxHandler.php lines 33/34
7 years ago
Felix Ableitner
600248e955
Add option to use smtp password when sending admin emails ( fixes #272 )
7 years ago
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
7 years ago
David Goodwin
1d1960a476
if CONF['generate_password'] == 'YES' then do not display password fields
Given we autogenerate a password ....
7 years ago
David Goodwin
3ff2436f2f
try a bit harder to avoid non-numeric argument issues with $multiplier
(see https://github.com/postfixadmin/postfixadmin/issues/266 )
7 years ago
David Goodwin
8e2e4eb189
run: composer format
7 years ago
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
7 years ago
David Goodwin
3322b43bb6
see: https://github.com/postfixadmin/postfixadmin/issues/282 - try and ensure local_part contains an @ on creating a mailbox
7 years ago
David Goodwin
045a19ae33
re-format
7 years ago
David Goodwin
9024dddf46
move password_expiration code into the MailboxHandler.
7 years ago
David Goodwin
df99e66b2d
try and stop "A non-numeric value encountered in ..."; see #239
7 years ago
David Goodwin
803e2342f8
fix psalm issues; reformat; rename new db functions
7 years ago
David Goodwin
ea33d9951a
try migrating to pdo
7 years ago
David Goodwin
4fcdba9cf4
run php-cs-fixer (code reforamt)
7 years ago
David Goodwin
19cda31849
remove psalm warnings from code; fix password_expiry behaviour when enabled/disabled on MySQL
7 years ago
David Goodwin
74002bbf57
psalm fixes
7 years ago
David Goodwin
afd418675c
pointless comment
8 years ago
David Goodwin
77d1b6c2e7
rename sql fields to just have mailbox.password_expiry and domain.password_expiry
8 years ago
Damien Martins
e786609aa9
Adding support for password expiration. Please read README.password_expiration for more details
8 years ago
David Goodwin
9c0e1dd575
phpdoc fixes
8 years ago
Christian Boltz
24ad5cc3d8
Set $reset_by_sms even if password reset is disabled
... to avoid an "undefined variable" warning
8 years ago
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.
8 years ago
Christian Boltz
d2588a4de2
Fix phpcs whitespace breakage in initStruct etc.
8 years ago
Adrien Crivelli
15df6c1d7b
Reformat everything with PHP-Cs-Fixer
8 years ago
houmingtao
5f1ac12d72
use current time as default token_validity value
8 years ago
root
4670182d79
fix invalid value for token_validity
8 years ago
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.
9 years ago
Sylvain Tissot
9c9ba64a7f
Allows a user or admin to reset his/her forgotten password with a code sent by email/SMS #18
9 years ago
Christian Boltz
23bdd02dcb
broadcast-message.php, sendmail.php, MailboxHandler, *.lang:
- include mailbox name in pSendmail_result_error and
pSendmail_result_success
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1781 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz
4ce0a57e83
PFAHandler:
- add protected $searchfields = array(); - list of fields to search by
default, if just a search term is given. This will be done with
$search['_'], but that code is not implemented yet.
- add $this->msg['show_simple_search'] (true if $searchfields is non-empty)
list.tpl:
- display search input box and search overview only if $searchfields is
not empty
AliasdomainHandler:
- add 'alias_domain' and 'target_domain' to $searchfields
MailboxHandler:
- add 'username' to $searchfields
AliasHandler:
- add 'address' and 'goto' to $searchfields
This effectively means that the search input box is no longer displayed
in list.php for admin, domain and fetchmail listings.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1770 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz
cc2b157d59
*Handler:
- add $msg['confirm'] (confirmation message when attemping to delete an
item, displayed by list.php)
*.lang:
- add various confirm_delete_* texts needed by *Handler
- rename confirm_domain to confirm_delete_domain
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1749 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz
5706f146d6
MailboxHandler:
- storemore(): store maildir in the correct variable to fix running
mailbox_postedit script
Fix by bit-jockey @SF ,
https://sourceforge.net/p/postfixadmin/bugs/342/
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1737 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago