1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-31 10:04:20 +03:00

68 Commits

Author SHA1 Message Date
5f24d12c5f allow the TOTP qr code to render (relax Content Security Policy to allow img-src: self data) 2025-06-11 21:24:25 +01:00
a9215a99fa change project reference 2025-06-01 15:36:50 +01:00
9620056277 formatting 2025-02-21 09:58:44 +00:00
0f53b0343b add a lax content-security-policy http header - see #905 2025-02-21 09:55:29 +00:00
03d5fb4b29 tighten up the cookie used by postfixadmin for PHP sessions - add samesite, httponly and perhaps secure flags, see #903, thanks @gitblacker 2025-02-21 09:11:02 +00:00
f01274ec94 try relaxing composer dependencies to allow php8.2 dev support, reformat so composer format passes 2024-04-22 21:02:01 +01:00
1988a70489 drop local copy of smarty library; use composer for installation of it; allow smarty 4.x which appears to work and also better supports php8 etc 2022-09-17 10:49:57 +01:00
a97771adfd Automatic code style fixes 2022-07-15 11:29:55 +02:00
e960fa96a0 put some sort of warning if a turkish locale is set - see #541 2022-07-13 21:10:35 +01:00
0b9b7db917 Merge remote-tracking branch 'origin/master' into feature-improve-pacrypt 2021-09-29 18:04:49 +01:00
12ed3fba3d avoid a clickjacking attack reported on huntr.dev by @ranjit-git 2021-08-04 20:38:06 +01:00
2ccda5c26a move to use the composer autoloader 2021-07-07 21:41:59 +01:00
2edabc3e03 phpcs insists on some brace changes 2021-04-13 21:19:16 +01:00
2a58056fff be more consistent with how we load common.php, improve comments 2021-03-09 20:34:09 +00:00
b2831d1241 psalm improvements 2021-02-17 21:29:18 +00:00
b8fa60bb8a more type hints / psalm fixes 2020-09-28 20:33:54 +01:00
484acfbf59 Remove the random_compat lib. 2020-09-27 10:47:22 +01:00
8754af58cb fix undefined variables (psalm) 2020-03-12 20:45:51 +00:00
036245063e drop references to magic_quotes; see: https://github.com/postfixadmin/postfixadmin/pull/325 2020-02-10 11:26:23 +00:00
87824ef970 psalm fixes/workarounds; require PHP 5.6+ 2019-10-19 20:51:05 +01:00
a0b4e690b2 only load random_compat if PHP_VERSION is < 7.0 2019-08-10 21:33:39 +01:00
7e7f644952 skip this check if unit test 2019-01-03 19:35:33 +00:00
2b31e71d5c improve error message 2019-01-01 20:39:41 +00:00
4fcdba9cf4 run php-cs-fixer (code reforamt) 2018-12-28 19:31:43 +00:00
5d74ff4cc7 only require language if non-empty 2018-12-27 22:01:53 +00:00
1c4a6080d7 make phar loading optional depending on the extension being present or not 2018-05-25 09:44:20 +01:00
05bf2d2013 if unconfigured, recommend to edit config.local.php
... instead of config.inc.php

(idea based on comments on
7c38bdd871 )
2018-05-06 23:58:01 +02:00
b97decb7c2 add a lib directory; move smarty into it; add random_compat phar (for random_bytes() on PHP < 7) 2018-04-29 20:27:33 +01:00
9bef45aed5 remove logout behaviour from common.php (never used); try and fix logout in login.php - see #130 2018-02-05 20:47:07 +00:00
15df6c1d7b Reformat everything with PHP-Cs-Fixer 2018-01-26 23:54:37 +09:00
f0be0ebf62 remove more incpath usages 2018-01-25 21:13:36 +00:00
99147d51eb move public facing stuff into public/, this allows us to stop exposing templates_c/ etc to the world 2018-01-25 20:27:09 +00:00
9df6de65af Finally get rid of variables.inc.php
Initialize $error and $tMailbox where needed.

The other variables in variables.inc.php are already initialized
everywhere.
2017-04-10 20:54:34 +02:00
431bd3d810 rename session cookie
With the default PHPSESSID cookie name, there are some rare (and hard to
debug) cases that break logging in if a different application on the
domain also uses a PHPSESSID cookie. See
https://sourceforge.net/p/postfixadmin/bugs/314/ for details.

Using 'postfixadmin_session' as cookie name should fix this.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1846 a1433add-5e2c-0410-b055-b7f2511e0802
2016-05-22 16:57:09 +00:00
9c022f7e01 merge patch from https://sourceforge.net/p/postfixadmin/bugs/347/ (thank you Eugene Grosbein) - explictly set session_cache_limiter to nocache
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1792 a1433add-5e2c-0410-b055-b7f2511e0802
2015-07-12 12:09:34 +00:00
e39510726a use !empty to avoid error
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1623 a1433add-5e2c-0410-b055-b7f2511e0802
2014-01-14 16:00:42 +00:00
fbc18ff993 login.php, common.php:
- when login.php is requested, logout the current admin/user
  https://sourceforge.net/p/postfixadmin/bugs/284/



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1568 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-11 00:06:27 +00:00
6e2e132bac remove "postfixadmin.com" in comments in lots of files
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1558 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 15:57:32 +00:00
c6ca4f9bae common.php:
- call Config::write() earlier, because check_language() uses it
- later add $PALANG with Config::write(__LANG)

