diff --git a/admin/xmldb/actions/XMLDBAction.class.php b/admin/xmldb/actions/XMLDBAction.class.php index 615dd1e9e1f..fd613b546c4 100644 --- a/admin/xmldb/actions/XMLDBAction.class.php +++ b/admin/xmldb/actions/XMLDBAction.class.php @@ -47,6 +47,8 @@ class XMLDBAction { var $postaction; //Action to execute at the end of the invoke script + var $sesskey_protected; // Actions must be protected by sesskey mechanishm + /** * Constructor */ @@ -72,6 +74,7 @@ class XMLDBAction { $this->output = NULL; $this->errormsg = NULL; $this->subaction = NULL; + $this->sesskey_protected = true; } /** @@ -130,13 +133,18 @@ class XMLDBAction { } /** - * main invoke method, it simply sets the postaction attribute - * if possible + * main invoke method, it sets the postaction attribute + * if possible and checks sesskey_protected if needed */ function invoke() { global $SESSION; + /// Sesskey protection + if ($this->sesskey_protected) { + require_sesskey(); + } + /// If we are used any dir, save it in the lastused session object /// Some actions can use it to perform positioning if ($lastused = optional_param ('dir', NULL, PARAM_PATH)) { diff --git a/admin/xmldb/actions/check_indexes/check_indexes.class.php b/admin/xmldb/actions/check_indexes/check_indexes.class.php index baa7103f92a..7eb39f76016 100644 --- a/admin/xmldb/actions/check_indexes/check_indexes.class.php +++ b/admin/xmldb/actions/check_indexes/check_indexes.class.php @@ -94,7 +94,7 @@ class check_indexes extends XMLDBAction { $o.= '
' . $this->str['confirmcheckindexes'] . '
'; $o.= '| ';
$o.= ' ';
- $o.= ' ';
$o.= ' | ';
$o.= ' ';
diff --git a/admin/xmldb/actions/delete_field/delete_field.class.php b/admin/xmldb/actions/delete_field/delete_field.class.php
index 3bdee9aa400..2a320756645 100644
--- a/admin/xmldb/actions/delete_field/delete_field.class.php
+++ b/admin/xmldb/actions/delete_field/delete_field.class.php
@@ -77,7 +77,7 @@ class delete_field extends XMLDBAction {
$o.= ' ' . $this->str['confirmdeletefield'] . '
| ||||||||||||||||||||||||||||||||||||||||||||