Put security fixes to develop branch
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user