clean up login/authentication and remove unused labels

This commit is contained in:
Fernando Ontiveros
2025-04-18 07:31:14 +00:00
parent 54cfe40f90
commit e749eb9b5e
13 changed files with 33 additions and 72 deletions

View File

@@ -10,7 +10,7 @@ try {
$usr = '';
$pwd = '';
if (strpos($_SERVER['HTTP_REFERER'], 'home/login') !== false) {
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'home/login') !== false) {
$urlLogin = '../home/login';
} else {
$urlLogin = (substr(SYS_SKIN, 0, 2) !== 'ux')? 'login' : '../main/login';
@@ -226,7 +226,6 @@ try {
if (!is_null($user)) {
$userTimeZone = $user->getUsrTimeZone();
if (trim($userTimeZone) == '') {
$arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace"));
@@ -236,16 +235,18 @@ try {
$_SESSION['USR_TIME_ZONE'] = $userTimeZone;
}
if (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) {
$dateTime = new \ProcessMaker\Util\DateTime();
if (isset($_SESSION['__SYSTEM_UTC_TIME_ZONE__']) && $_SESSION['__SYSTEM_UTC_TIME_ZONE__']) {
$dateTime = new \ProcessMaker\Util\DateTime();
$timeZoneOffset = $dateTime->getTimeZoneOffsetByTimeZoneId($_SESSION['USR_TIME_ZONE']);
$timeZoneOffset = $dateTime->getTimeZoneOffsetByTimeZoneId($_SESSION['USR_TIME_ZONE']);
if ($timeZoneOffset === false || $timeZoneOffset != (int)($_POST['form']['BROWSER_TIME_ZONE_OFFSET'])) {
$_SESSION['__TIME_ZONE_FAILED__'] = true;
$_SESSION['BROWSER_TIME_ZONE'] = $dateTime->getTimeZoneIdByTimeZoneOffset((int)$_POST['form']['BROWSER_TIME_ZONE_OFFSET'], false);
}
if ($timeZoneOffset === false || $timeZoneOffset != (int)($_POST['form']['BROWSER_TIME_ZONE_OFFSET'])) {
$_SESSION['__TIME_ZONE_FAILED__'] = true;
$_SESSION['BROWSER_TIME_ZONE'] = $dateTime->getTimeZoneIdByTimeZoneOffset((int)$_POST['form']['BROWSER_TIME_ZONE_OFFSET'], false);
} else {
$_SESSION['__TIME_ZONE_FAILED__'] = False;
}
}
//Set data
$aUser = $RBAC->userObj->load($_SESSION['USER_LOGGED']);

View File

@@ -1,28 +0,0 @@
<?php
/**
* index.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$newFile = str_replace ( 'index.php', 'login.php' , __FILE__ );
return $newFile;

View File

@@ -75,4 +75,4 @@ $response->data = DateTime::convertUtcToTimeZone($proData);
$response->totalCount = Process::getCounter($usrUid);
echo G::json_encode($response);
header("Content-Type: application/json");

View File

@@ -3,7 +3,7 @@
* processes_List.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
* Copyright (C) 2004 - 2008 Colosa Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as