see: https://github.com/postfixadmin/postfixadmin/issues/302 - check if the session key exists; and if not show something that may help

postfixadmin_3.2
David Goodwin 5 years ago
parent 5731742fd6
commit e7d736aae4

@ -37,8 +37,12 @@ if ($CONF['configured'] !== true) {
check_db_version(); # check if the database layout is up to date (and error out if not)
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if (!isset($_SESSION['PFA_token'])) {
die("Invalid token (session timeout; refresh the page and try again?)");
}
if (safepost('token') != $_SESSION['PFA_token']) {
die('Invalid token!');
die('Invalid token! (CSRF check failed)');
}
$lang = safepost('lang');

Loading…
Cancel
Save