From 10a47cb1347ec8c10daa40843fe24444f5b41c8c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 14 May 2015 11:49:56 +0000 Subject: [PATCH] added CSRF protection --- lam/lib/lists.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index 6fa649d3..fa644792 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -545,6 +545,9 @@ class lamList { * @return String HTML fragment to insert into beginning of account list */ protected function listDoPost() { + if (!empty($_POST)) { + validateSecurityToken(); + } // check if button was pressed and if we have to add/delete an account or call file upload if (isset($_POST['new']) || isset($_POST['del']) || isset($_POST['fileUpload'])){ if (!checkIfWriteAccessIsAllowed($this->type)) { @@ -720,6 +723,7 @@ class lamList { $container->addElement(new htmlHiddenInput($selAccounts[$i], 'on')); } $container->addElement(new htmlHiddenInput('clickedAccount', $id)); + addSecurityTokenToMetaHTML($container); parseHtml(null, $container, array(), false, $this->tabindex, $this->type); @@ -826,6 +830,7 @@ class lamList { */ protected function listPrintFooter() { ?> +