Thanks to <controlcde> for reporting the results of this bug on IRC
(even if I had to hunt it down to find the reason ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1548 a1433add-5e2c-0410-b055-b7f2511e0802
2013-10-31 20:52:45 +00:00
4d9a338eb2 After hunting an "undefined index transport" error in list-domain, I
found out that the 'Config' class is too static - it shares its static
data with the 'Lang' child class. 

This caused a conflict because we have $CONF[transport] and 
$PALANG[transport], and Config::read('transport') returned the $PALANG 
text.

To fix this, all texts are now stored as $CONF[__LANG].
I also dropped the 'Lang' class.


model/Config.php:
- mark the 'Config' class as final to ensure we don't trap into the 
  "too static" problem again.
- bool(): display and log an error message if a $CONF option does not
  contain YES or NO (that would have uncovered this bug much earlier)
- add lang() and lang_f() wrapper functions to get $PALANG texts
- remove unused $__cache and $__objects

model/Lang.php:
- deleted

common.php:
- store $PALANG as $CONF[__LANG]

lots of files:
- replace Lang::read() and Lang::read_f() calls with Config::lang()
  and Config::lang_f()




git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1536 a1433add-5e2c-0410-b055-b7f2511e0802
2013-10-13 18:11:18 +00:00
631c6e754f common.php:
- move postfixadmin_autoload() and spl_autoload_register upwards
  (it's needed earlier after using the Config class in more functions)
- call Config::write earlier (as soon as $CONF is complete)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1454 a1433add-5e2c-0410-b055-b7f2511e0802
2013-04-01 22:12:10 +00:00
ecf7757981 Remove getInstance calls; not needed as we use ::write
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1239 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-24 22:25:36 +00:00
646c790371 common.php, scripts/postfixadmin-cli.php:
- init Lang and Config classes in common.php instead of postfixadmin-cli.php -
  they need to be available in the web interface also


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1215 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-17 23:37:52 +00:00
4611b111e3 common.php:
- merge with scripts/common.php
- don't start/use session in CLI mode
- don't load smarty.inc.php in CLI mode
- hardcode language to 'en' in CLI mode (was done in postfixadmin-cli.php before)

scripts/postfixadmin-cli.php - __bootstrap():
- use common.php instead of scripts/common.php
- don't load languages/language.php and languages/en.lang (already
  done via common.php)
- don't call language_hook (already done via common.php)

scripts/common.php:
- deleted
- dropped helper functions low(), up(), r() and pr() which were just
  shortnames for existing PHP functions


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1214 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-17 23:19:57 +00:00
a5f3cb9b96 config.inc.php:
- new config option $CONF['language_hook']
  Hook function to override or add translations to $PALANG.
  Example hook function included (commented out).

common.php:
- honor $CONF['language_hook']

scripts/postfixadmin-cli.php:
- honor $CONF['language_hook']
- add TODO - language shouldn't be hardcoded to english

This implements my feature request at
http://sourceforge.net/tracker/?func=detail&aid=3292408&group_id=191583&atid=937967


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1176 a1433add-5e2c-0410-b055-b7f2511e0802
2011-08-23 21:23:16 +00:00
b0bd8cd1f5 see changeset:952 ... move php code out of template into here
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@953 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-07 23:31:12 +00:00
98c0252a08 common.php:
- store language in session variable
  (BTW: storing it only at login instead of calling check_language() on 
  every page would save some processor cycles ;-)

templates/header.tpl:
- add   class="lang-XY"   (where XY is the language to the body tag.
  This allows language-specific CSS code: .lang-XY table {...}

This commit implements the feature request from J.Kruis (jan-kruis)
https://sourceforge.net/tracker/?func=detail&aid=2903088&group_id=191583&atid=937967



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@872 a1433add-5e2c-0410-b055-b7f2511e0802
2010-09-30 20:43:52 +00:00
7229502738 Small typo fixed...
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@761 a1433add-5e2c-0410-b055-b7f2511e0802
2009-11-06 19:23:07 +00:00
cf40467570 - accidentially deleted header.php. Needed for setup
- add some error checks.

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@759 a1433add-5e2c-0410-b055-b7f2511e0802
2009-11-06 19:16:14 +00:00
b1287d97e2 - big merge of Postfixadmin smarty into trunk
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@757 a1433add-5e2c-0410-b055-b7f2511e0802
2009-11-05 14:55:39 +00:00