diff --git a/ajax/ajax_categorymgmt.php b/ajax/ajax_categorymgmt.php
index 9812df1c..e94796c0 100644
--- a/ajax/ajax_categorymgmt.php
+++ b/ajax/ajax_categorymgmt.php
@@ -32,6 +32,10 @@ if ( ! SP_Init::isLoggedIn() ) {
SP_Common::printXML(_('La sesión no se ha iniciado o ha caducado'),10);
}
+if (!isset($_POST["sk"]) || !SP_Common::checkSessionKey($_POST["sk"])) {
+ SP_Common::printXML(_('CONSULTA INVÁLIDA'));
+}
+
SP_Users::checkUserAccess('config') || SP_Html::showCommonError('unavailable');
$intCategoryFunction = ( isset($_POST["categoryFunction"]) ) ? (int) $_POST["categoryFunction"] : 0;
diff --git a/ajax/ajax_getFiles.php b/ajax/ajax_getFiles.php
index 00c953b0..da658a60 100644
--- a/ajax/ajax_getFiles.php
+++ b/ajax/ajax_getFiles.php
@@ -41,11 +41,16 @@ if ( SP_Config::getValue('filesenabled') == 0 ){
$accountId = ( isset($_GET['id']) ) ? (int)$_GET['id'] : 0 ;
$deleteEnabled = ( isset($_GET['del']) ) ? (int)$_GET['del'] : 0 ;
+$skey = ( isset($_GET['sk']) ) ? SP_Html::sanitize($_GET['sk']) : NULL;
+
+if ( is_null($skey) ) {
+ return _('CONSULTA INVÁLIDA');
+}
$files = SP_Files::getFileList($accountId, $deleteEnabled);
if ( ! is_array($files) || count($files) === 0 ){
- return;
+ return;
}
?>
@@ -55,7 +60,6 @@ if ( ! is_array($files) || count($files) === 0 ){
endforeach;?>
-
diff --git a/inc/tpl/accounts.php b/inc/tpl/accounts.php
index 851e3ebc..b3cdce3f 100644
--- a/inc/tpl/accounts.php
+++ b/inc/tpl/accounts.php
@@ -135,7 +135,7 @@ $showEditPass = ($action == "accedit"
&& ! $account->accountIsHistory);
$showDelete = ($action == "accdelete" && $account->checkAccountAccess("accdelete") && SP_Users::checkUserAccess("accdelete"));
$filesDelete = ( $action == 'accedit' ) ? 1 : 0;
-$skey = SP_Common::getSessionKey();
+$skey = SP_Common::getSessionKey(TRUE);
?>
echo $title['name']; ?>
@@ -405,7 +405,7 @@ $skey = SP_Common::getSessionKey();
if ( $showDelete ): ?>
-
+
endif; ?>
diff --git a/inc/tpl/categories.php b/inc/tpl/categories.php
index fdbaf6b4..9f3d6292 100644
--- a/inc/tpl/categories.php
+++ b/inc/tpl/categories.php
@@ -50,6 +50,7 @@ $categoriesSelProp2 = array ( "name" => "categoryId",
"js" => "",
"attribs" => "");
+$skey = SP_Common::getSessionKey(TRUE);
?>
@@ -63,7 +64,7 @@ $categoriesSelProp2 = array ( "name" => "categoryId",
-
+
@@ -79,7 +80,7 @@ $categoriesSelProp2 = array ( "name" => "categoryId",
-
+
@@ -93,7 +94,7 @@ $categoriesSelProp2 = array ( "name" => "categoryId",
SP_Html::printSelect(SP_Category::getCategories(), $categoriesSelProp2); ?>
-
+
@@ -109,4 +110,4 @@ $categoriesSelProp2 = array ( "name" => "categoryId",
placeholder_text_single: " echo _('Seleccionar Categoría'); ?>",
disable_search_threshold: 10,
no_results_text: " echo _('Sin resultados'); ?>"});
-
+
\ No newline at end of file
diff --git a/inc/tpl/groups.php b/inc/tpl/groups.php
index bed1c44a..7fef7703 100644
--- a/inc/tpl/groups.php
+++ b/inc/tpl/groups.php
@@ -53,7 +53,7 @@ $activeTab = $data['active'];
" />
" />
-
+
diff --git a/inc/tpl/profiles.php b/inc/tpl/profiles.php
index 96a77797..29116cb1 100644
--- a/inc/tpl/profiles.php
+++ b/inc/tpl/profiles.php
@@ -113,7 +113,7 @@ $activeTab = $data['active'];
" />
-
+