Merged in mcuiza/processmaker/HOR-1378 (pull request #4498)

HOR-1378
This commit is contained in:
Julio Cesar Laura Avendaño
2016-07-06 15:24:59 -04:00
7 changed files with 57 additions and 29 deletions

View File

@@ -34,6 +34,15 @@
//require_once 'classes/model/Process.php';
//require_once 'classes/model/Task.php';
if (!isset($_SESSION['USER_LOGGED'])) {
$responseObject = new stdclass();
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
$responseObject->success = true;
$responseObject->lostSession = true;
print G::json_encode( $responseObject );
die();
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$_REQUEST = $filter->xssFilterHard($_REQUEST);

View File

@@ -1,5 +1,12 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
$responseObject = new stdclass();
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
$responseObject->success = true;
$responseObject->lostSession = true;
print G::json_encode( $responseObject );
die();
}
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;

View File

@@ -22,18 +22,12 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
if (!isset($_SESSION['USER_LOGGED'])) {
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
die( '<script type="text/javascript">
try
{
prnt = parent.parent;
top.location = top.location;
}
catch (err)
{
parent.location = parent.location;
}
</script>');
$responseObject = new stdclass();
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
$responseObject->success = true;
$responseObject->lostSession = true;
print G::json_encode( $responseObject );
die();
}
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {

View File

@@ -23,8 +23,16 @@
*/
//validate the data post
if (!isset($_SESSION['USER_LOGGED'])) {
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
die( '<script type="text/javascript">
if(!strpos($_SERVER['REQUEST_URI'], 'gmail')) {
$responseObject = new stdclass();
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
$responseObject->success = true;
$responseObject->lostSession = true;
print G::json_encode( $responseObject );
die();
} else {
G::SendTemporalMessage('ID_LOGIN_AGAIN', 'warning', 'labels');
die('<script type="text/javascript">
try
{
var olink = document.location.href;
@@ -58,6 +66,7 @@ if (!isset($_SESSION['USER_LOGGED'])) {
parent.location = parent.location;
}
</script>');
}
}
/**

View File

@@ -1,5 +1,13 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
if(!strpos($_SERVER['REQUEST_URI'], 'gmail')) {
$responseObject = new stdclass();
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
$responseObject->success = true;
$responseObject->lostSession = true;
print G::json_encode( $responseObject );
die();
} else {
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
die( '<script type="text/javascript">
try
@@ -36,6 +44,7 @@ if (!isset($_SESSION['USER_LOGGED'])) {
parent.location = parent.location;
}
</script>');
}
}
require_once 'classes/model/AppDelegation.php';

View File

@@ -1,10 +1,4 @@
<?php
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$_GET = $filter->xssFilterHard($_GET);
$_REQUEST = $filter->xssFilterHard($_REQUEST);
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
if (!isset($_SESSION['USER_LOGGED'])) {
$responseObject = new stdclass();
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
@@ -14,6 +8,12 @@ if (!isset($_SESSION['USER_LOGGED'])) {
die();
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$_GET = $filter->xssFilterHard($_GET);
$_REQUEST = $filter->xssFilterHard($_REQUEST);
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
//Getting the extJs parameters
$callback = isset( $_REQUEST["callback"] ) ? $_REQUEST["callback"] : "stcCallback1001";
$dir = isset( $_REQUEST["dir"] ) ? $_REQUEST["dir"] : "DESC";

View File

@@ -1,10 +1,4 @@
<?php
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$_GET = $filter->xssFilterHard($_GET);
$_REQUEST = $filter->xssFilterHard($_REQUEST);
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
if (!isset($_SESSION['USER_LOGGED'])) {
$responseObject = new stdclass();
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
@@ -14,6 +8,12 @@ if (!isset($_SESSION['USER_LOGGED'])) {
die();
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$_GET = $filter->xssFilterHard($_GET);
$_REQUEST = $filter->xssFilterHard($_REQUEST);
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
try {
$userUid = $_SESSION['USER_LOGGED'];
$filters['paged'] = isset( $_REQUEST["paged"] ) ? $filter->sanitizeInputValue($_REQUEST["paged"], 'nosql') : true;