0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-20 03:36:20 +02:00
Commit Graph

1680 Commits

Author SHA1 Message Date
Carlos Ferreira
061f950661 Update French language 2017-03-11 05:33:18 +01:00
Christian Boltz
67a6d0e27a
use $CONF[page_size] in viewlog.php
This replaces the hardcoded "LIMIT 10" with "LIMIT <page_size>".

Patch by Dan <dannyro @SF>, https://sourceforge.net/p/postfixadmin/patches/133/

Additional change on top of Dan's patch:
- wrap $CONF['page_size'] in intval() to avoid that a broken config
  setting can break or exploit the query
2017-03-04 00:34:45 +01:00
Christian Boltz
29364b4734
ensure some fields are really latin1
The previous commit changed vacation_notificatoin.notified,
alias_domain.alias_domain and alias_domain.target_domain to latin1, but
did this only in their original upgrade function.

upgrade_1836_mysql() also applies this change to existing databases.
(It's unlikely that these fields are not latin1 - creating them as utf8
or utf8mb4 would break at the index length, but better safe than sorry ;-)
2017-02-25 23:22:47 +01:00
Christian Boltz
ba94c3a75e
fix problems with utf8mb4 as default charset
When trying to create a new database with utf8mb4 as default charset,
upgrade.php fails at various places because of too long indexes.

- no longer run upgrade_1_mysql, upgrade_2_mysql and upgrade_3_mysql
  which all affect updates from pre-2.1 database layout
- add {LATIN1} to vacation_notificatoin.notified,
  alias_domain.alias_domain and alias_domain.target_domain

Thanks to martinx who reported this on IRC and helped to debug it.
2017-02-25 22:18:59 +01:00
David Goodwin
7e496094e0 fall back to sys_get_temp_dir() if we cannot write to a templates_c like place 2017-02-24 11:04:21 +00:00
David Goodwin
c253ef7dbd allow escape_string() to take a db connection as a parameter; should improve performance when there are a large number of things to escape 2017-02-24 10:59:45 +00:00
David Goodwin
1a7b2df81f fix undefined variable 2017-02-24 10:58:05 +00:00
David Goodwin
71e412f6c2 make error messages red; fix slightly invalid html; remove templates_c check (unnecessary); note we want php5+; add label tags to input elements 2017-02-14 09:23:17 +00:00
David Goodwin
8c2d447421 remove silencing of @include_once - fixes #20 2017-02-14 09:21:35 +00:00
Christian Boltz
04e54508e5 Merge pull request #19 from rmcaninch/rmcaninch-patch-1
add css id #update-check to footer.tpl

This allows to hide the "check for updates" link using a custom CSS with '#update-check { display:none; }'
2017-02-12 23:43:15 +01:00
Christian Boltz
ace8597bb3 3.0.2 again - this time with correct SVN revision
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1895 a1433add-5e2c-0410-b055-b7f2511e0802
2017-02-09 05:21:12 +00:00
Christian Boltz
28703935b3 3.0.2 release
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1894 a1433add-5e2c-0410-b055-b7f2511e0802
2017-02-09 05:21:12 +00:00
David Goodwin
7ddac2ac4b evil hack to make vacation work while we are using Mail::Sender - see also https://sourceforge.net/p/postfixadmin/patches/136/
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1893 a1433add-5e2c-0410-b055-b7f2511e0802
2017-02-09 05:21:12 +00:00
Christian Boltz
0ec8064fe6 changelog update
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1892 a1433add-5e2c-0410-b055-b7f2511e0802
2017-02-09 05:21:12 +00:00
David Goodwin
f2a9131938 bump debian/changelog
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1891 a1433add-5e2c-0410-b055-b7f2511e0802
2017-02-09 05:21:12 +00:00
Christian Boltz
80d381f644 Make VacationHandler compatible with MySQL strict mode again
The MySQL database layout includes a 'cache' column for historical
reasons, the PostgreSQL database never did.

r1883 removed the 'cache' column from VacationHandler to unbreak
PostgreSQL, and at the same time broke MySQL in strict mode.

