diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 6adfd25b..9f46a508 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -1298,6 +1298,9 @@ class accountContainer { * Prints the header of the account pages. */ private function printPageHeader() { + if (!empty($_POST)) { + validateSecurityToken(); + } include '../main_header.php'; echo ''; echo "
\n"; echo ''; + echo ''; } /** diff --git a/lam/templates/delete.php b/lam/templates/delete.php index f7242886..97094baa 100644 --- a/lam/templates/delete.php +++ b/lam/templates/delete.php @@ -4,7 +4,7 @@ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - Copyright (C) 2007 - 2014 Roland Gruber + Copyright (C) 2007 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,6 +62,10 @@ if (!isLoggedIn()) { // Set correct language, codepages, .... setlanguage(); +if (!empty($_POST)) { + validateSecurityToken(); +} + if (isset($_POST['type']) && !preg_match('/^[a-z0-9_]+$/i', $_POST['type'])) { logNewMessage(LOG_ERR, 'Invalid type: ' . $_POST['type']); die(); @@ -90,6 +94,7 @@ if (isset($_GET['type']) && isset($_SESSION['delete_dn'])) { echo "
"; echo "
\n"; echo "\n"; + echo ''; echo "\n"; echo "" . _("Do you really want to remove the following accounts?") . ""; echo "

\n"; @@ -149,6 +154,7 @@ if (isset($_POST['delete'])) { // Show HTML Page include 'main_header.php'; echo "\n"; + echo ''; echo "\n"; echo "

\n"; echo "
\n"; diff --git a/lam/templates/initsuff.php b/lam/templates/initsuff.php index 878b7273..6d3325cb 100644 --- a/lam/templates/initsuff.php +++ b/lam/templates/initsuff.php @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2013 Roland Gruber + Copyright (C) 2003 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -46,6 +46,10 @@ if (!checkIfWriteAccessIsAllowed()) { setlanguage(); +if (!empty($_POST)) { + validateSecurityToken(); +} + // check if user already pressed button if (isset($_POST['add_suff']) || isset($_POST['cancel'])) { if (isset($_POST['add_suff'])) { @@ -191,6 +195,7 @@ include 'main_header.php'; $buttonContainer->addElement(new htmlButton('cancel', _("Cancel"))); $buttonContainer->addElement(new htmlHiddenInput('new_suff', implode(";", $new_suff))); $container->addElement($buttonContainer); + addSecurityTokenToMetaHTML($container); $tabindex = 1; parseHtml(null, $container, array(), false, $tabindex, 'user'); diff --git a/lam/templates/massBuildAccounts.php b/lam/templates/massBuildAccounts.php index 7e05d489..27e46d4d 100644 --- a/lam/templates/massBuildAccounts.php +++ b/lam/templates/massBuildAccounts.php @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2014 Roland Gruber + Copyright (C) 2004 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -56,6 +56,10 @@ if (!isLoggedIn()) { // Set correct language, codepages, .... setlanguage(); +if (!empty($_POST)) { + validateSecurityToken(); +} + // show LDIF if requested if (isset($_GET['showldif'])) { //download file @@ -258,6 +262,7 @@ else { massPrintBackButton($scope, $selectedModules, $container); } +addSecurityTokenToMetaHTML($container); $tabindex = 1; parseHtml(null, $container, array(), false, $tabindex, $scope); diff --git a/lam/templates/masscreate.php b/lam/templates/masscreate.php index b55fbe3f..c87c20f5 100644 --- a/lam/templates/masscreate.php +++ b/lam/templates/masscreate.php @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2013 Roland Gruber + Copyright (C) 2004 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -60,6 +60,10 @@ if (!isLoggedIn()) { // Set correct language, codepages, .... setlanguage(); +if (!empty($_POST)) { + validateSecurityToken(); +} + // show CSV if requested if (isset($_GET['getCSV'])) { //download file @@ -211,6 +215,7 @@ if (!empty($types)) { $table->addElement(new htmlButton('submit', _('Ok')), true); } +addSecurityTokenToMetaHTML($table); parseHtml(null, $table, array(), false, $tabindex, 'user'); ?>