David Goodwin
16facd0fb8
scripts/postfixadmin-cli.php : see #385 - add to the current error reporting level, not trample all over it
5 months ago
David Goodwin
ad68f20f82
avoid passing null to exit, see also #921
8 months ago
David Goodwin
798e8b269c
Topt app passwords fixes (WIP) ( #805 )
various improvements to the TOTP code see also: #802
8 months ago
David Goodwin
fa56b1ccb8
scripts/examples/vacation-cron.php: add db_get_boolean() call, this should let it work on postgresql too
2 years ago
David Goodwin
c32f344b9d
formatting?
2 years ago
David Goodwin
519c934ed3
Add minimal cron job to remove old vacation alias records - see https://github.com/postfixadmin/postfixadmin/issues/832
2 years ago
David Goodwin
f01274ec94
try relaxing composer dependencies to allow php8.2 dev support, reformat so composer format passes
2 years ago
Shao Yu-Lung (Allen)
0876c368e4
feat: support Dovecot DIGEST-MD5 ( #816 )
Add support for dovecot DIGEST-MD5 auth (using : $CONF['pacrypt'] = 'dovecot:DIGEST-MD5')
This also changes the pacrypt() function to take an optional 3rd argument (username).
Thanks @bestlong
2 years ago
David Goodwin
015d4ec9cd
reindent / reformat; add type hints for some of the app password stuff; try and make sure someone can only remove their own app password (see revokeAppPassword() )
2 years ago
David Goodwin
4d17aa6ef9
manaul merge in of verdigado:master (see #753 ) (MFA/TOTP support)
2 years ago
David Goodwin
2882f86ad8
fix formatting
4 years ago
David Goodwin
2d6ded2786
PSR2 -> PSR12 formatting
4 years ago
David Goodwin
2edabc3e03
phpcs insists on some brace changes
5 years ago
David Goodwin
823f27b29d
phpcs wants to change ...
5 years ago
David Goodwin
14aea8a383
fix php8 moaning about { } on strings
5 years ago
David Goodwin
ddafed6f4d
fix php8 moaning about { } on strings
5 years ago
David Goodwin
d49de35189
improve docs
6 years ago
Christian Boltz
ad4142134a
merge __parseParams() into parseParams()
6 years ago
Christian Boltz
9833a8f289
whitespace fix in __parseParams()
6 years ago
Christian Boltz
4e9e3db75d
Fix parameter parsing for '-1'
'--quota -1' gets parsed as two options ("quota" and "1"), but it's
meant to be "quota => -1".
Make sure '-1' is considered as a value, not as an option.
Also get rid of unset()'ing $params[$i] and (now?) superfluous recursive
calls to __parseParams() to make the code less confusing.
6 years ago
David Goodwin
2742849e7b
reformat
6 years ago
David Goodwin
34e6f7829e
tighten psalm checks; fix errors
6 years ago
David Goodwin
034a50836c
tighten psalm checks
6 years ago
David Goodwin
f7c7e35b34
fix formatting
6 years ago
David Goodwin
17a50c51f1
drop some dies; use Exception and catch after dispatch() - see #197
6 years ago
David Goodwin
2ff05bc737
typo
6 years ago
David Goodwin
9cd7dac187
initial attempt at trying to return an exit value within the cli
6 years ago
Lars Liedtke
0c94760828
Update postfixadmin-cli
Make this script platform independent to be usable under e.g. FreeBSD, where bash is located in /usr/local/bin/bash and thus the script fails.
6 years ago
David Goodwin
4fcdba9cf4
run php-cs-fixer (code reforamt)
7 years ago
David Goodwin
029c4ffe47
psalm fixes
7 years ago
David Goodwin
6d328795cb
remove windows code; remove array_merge (seems to just break parsing)
8 years ago
David Goodwin
aa38d0090d
token fixes; code looks incomplete anyway
8 years ago
David Goodwin
97c48a0fc9
fix phpdoc
8 years ago
David Goodwin
b48f99d4c6
reformat (phpcs)
8 years ago
Christian Boltz
c7201afa6c
drop unused shells/mailbox.php
8 years ago
Christian Boltz
12c4a4f29e
move shells/shell.php to model/Shell.php
... and drop a few lines in postfixadmin-cli.php that became superfluous
by this move (thanks autoloader!)
8 years ago
Christian Boltz
71d61a1d8a
drop superfluous Config::read('all') call
8 years ago
Christian Boltz
48a3709041
postfixadmin-cli: get rid of empty/unused initialize()
8 years ago
Christian Boltz
36fe1f6ccc
remove deleted functions from $protectedCommands
If grep -r doesn't find a function, we don't need to keep it in
$protectedCommands ;-)
8 years ago
Christian Boltz
5e93dfe604
postfixadmin-cli: drop (undocumented) -webroot etc.
Dropping the -webroot parameter (which basically means hardcoding that
../common.php has to exist) allows to do quite some cleanup.
Also unconditionally require_once('../common.php') to ensure that
everything we expect in the global namespace (like the 'Conf' class) is
there.
This allows even more cleanup. We get rid of __bootstrap() and some
constants, and can simplify parameter handling.
8 years ago
David Goodwin
2f7d3d9534
remove (possibly) unnecessary Config::read(all) calls ... see #144
8 years ago
Adrien Crivelli
15df6c1d7b
Reformat everything with PHP-Cs-Fixer
8 years ago
David Goodwin
252d42dcc0
fix perms (executable)
8 years ago
Christian Boltz
13cdd50d0a
Add checks to login.php and cli to ensure database layout is up to date
- add check_db_version() to functions.inc.php
- add $min_db_version (needs to be updated at least before the release)
- call check_db_version in login.php, users/login.php and CLI - they'll
error out if the database layout is outdated
- change setup.php to use check_db_version()
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1853 a1433add-5e2c-0410-b055-b7f2511e0802
10 years ago
Christian Boltz
694d13f6db
delete suprefluous whitespace
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1843 a1433add-5e2c-0410-b055-b7f2511e0802
10 years ago
David Goodwin
54603b0968
reforamt cli commands; update code to php v5 syntax; remove regexp and use filter_var for email validation; use private/protected/public
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1840 a1433add-5e2c-0410-b055-b7f2511e0802
10 years ago
Christian Boltz
5dac4295a4
postfixadmin-cli.php:
- whitelist '-1' as valid value instead of misinterpreting it as option
https://sourceforge.net/p/postfixadmin/bugs/369/
- don't remove quote chars (") from parameter values
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1837 a1433add-5e2c-0410-b055-b7f2511e0802
10 years ago
Christian Boltz
3640a1b804
postfixadmin-cli.php:
- add fetchmail to module list
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1784 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz
d9e30fb41b
Add CliScheme.php:
- displays the database scheme (for usage in upgrade.php)
PFAHandler:
- add "Scheme" to the list of available tasks
postfixadmin-cli.php:
- add "scheme" to help
This is the first patch of a series sponsored by
Bund der Deutschen Landjugend (german rural youth)
http://bdl.landjugend.info/
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1710 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz
da14ddf6d7
postfixadmin-cli.php:
- __parse_params(): only check for first character if $params[$i]
is not empty (avoids PHP warning)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1660 a1433add-5e2c-0410-b055-b7f2511e0802
12 years ago