Put security fixes to develop branch

This commit is contained in:
Julio Cesar Laura Avendaño
2017-06-14 11:14:23 -04:00
15 changed files with 400 additions and 322 deletions

View File

@@ -29,6 +29,18 @@ class Designer extends Controller
$client = $this->getClientCredentials();
if (isset($httpData->tracker_designer) && $httpData->tracker_designer == 1) {
try {
if (!isset($_SESSION['CASE']) && !isset($_SESSION['PIN'])) {
throw (new \Exception(
\G::LoadTranslation('ID_CASE_NOT_EXISTS') . "\n" . \G::LoadTranslation('ID_PIN_INVALID')
));
}
\ProcessMaker\BusinessModel\Light\Tracker::authentication($_SESSION['CASE'], $_SESSION['PIN']);
} catch (\Exception $e) {
Bootstrap::registerMonolog('CaseTracker', 400, $e->getMessage(), [], SYS_SYS, 'processmaker.log');
\G::header('Location: /errors/error403.php');
die();
}
$client["tracker_designer"] = 1;
}

View File

@@ -38,10 +38,18 @@ class Installer extends Controller
public function index ($httpData)
{
if (file_exists(FILE_PATHS_INSTALLED)) {
$this->setJSVar('messageError', G::LoadTranslation('ID_PROCESSMAKER_ALREADY_INSTALLED'));
$this->includeExtJS('installer/stopInstall');
$this->setView('installer/mainStopInstall');
G::RenderPage('publish', 'extJs');
return;
}
if ((strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') && (file_exists($this->path_shared . 'partner.info'))) {
$this->includeExtJS( 'installer/stopInstall');
$this->setView( 'installer/mainStopInstall' );
G::RenderPage( 'publish', 'extJs' );
$this->setJSVar('messageError', G::LoadTranslation('ID_NO_INSTALL'));
$this->includeExtJS('installer/stopInstall');
$this->setView('installer/mainStopInstall');
G::RenderPage('publish', 'extJs');
return;
}