This patch re-adds the 'cache' column only for MySQL to fix this
regression.



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1890 a1433add-5e2c-0410-b055-b7f2511e0802
2017-02-09 05:21:12 +00:00
Christian Boltz
bf9ec09829 Merge pull request #23 from Janfred/bugfix_aliasdelete
Security fix: don't allow to delete protected aliases (CVE-2017-5930)
2017-02-08 18:37:34 +01:00
Jan-Frederik Rieckers
800f07816a
Fix wrong way of check for can_delete 2017-02-07 15:54:21 +01:00
Jan-Frederik Rieckers
03f4bad49c
Add Language-Key for protected_alias_cant_be_deleted 2017-02-03 15:08:24 +01:00
Jan-Frederik Rieckers
7bb36d0bbc
Fix security hole in AliasHandler
Without this fix it is possible to delete a protected alias via editing
the request parameter of the alias to delete.
2017-02-03 14:53:10 +01:00
David Goodwin
e56727fe09 Merge remote-tracking branch 'svnexport/master' 2017-01-29 19:50:53 +00:00
Christian Boltz
e3ade3e4b2 Set alias domain-related smarty variables only if alias domains are enabled
This avoids "undefined variable" warnings.

Reported by Kalavera on IRC.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1888 a1433add-5e2c-0410-b055-b7f2511e0802
2017-01-26 18:22:55 +00:00
David Goodwin
061a96fea3 Merge remote-tracking branch 'svnexport/master' 2016-12-21 21:33:26 +00:00
David Goodwin
2bbf6c63d4 see https://sourceforge.net/p/postfixadmin/bugs/376/ - remove any old templates_c/ files
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1887 a1433add-5e2c-0410-b055-b7f2511e0802
2016-12-21 21:32:15 +00:00
David Goodwin
b8051515db check whether we can use templates_c (this seems a better idea than falling back to using something in /tmp)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1886 a1433add-5e2c-0410-b055-b7f2511e0802
2016-12-21 21:26:02 +00:00
David Goodwin
b434f7070a possibly improve debian dependencies
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1885 a1433add-5e2c-0410-b055-b7f2511e0802
2016-12-21 21:20:21 +00:00
David Goodwin
491df198cc Merge remote-tracking branch 'svnexport/master' 2016-12-21 10:29:02 +00:00
David Goodwin
2f2db5949a fix date formatting in non-english languages, thanks to uz@musoftware.de
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1884 a1433add-5e2c-0410-b055-b7f2511e0802
2016-12-21 10:25:58 +00:00
David Goodwin
bd8e0e3ae3 apparently dead columns - thanks to uz@musoftware.de
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1883 a1433add-5e2c-0410-b055-b7f2511e0802
2016-12-20 08:39:18 +00:00
Christian Boltz
9ba7118d7b AliasHandler: restrict mailbox subquery to requested domains
set_is_mailbox_extrafrom() restricts the domain list to the domain that
needs to be checked (in normal list-virtual listing one domain), and is
then used to restore the default extrafrom.
This improves the performance for most usecases even for superadmins.

Note: Search mode might still be slow because by default it searches in
all domains available to the admin.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1882 a1433add-5e2c-0410-b055-b7f2511e0802
2016-11-09 20:41:24 +00:00
rmcaninch
137c9ac9d1 css id update-check added to footer.tpl
Simplify hiding the software update check from display. Not really for security. More for aesthetics; and keeping the more basic users from questioning it. Add #update-check {display: none;} to your custom css. See related feature patch: https://sourceforge.net/p/postfixadmin/patches/134/
2016-11-05 01:17:45 -04:00
Christian Boltz
516f1c68f4 upgrade_1835_mysql: fix defaults for both date fields at once
Doing it in two steps fails, see comment by Gabor 'Morc' KORMOS on
https://sourceforge.net/p/postfixadmin/bugs/5/

Note: This is an exception from the "never change an existing
upgrade_*() function" rule because
a) the result doesn't change for people where it worked and
b) it will continue here anyway for people who had upgrade problems


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1881 a1433add-5e2c-0410-b055-b7f2511e0802
2016-11-01 20:31:52 +00:00
Christian Boltz
74130b478c list-virtual.tpl: add missing "download as CSV" for mailboxes
Reported by Dan <dannyro @SF> in
https://sourceforge.net/p/postfixadmin/patches/135/

Note that I'm using a completely different patch to fix it.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1880 a1433add-5e2c-0410-b055-b7f2511e0802
2016-11-01 19:31:41 +00:00
Christian Boltz
40b4fdf61c beautify alias list search parameters
AliasHandler:
- initStruct(): handle __mailbox_username as separate field (needed to
  make it searchable)
