0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00
Commit Graph

451 Commits

Author SHA1 Message Date
Sven Strickroth
3cde7af742 UTF8 is no real UTF8 in MySQL, on needs to use utf8mb4
This allows to use emojis in vacation mails.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
2021-05-07 17:55:18 +02:00
David Goodwin
2edabc3e03 phpcs insists on some brace changes 2021-04-13 21:19:16 +01:00
David Goodwin
fbdc6ba029 composer format 2021-04-05 21:20:40 +01:00
David Goodwin
962e80c40c improve typehints on db_insert (requires php7) 2021-04-05 21:11:39 +01:00
David Goodwin
60ff94e3c1 see #469 - try and make sure we do update timestamp fields
They may not be present in our $values array, but update them anyway.
2021-04-05 21:11:39 +01:00
David Goodwin
1a93247018 improve phpdocs 2021-03-02 21:33:00 +00:00
David Goodwin
0fc3765528 re-format 2021-02-20 14:29:23 +00:00
David Goodwin
c755e82a36 Merge branch 'postfixadmin_3.3' 2021-02-18 12:12:27 +00:00
David Goodwin
c87d8a8319 split db_connect() up to separate out db_connection_string() (which returns a PDO DSN string) 2021-02-17 21:10:48 +00:00
David Goodwin
d9813d4cf8 see #446 - try and detect site url but allow for $CONF['site_url'] override to be used. 2021-02-07 20:35:58 +00:00
David Goodwin
aef69b53a9 log parameters when it fails 2021-02-07 19:40:45 +00:00
David Goodwin
dcf01eafc3 more english 2021-01-28 22:20:54 +00:00
David Goodwin
8ebb985fc7 split db_connect() up to separate out db_connection_string() (which returns a PDO DSN string) 2021-01-28 22:12:05 +00:00
David Goodwin
52933a6307 remove change to table_by_key() as the original bug has been found in Login 2021-01-26 21:06:15 +00:00
David Goodwin
bcf1f8c7e4 move min_password_length check into a conditional Config::has() check first 2021-01-26 20:47:45 +00:00
David Goodwin
da7607c9c5 see #429 - check for some CONF keys before trying to use them 2021-01-23 16:55:41 +00:00
David Goodwin
d81be5640d try and make config reading a bit more robust - see https://github.com/postfixadmin/postfixadmin/issues/429 2021-01-22 18:04:39 +00:00
David Goodwin
6c3ff42036 make sure we do not double quote mysql table names somehow 2021-01-19 20:03:32 +00:00
David Goodwin
910490e83f see https://github.com/postfixadmin/postfixadmin/issues/422 - not all variants of MySQL have RANDOM_BYTES() 2021-01-16 21:42:56 +00:00
David Goodwin
5151b860e7 add @todo, default MySQL ENCRYPT() to have a random salt, SHA512 format 2021-01-12 22:04:51 +00:00
David Goodwin
0096a41693 format 2021-01-12 11:00:56 +00:00
David Goodwin
7090b5af75 changes to pacrypt to support a prefix like {SHA265-CRYPT} on a hash - @see https://github.com/postfixadmin/postfixadmin/issues/344 2021-01-12 10:59:25 +00:00
Christian Boltz
b9946ca968
update $min_db_version to match latest upgrade.php 2021-01-07 22:16:22 +01:00
David Goodwin
750838d7f7 psalm fixes; make safepost()/safeget() return strings 2020-11-09 21:40:52 +00:00
David Goodwin
4712d83c98 see: https://github.com/postfixadmin/postfixadmin/issues/390 - support a callable which
allows for password validation against any external service.
2020-11-09 21:37:47 +00:00
David Goodwin
8abde0dc0b move $version into $CONF / Config from functions.inc.php 2020-09-27 10:47:56 +01:00
David Goodwin
484acfbf59 Remove the random_compat lib. 2020-09-27 10:47:22 +01:00
David Goodwin
4d8b4558d7 might fix: https://github.com/postfixadmin/postfixadmin/issues/378 2020-08-13 16:59:40 +01:00
David Goodwin
b1ccb2b07b merge in socket support for postgresql connections - see https://github.com/postfixadmin/postfixadmin/issues/370 2020-08-13 14:47:00 +01:00
David Goodwin
b0aa0141d7 reformat 2020-08-06 20:43:47 +01:00
David Goodwin
57a4787473 abort on any stderr output from doveadm ... see: https://github.com/postfixadmin/postfixadmin/issues/373#issuecomment-670007084 2020-08-06 19:42:34 +01:00
David Goodwin
502bfca2f5 try and improve error handling if doveadm is not present etc - see https://github.com/postfixadmin/postfixadmin/issues/373 2020-08-06 15:33:37 +01:00
David Goodwin
2bb2460bf3 add in error_log call just incase it helps someone 2020-06-02 12:54:26 +01:00
Phil Jaenke
d3a5db394c
Make pInvalidDomainDNS more forgiving
Make the pInvalidDomainDNS check more forgiving to accommodate newly created domains which also do not have an A record for the domain (which is generally not a best practice) or MX configured yet.
This adds a check for an `NS` record; if the NS exists, then the domain is valid and can be assumed to have just not been configured to receive email yet.
2020-05-15 16:06:59 -04:00
David Goodwin
dec4b38f35 improve langauge checks (remove unnecessary is_string check) 2020-04-01 21:29:40 +01:00
Christian Boltz
531a52e053
remove superfluous code in check_language()
dd52a98d43 added honoring POST['lang'] and
COOKIE['lang'] even if $_SERVER['HTTP_ACCEPT_LANGUAGE'] is not set.
This also means we can drop the now-duplicate check in the code section
handling $_SERVER['HTTP_ACCEPT_LANGUAGE'].
2020-04-01 20:52:20 +02:00
David Goodwin
1c0fd02323 composer format time 2020-03-14 22:34:52 +00:00
David Goodwin
3b9d8f867e merge sha512.b64 encrypt support - see https://github.com/postfixadmin/postfixadmin/issues/58 2020-03-14 22:30:51 +00:00
David Goodwin
dd52a98d43 prefer POST/COOKIE lang over browser http header - see: https://github.com/postfixadmin/postfixadmin/issues/28 2020-03-14 21:39:36 +00:00
Michael Krieger
978a5cf4c2
Update functions.inc.php 2020-03-05 18:07:34 -05:00
Michael Krieger
41d03fa158
Update functions.inc.php 2020-03-05 18:02:43 -05:00
David Goodwin
1ecada175c and support whether we verify ssl certs; default to true 2020-02-28 14:30:40 +00:00
David Goodwin
4cbd82d750 remove empty settings so not all SSL things are required for using SSL with MySQL 2020-02-28 14:19:22 +00:00
David Goodwin
1ad184641d php7.4 / psalm fixes 2020-01-31 16:30:46 +00:00
David Goodwin
c0bd763c53 another replacement of string{x} with string[x] 2020-01-31 14:40:38 +00:00
David Goodwin
aa37ab57e6 stop using { } for string character access (use [ ] instead) - see https://www.php.net/manual/en/language.types.string.php#language.types.string.substr 2020-01-31 14:28:54 +00:00
David Goodwin
79c2e77a00 should fix: https://github.com/postfixadmin/postfixadmin/issues/323 2020-01-13 15:35:46 +00:00
David Goodwin
d6bbecaf45 change row to r everywhere; see : https://sourceforge.net/p/postfixadmin/discussion/676076/thread/616c1d25/?limit=25#7da0 - hopefully removing "row" which might be a reserved keyword for some databases etc 2019-12-08 16:24:06 +00:00
David Goodwin
bcae218cbb composer format time 2019-10-19 21:36:27 +01:00
David Goodwin
87824ef970 psalm fixes/workarounds; require PHP 5.6+ 2019-10-19 20:51:05 +01:00
David Goodwin
174b874c56 allow psalm to update
phpdoc fix
2019-10-17 19:38:01 +01:00
David Goodwin
9526e68e3e perhaps this will help https://github.com/postfixadmin/postfixadmin/issues/305 2019-10-17 19:30:00 +01:00
David Goodwin
2742849e7b reformat 2019-09-17 21:06:00 +01:00
David Goodwin
7965a83aff tighten psalm checks even more 2019-09-17 21:05:08 +01:00
David Goodwin
29d990f5f4 fix page browser test for sqlite; see #87 and #161 2019-09-17 20:46:32 +01:00
David Goodwin
f36ba9b4c2 format 2019-09-15 21:09:02 +01:00
David Goodwin
4081267cb2 fix phpdoc; throw exception on error within phpunit - helps testing 2019-09-15 21:08:08 +01:00
David Goodwin
f7c7e35b34 fix formatting 2019-09-15 11:42:21 +01:00
David Goodwin
17a50c51f1 drop some dies; use Exception and catch after dispatch() - see #197 2019-09-14 21:01:09 +01:00
David Goodwin
6a89b9a363 composer format 2019-08-13 09:24:30 +01:00
David Goodwin
7b18d0386c
Merge pull request #287 from gabrielfin/fix-pagination
Fix pagination
2019-08-13 08:55:14 +01:00
Felix Ableitner
8ba1cf20a7 use config::bool instead of read_string 2019-07-22 13:06:07 +02:00
Unknown
88587f4cd3 Fix pagination 2019-07-19 19:11:54 -03:00
Felix Ableitner
a46245eecc Add config option for TLS 2019-07-17 11:44:04 +02:00
Felix Ableitner
61ede42800 Send emails with TLS 2019-07-17 11:44:04 +02:00
Felix Ableitner
600248e955 Add option to use smtp password when sending admin emails (fixes #272) 2019-07-02 13:41:58 +02:00
Christian Boltz
55858bf3a0
Fix table names in gen_show_status()
... by using table_by_key() instead of reading $CONF directly.
Otherwise, $CONF['database_prefix'] gets ignored and the query tries to
use a wrong table name.

This fixes a bug introduced in d809e0fbf7
2019-06-30 15:28:25 +02:00
David Goodwin
8e2e4eb189 run: composer format 2019-06-08 20:38:54 +01:00
David Goodwin
cc19870923 drop function: db_connect_with_errors(); just throw from db_connect() if something goes wrong 2019-06-07 16:23:34 +01:00
Felix Ableitner
5d0a587fe7 Dont swallow database connection exceptions 2019-06-07 15:37:21 +02:00
David Goodwin
ad858592f4 remove password_expiry logic from generic db_update function; the various *Handler classes should fix the password_expiry field already and this just breaks PgSQL; see #264 2019-04-26 11:34:21 +01:00
Roland Singer
23a7f1bfda allow TLD with 1 char 2019-04-14 16:25:15 +02:00
David Goodwin
9024dddf46 move password_expiration code into the MailboxHandler. 2019-02-27 14:44:20 +00:00
David Goodwin
b8ee437169 add throw_exceptions parameter to db_update and db_insert. 2019-02-27 14:44:20 +00:00
Andreas Oberritter
000416c401 pacrypt_dovecot: Don't blacklist SCRAM-SHA-1
Actually it doesn't include the username at all. Fixes commit f444de4.
2019-02-19 20:50:21 +01:00
David Goodwin
9ccf5250cd remove config dump 2019-02-16 19:48:06 +00:00
David Goodwin
496657aa5d echo something helpful on db error when testing 2019-02-16 19:21:46 +00:00
David Goodwin
2e87464fc8 initial attempt at connecting to mysql socket file through pdo 2019-02-15 22:17:41 +00:00
David Goodwin
9cc04df973 move the password expiry date to be php generated so it works fine on all databases 2019-02-15 21:35:29 +00:00
David Goodwin
8632cbd1a9 improve documentation around the various crypt functions 2019-02-15 21:34:49 +00:00
David Goodwin
17a420152c use pdo/prepared statement for list-virtual + page browser 2019-02-15 21:33:55 +00:00
David Goodwin
a05f87723f reformat 2019-02-10 12:12:28 +00:00
David Goodwin
28870e4b45 explode if there is no db connection made 2019-02-10 12:11:58 +00:00
David Goodwin
b4564958a1 phpdoc; touch sqlite file before trying to use it in tests 2019-02-10 11:03:52 +00:00
8ctopus
4f2dab357c the directory the SQLite database is in must be writeable 2019-02-10 10:56:08 +05:00
hawk
ceae3caa37 sqlite3 databases: check that the file exists and is writeable 2019-02-10 10:06:59 +05:00
David Goodwin
92d6259cd0 possibly fix PGSQL PDO DSN to be unicode aware; see #243 2019-02-09 21:19:28 +00:00
hawk
c71dd25afa fix setup db_connect_with_errors PDO exceptions were not caught 2019-02-09 18:47:45 +05:00
David Goodwin
583b8958c7 psalm 2019-01-16 09:24:33 +00:00
David Goodwin
7838e85ff0 fix formatting 2019-01-11 17:20:25 +00:00
David Goodwin
5db463b35c improve docs 2019-01-11 17:12:16 +00:00
David Goodwin
cef2ba5598 Merge remote-tracking branch 'origin/master' into feature-try-pdo 2019-01-10 06:45:30 +00:00
Luca
e347b4677b
Fix for MySQL 8
The keyword ROW became reserved in MySQL 8.0.2
https://dev.mysql.com/doc/refman/8.0/en/keywords.html#keywords-8-0-detailed-R
2019-01-08 19:33:14 +01:00
David Goodwin
803e2342f8 fix psalm issues; reformat; rename new db functions 2019-01-06 21:32:58 +00:00
David Goodwin
1176c9ce78 reformat; fix some transition bugs 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
8798a65a06 remove db_array() function (not in use); use Config::read_string(..) more 2019-01-01 19:28:59 +00:00
David Goodwin
cdacb5697f improve formatting of error message; remove use of db_array (to be removed). 2019-01-01 19:24:04 +00:00
David Goodwin
2ea829eb7a fix postgresql compatability - see #227 2018-12-31 22:19:29 +00:00
David Goodwin
b2e814967f try and get working under travis ... 2018-12-29 21:45:12 +00:00