20 Commits
Author SHA1 Message Date
Rodrigo Cortés Cano bff07294dd Add daily Vacation choice and optional INI reply intervals (#1189)
Update vacation interval selection and support readable choice names 

thanks @TrapoSAMA
2026-11-12 19:57:12 +00:00
David Goodwin 8a1f9a11af CSRF protection - support multiple tokens (#985)
possible fix for https://github.com/postfixadmin/postfixadmin/issues/967

CSRF Token changes : rather than have one PFA_Token value in $_SESSION, store a list of them, where each value has a time stamp it was issued on. The aim is to allow the user to have multiple browser tabs open at once - and not have the last tab that loaded trample on others. Tokens expire after 1 hour.

Adds a Smarty helper function `{CSRF_Token}` which will output `<input type=hidden name=CSRF_Token value=asdf123>` or `{CSRF_Token type=url}` which outputs a literal string like 'asdf123' suitable for placing in a URL.

Adds a PHP exception handler in public/common.php, which could be used to display a more friendly error message/response (but at the moment is fairly minimal).

Removes most uses of `die()` within the codebase, and instead moves to throw an exception
2026-03-01 19:30:16 +00:00
Copilot 3bdc282289 Upgrade to Bootstrap 5.3.0, add lightmode/darkmode switch, drop datepicker js (use html5 datetime-local) (#987)
* Upgrade to Bootstrap 5.3.0 with Bootstrap Icons
* token improvements to setup.php rendering 
* improve backup page rendering
* move to use html5 datetime-local field for vacation from/to rather than the previous js version
* remove datetimepicker js and bootstrap js and jquery (no longer needed)
* vacation: we load any previous dates in from the database, these could include ancient dates, so default them to now and now+1 if they are before today
* drop bootstrap 3.4.1 css
* bootstrap - add light mode / dark mode switch - taken from https://github.com/404GamerNotFound/bootstrap-5.3-dark-mode-light-mode-switch
2026-02-28 10:17:56 +00:00
David Goodwin 0ecc961eb3 make psalm happy 2026-01-29 13:46:21 +00:00
David Goodwin 8693d2bd13 vacation.php: use immutable DateTime, fix range / time setting (thanks @copilot) 2026-01-29 13:33:27 +00:00
David Goodwin 52794bede7 misc fixes for psalm after allowing it to be updated 2026-01-28 09:50:26 +00:00
David Goodwin 460c624275 remove more references to sourceforge 2025-07-13 18:29:37 +01:00
David Goodwin 759304ecb8 apparently these all need reformatting 2024-12-05 14:33:41 +00:00
Christian Boltz 43ce9feda1 Fix typos introduced in https://github.com/postfixadmin/postfixadmin/pull/665 / e279c77ca5 2022-10-18 23:24:38 +02:00
Jan Kruis e279c77ca5 languages/nl.lang translation from english for new function such as dkim and password
public/editactive.php			edit wrong description text it said this module is used for deleting admin domains mailbos etc
					modify templates that it is used

public/list-virtual.php			modify templates that it is used
					modify the remarks behind arguments and internal , the texteditor thought the text after this was still remark text untl is see */

public/vacation.php and
model/VacantionHandel.php		adjust date string actionFrom and activeUntil these are written in the database as e.g. 2020-10-01 15:14:00 and 2020-10-30-15:14:00
					this should be 2020-10-01 00:00:00 and 2020-10-30 23:59:59 so that it contains all day, this happens if no holiday has been set for the account yet
					when adjusting the dates, the seconds of until are set to 00 instead of 59. When the holiday is canceled and then action is taken again, the from time
					to the time when the setting is made.

templates/editform.tpl			remove blank space

templates/list-virtual_mailbox.tpl	remove indent tabs
2022-10-12 17:46:15 +02:00
David Goodwin 2d6ded2786 PSR2 -> PSR12 formatting 2022-06-28 13:46:11 +01:00
David Goodwin 5a305bc830 allow vacation settings to include a time (but specify a time if one is not), this should stop us overwriting the time - see https://sourceforge.net/p/postfixadmin/discussion/676076/thread/5637ae3bc5/?limit=25#24a5 2021-05-13 16:16:22 +01:00
David Goodwin b2831d1241 psalm improvements 2021-02-17 21:29:18 +00:00
David Goodwin d80d3573f1 format 2021-01-12 22:15:28 +00:00
David Goodwin a20f05ca71 try and fix vacation editing etc - see https://github.com/postfixadmin/postfixadmin/issues/416 2021-01-12 22:08:35 +00:00
David Goodwin 750838d7f7 psalm fixes; make safepost()/safeget() return strings 2020-11-09 21:40:52 +00:00
David Goodwin f6f62180e8 remove some global variables 2020-09-27 11:02:58 +01:00
David Goodwin 8754af58cb fix undefined variables (psalm) 2020-03-12 20:45:51 +00:00
Adrien Crivelli 15df6c1d7b Reformat everything with PHP-Cs-Fixer 2018-01-26 23:54:37 +09:00
David Goodwin 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