- split off a condition_ignore_mailboxes() function (used in getList()
  and getPagebrowser()) to add '__mailbox_username IS NULL' to the search
  condition array. Also, make sure $condition can be an array (preferred)
  or a string with a raw query

list-virtual.php:
- hand over a search array instead of a raw query


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1879 a1433add-5e2c-0410-b055-b7f2511e0802
2016-11-01 17:43:32 +00:00
Christian Boltz
16e1407621 db_where_clause(): allow NULL and NOTNULL searchmodes
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1878 a1433add-5e2c-0410-b055-b7f2511e0802
2016-11-01 15:45:45 +00:00
Christian Boltz
bd28fcb194 AliasHandler: restrict __is_mailbox subquery to allowed domains
This improves performance on setups with lots of mailboxes.
Well, except for superadmins because restricting to "all domains"
doesn't really help ;-)

Thanks to gygy for reporting this on IRC, and for testing the patch.



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1877 a1433add-5e2c-0410-b055-b7f2511e0802
2016-10-31 20:15:31 +00:00
Christian Boltz
4c2ff84d52 upate wiki links
mediawiki -> SF wiki


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1876 a1433add-5e2c-0410-b055-b7f2511e0802
2016-10-20 21:26:13 +00:00
Christian Boltz
bbec3e9f0e pacrypt(): allow switching between dovecot:* password schemes
Dovecot password hashes include a {SCHEME} prefix, so it's possible to
switch the scheme while still accepting passwords hashed using the
previous dovecot:* scheme.

This patch adds the code needed to find out the used hashing scheme
from the hash and ensures it gets used to validate the password.

Patch by Aaron Lindsay <aaron AT aclindsay com> (sent to the ML)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1875 a1433add-5e2c-0410-b055-b7f2511e0802
2016-10-20 20:15:15 +00:00
David Goodwin
17d1cce041 Merge remote-tracking branch 'svnexport/master' 2016-10-20 09:27:09 +01:00
Christian Boltz
62b872491f config.inc.php: add pointers between $CONF[encrypt] = 'authlib' and $CONF[authlib_default_flavor]
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1874 a1433add-5e2c-0410-b055-b7f2511e0802
2016-10-18 19:49:13 +00:00
Christian Boltz
c909d4a71e FetchmailHandler: use a valid date as default for 'date'
This fixes an invalid query when using mysql strict mode.

Reported by Martin Kenney, https://sourceforge.net/p/postfixadmin/bugs/380/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1873 a1433add-5e2c-0410-b055-b7f2511e0802
2016-09-30 21:12:15 +00:00
David Goodwin
f77309fd62 try and improve debian dependencies - see https://sourceforge.net/p/postfixadmin/bugs/382/
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1872 a1433add-5e2c-0410-b055-b7f2511e0802
2016-09-22 04:30:45 +00:00
Christian Boltz
cade17f777 update CHANGELOG.TXT:
- add section about 3.0.1 Debian packages
- import 2.3.8 CHANGELOG section from 2.3 branch


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1871 a1433add-5e2c-0410-b055-b7f2511e0802
2016-09-19 15:26:33 +00:00
David Goodwin
6e6da819d1 Merge remote-tracking branch 'svnexport/master' 2016-09-19 10:15:49 +01:00
David Goodwin
b44459c016 sigh....
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1868 a1433add-5e2c-0410-b055-b7f2511e0802
2016-09-19 09:13:40 +00:00
David Goodwin
fbd4b5ebe9 bump debian/changelog
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1866 a1433add-5e2c-0410-b055-b7f2511e0802
2016-09-19 09:09:06 +00:00
David Goodwin
35ce6a61e6 add configs/ directory to debian packages - is used by smarty
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1865 a1433add-5e2c-0410-b055-b7f2511e0802
2016-09-19 09:08:00 +00:00
David Goodwin
124354aa19 fix missing smarty/ dir - see https://sourceforge.net/p/postfixadmin/discussion/676076/thread/00134b8a
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1864 a1433add-5e2c-0410-b055-b7f2511e0802
2016-09-19 09:06:15 +00:00
David Goodwin
ef6a1ecdbb Merge remote-tracking branch 'svnexport/master'
Postfixadmin v3.0
2016-09-15 19:11:34 +01:00
Christian Boltz
6eda18fcde prepare PostfixAdmin 3.0 release
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1861 a1433add-5e2c-0410-b055-b7f2511e0802
2016-09-10 20:02:33 +00:00