M3 Security Fixes for Pass 37
This commit is contained in:
@@ -75,8 +75,6 @@ class DeleteOldLabels extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// dump($filesToDeleteArr);
|
|
||||||
|
|
||||||
// Delete Old Files
|
// Delete Old Files
|
||||||
File::delete($filesToDeleteArr);
|
File::delete($filesToDeleteArr);
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace Modules\M3\Console;
|
namespace Modules\M3\Console;
|
||||||
|
|
||||||
use App;
|
|
||||||
use Ayeo\Barcode;
|
use Ayeo\Barcode;
|
||||||
use Cache;
|
use Cache;
|
||||||
use Config;
|
use Config;
|
||||||
@@ -54,7 +53,7 @@ class GenerateGS1Cmd extends Command
|
|||||||
|
|
||||||
// Get the Calling User
|
// Get the Calling User
|
||||||
$userId = $this->argument('user');
|
$userId = $this->argument('user');
|
||||||
$sHUSER = isset($userId) ? $userId : (m3_user() !== '' ? Str::upper(trim(m3_user())) : 'TWOSHIP');
|
$sHUSER = $userId ?? (m3_user() !== '' ? Str::upper(trim(m3_user())) : 'TWOSHIP');
|
||||||
$this->info('User: ' . $sHUSER);
|
$this->info('User: ' . $sHUSER);
|
||||||
|
|
||||||
// Get Manifest Array
|
// Get Manifest Array
|
||||||
@@ -223,7 +222,6 @@ class GenerateGS1Cmd extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
$html .= '</body> </html>';
|
$html .= '</body> </html>';
|
||||||
// App::call('App\Http\Controllers\utilitiesContoller@generateGS128');
|
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
|
|||||||
@@ -232,7 +232,6 @@ class Helper
|
|||||||
ini_set('max_execution_time', Config::get('arrays.PHPTimeOut'));
|
ini_set('max_execution_time', Config::get('arrays.PHPTimeOut'));
|
||||||
|
|
||||||
DB::connection(config('m3.connection', 'pgsql'))->table('ICM699M')->insert($data);
|
DB::connection(config('m3.connection', 'pgsql'))->table('ICM699M')->insert($data);
|
||||||
// dump($insertSQL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Substring in string between 2 Substrings
|
// Get Substring in string between 2 Substrings
|
||||||
@@ -246,9 +245,8 @@ class Helper
|
|||||||
if ($endPos === false) {
|
if ($endPos === false) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
$substring = substr($string, $startPos + strlen($start), $endPos - ($startPos + strlen($start)));
|
|
||||||
|
|
||||||
return $substring;
|
return substr($string, $startPos + strlen($start), $endPos - ($startPos + strlen($start)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function checkLength($jsonFields, $dbFields, $type)
|
public static function checkLength($jsonFields, $dbFields, $type)
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ class CloseShipment extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check Packages array before proceeding with CloseShipment
|
// Check Packages array before proceeding with CloseShipment
|
||||||
if (count($pACKAGES) > 0) {
|
if (! empty($pACKAGES)) {
|
||||||
// Get Packlist
|
// Get Packlist
|
||||||
$packingList = '';
|
$packingList = '';
|
||||||
$dOCTYPE = 'PackingList';
|
$dOCTYPE = 'PackingList';
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ class M3Controller extends Controller
|
|||||||
// Split Data and Write to ICM666M2
|
// Split Data and Write to ICM666M2
|
||||||
public function insertToICM666M2($dataSplit, $commentData)
|
public function insertToICM666M2($dataSplit, $commentData)
|
||||||
{
|
{
|
||||||
// dump($dataSplit);
|
|
||||||
|
|
||||||
$commentDataSS = explode("\n", $dataSplit);
|
$commentDataSS = explode("\n", $dataSplit);
|
||||||
$aXLINENO = 1;
|
$aXLINENO = 1;
|
||||||
@@ -410,7 +409,6 @@ class M3Controller extends Controller
|
|||||||
$hazMat = isset($iCM709MSEL->AT9WRN) ? $iCM709MSEL->AT9WRN : '';
|
$hazMat = isset($iCM709MSEL->AT9WRN) ? $iCM709MSEL->AT9WRN : '';
|
||||||
$insertArray['A1MATWRN'] = $hazMat;
|
$insertArray['A1MATWRN'] = $hazMat;
|
||||||
|
|
||||||
// $insertArray['A1USRN01']=$palletQty;
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// SQL Insert to ICM666M
|
// SQL Insert to ICM666M
|
||||||
|
|||||||
@@ -480,7 +480,7 @@ class TransferAPI extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A4SPR15A01 Exists : proceed
|
// A4SPR15A01 Exists : proceed
|
||||||
if ($a4SPR15A01 != '' && count($allMacpkrs) > 0) {
|
if ($a4SPR15A01 != '' && ! empty($allMacpkrs)) {
|
||||||
$jSON = json_encode([
|
$jSON = json_encode([
|
||||||
'DIVI' => $dIVI,
|
'DIVI' => $dIVI,
|
||||||
'WHS' => $wHS,
|
'WHS' => $wHS,
|
||||||
|
|||||||
@@ -280,13 +280,11 @@ class BoxPackToPalletController extends Controller
|
|||||||
$uSERWH = isset($iCM428M->R428WH) ? $iCM428M->R428WH : '';
|
$uSERWH = isset($iCM428M->R428WH) ? $iCM428M->R428WH : '';
|
||||||
$r428PL = isset($iCM428M->R428PL) ? $iCM428M->R428PL : '';
|
$r428PL = isset($iCM428M->R428PL) ? $iCM428M->R428PL : '';
|
||||||
|
|
||||||
$userWhsCoPlant = [
|
return [
|
||||||
'R428US' => $r428US,
|
'R428US' => $r428US,
|
||||||
'USERCO' => $uSERCO,
|
'USERCO' => $uSERCO,
|
||||||
'USERWHS' => $uSERWH,
|
'USERWHS' => $uSERWH,
|
||||||
'USERPL' => $r428PL,
|
'USERPL' => $r428PL,
|
||||||
];
|
];
|
||||||
|
|
||||||
return $userWhsCoPlant;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,7 +184,6 @@ class M3GetPDFFromCacheController extends Controller
|
|||||||
}
|
}
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
}
|
}
|
||||||
// dump($aYMACPKR);
|
|
||||||
// dump($iC670M);
|
// dump($iC670M);
|
||||||
// dump($iCM695M1);
|
// dump($iCM695M1);
|
||||||
|
|
||||||
|
|||||||
@@ -181,7 +181,6 @@ class OrderLinesOfClosedOrder extends Controller
|
|||||||
$urlParams = count($request->all()) > 0 ? $request->all() : '';
|
$urlParams = count($request->all()) > 0 ? $request->all() : '';
|
||||||
$reportDate = isset($urlParams['REPORTDATE']) ? \DateTime::createFromFormat('Y-m-d', trim($urlParams['REPORTDATE']))->format('Ymd') : today()->format('Ymd');
|
$reportDate = isset($urlParams['REPORTDATE']) ? \DateTime::createFromFormat('Y-m-d', trim($urlParams['REPORTDATE']))->format('Ymd') : today()->format('Ymd');
|
||||||
$toreportDate = isset($urlParams['TOREPORTDATE']) ? \DateTime::createFromFormat('Y-m-d', trim($urlParams['TOREPORTDATE']))->format('Ymd') : today()->format('Ymd');
|
$toreportDate = isset($urlParams['TOREPORTDATE']) ? \DateTime::createFromFormat('Y-m-d', trim($urlParams['TOREPORTDATE']))->format('Ymd') : today()->format('Ymd');
|
||||||
// dd($toreportDate);
|
|
||||||
$reportDateWD = isset($urlParams['REPORTDATE']) ? trim($urlParams['REPORTDATE']) : today()->format('Y-m-d');
|
$reportDateWD = isset($urlParams['REPORTDATE']) ? trim($urlParams['REPORTDATE']) : today()->format('Y-m-d');
|
||||||
$toreportDateWD = isset($urlParams['TOREPORTDATE']) ? trim($urlParams['TOREPORTDATE']) : today()->format('Y-m-d');
|
$toreportDateWD = isset($urlParams['TOREPORTDATE']) ? trim($urlParams['TOREPORTDATE']) : today()->format('Y-m-d');
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ class carrierMaintController extends Controller
|
|||||||
{
|
{
|
||||||
$currentUser = Helper::getUserCOWHSPLT();
|
$currentUser = Helper::getUserCOWHSPLT();
|
||||||
$userCO = $currentUser['UserCO'] ?? '';
|
$userCO = $currentUser['UserCO'] ?? '';
|
||||||
// $UserPL = $currentUser['UserPL'] ?? '';
|
|
||||||
|
|
||||||
// Insert record to ICM160M
|
// Insert record to ICM160M
|
||||||
// Verify record does not already exist in ICM160M
|
// Verify record does not already exist in ICM160M
|
||||||
@@ -65,7 +64,6 @@ class carrierMaintController extends Controller
|
|||||||
{
|
{
|
||||||
$currentUser = Helper::getUserCOWHSPLT();
|
$currentUser = Helper::getUserCOWHSPLT();
|
||||||
$userCO = $currentUser['UserCO'] ?? '';
|
$userCO = $currentUser['UserCO'] ?? '';
|
||||||
// $UserPL = $currentUser['UserPL'] ?? '';
|
|
||||||
|
|
||||||
// Insert record to ICM160M
|
// Insert record to ICM160M
|
||||||
if ($request->CANUM == null) {
|
if ($request->CANUM == null) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class execSummaryController extends Controller
|
|||||||
$checkWeight = isset($request->checkWeight) ? $request->checkWeight : ''; // on
|
$checkWeight = isset($request->checkWeight) ? $request->checkWeight : ''; // on
|
||||||
$checkLines = isset($request->checkLines) ? $request->checkLines : ''; // on
|
$checkLines = isset($request->checkLines) ? $request->checkLines : ''; // on
|
||||||
|
|
||||||
if (count($wHArr) > 0 && $cO != '' && $reportPeriod != '') {
|
if (! empty($wHArr) && $cO != '' && $reportPeriod != '') {
|
||||||
switch ($reportPeriod) {
|
switch ($reportPeriod) {
|
||||||
case 'year':
|
case 'year':
|
||||||
// Set Dates based on reportPeriod type
|
// Set Dates based on reportPeriod type
|
||||||
@@ -128,7 +128,6 @@ class execSummaryController extends Controller
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// dump($toreportDate);
|
// dump($toreportDate);
|
||||||
// dump($selectContent);
|
|
||||||
|
|
||||||
$execSummaryRes = DB::connection(config('m3.connection', 'pgsql'))->select($selectContent);
|
$execSummaryRes = DB::connection(config('m3.connection', 'pgsql'))->select($selectContent);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class execSummaryLineController extends Controller
|
|||||||
$checkWeight = isset($request->checkWeight) ? $request->checkWeight : ''; // on
|
$checkWeight = isset($request->checkWeight) ? $request->checkWeight : ''; // on
|
||||||
$checkLines = isset($request->checkLines) ? $request->checkLines : ''; // on
|
$checkLines = isset($request->checkLines) ? $request->checkLines : ''; // on
|
||||||
|
|
||||||
if (count($wHArr) > 0 && $cO != '' && $reportPeriod != '') {
|
if (! empty($wHArr) && $cO != '' && $reportPeriod != '') {
|
||||||
switch ($reportPeriod) {
|
switch ($reportPeriod) {
|
||||||
case 'year':
|
case 'year':
|
||||||
// Set Dates based on reportPeriod type
|
// Set Dates based on reportPeriod type
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ class palletQtyController extends Controller
|
|||||||
|
|
||||||
// Insert record to ICM709M
|
// Insert record to ICM709M
|
||||||
// var_dump($request);
|
// var_dump($request);
|
||||||
// console.log($request);
|
|
||||||
// Verify record does not already exist in ICM709M
|
// Verify record does not already exist in ICM709M
|
||||||
$icm709m = DB::connection(config('m3.connection', 'pgsql'))->select("select count(*) as COUNT1 from ICM709M
|
$icm709m = DB::connection(config('m3.connection', 'pgsql'))->select("select count(*) as COUNT1 from ICM709M
|
||||||
where AT9CO='$request->AT9CO' and AT9PLT='$request->AT9PLT' and AT9WHS='$request->AT9WHS' and AT9PART='$request->AT9PART'");
|
where AT9CO='$request->AT9CO' and AT9PLT='$request->AT9PLT' and AT9WHS='$request->AT9WHS' and AT9PART='$request->AT9PART'");
|
||||||
@@ -64,7 +63,6 @@ class palletQtyController extends Controller
|
|||||||
|
|
||||||
// Insert record to ICM709M
|
// Insert record to ICM709M
|
||||||
// var_dump($request);
|
// var_dump($request);
|
||||||
// console.log($request);
|
|
||||||
// Verify record does not already exist in ICM709M
|
// Verify record does not already exist in ICM709M
|
||||||
// DB::connection(config('m3.connection', 'pgsql'))->insert("insert into ICM709M (AT9CO, AT9PLT, AT9WHS, AT9PART, AT9QTY)
|
// DB::connection(config('m3.connection', 'pgsql'))->insert("insert into ICM709M (AT9CO, AT9PLT, AT9WHS, AT9PART, AT9QTY)
|
||||||
// values ('$request->AT9CO', '$request->AT9PLT', '$request->AT9WHS', '$request->AT9PART', '$request->AT9QTY')");
|
// values ('$request->AT9CO', '$request->AT9PLT', '$request->AT9WHS', '$request->AT9PART', '$request->AT9QTY')");
|
||||||
@@ -86,8 +84,6 @@ class palletQtyController extends Controller
|
|||||||
public static function saveQtyEdit(Request $request)
|
public static function saveQtyEdit(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
// console.log($request);
|
|
||||||
|
|
||||||
// where AT9CO='$request->AT9CO' and AT9PLT='$request->AT9PLT' and AT9WHS='$request->AT9WHS' and AT9PART='$request->AT9PART'");
|
// where AT9CO='$request->AT9CO' and AT9PLT='$request->AT9PLT' and AT9WHS='$request->AT9WHS' and AT9PART='$request->AT9PART'");
|
||||||
// var_dump($icm709m);
|
// var_dump($icm709m);
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ class pendingClosureController extends Controller
|
|||||||
{
|
{
|
||||||
// Get URL PARAMS
|
// Get URL PARAMS
|
||||||
$urlParams = count($request->all()) > 0 ? $request->all() : '';
|
$urlParams = count($request->all()) > 0 ? $request->all() : '';
|
||||||
// $SHUSER = isset($urlParams["SHUSER"]) ? $urlParams["SHUSER"] : '';
|
|
||||||
$mANIFEST = isset($urlParams['MANIFEST']) ? $urlParams['MANIFEST'] : '';
|
$mANIFEST = isset($urlParams['MANIFEST']) ? $urlParams['MANIFEST'] : '';
|
||||||
$aPCO = isset($urlParams['APCO']) ? $urlParams['APCO'] : '';
|
$aPCO = isset($urlParams['APCO']) ? $urlParams['APCO'] : '';
|
||||||
$aPWHS = isset($urlParams['APWHS']) ? $urlParams['APWHS'] : '';
|
$aPWHS = isset($urlParams['APWHS']) ? $urlParams['APWHS'] : '';
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class sentinelController extends Controller
|
|||||||
->where('AYSTATUS', '')
|
->where('AYSTATUS', '')
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
$allowDeletion = isset($iCM695M1Sel->AYSENTPKR) ? ($iCM695M1Sel->AYSENTPKR != '' ? true : false) : false;
|
$allowDeletion = ! empty($iCM695M1Sel->AYSENTPKR);
|
||||||
|
|
||||||
if ($allowDeletion) {
|
if ($allowDeletion) {
|
||||||
$timestamp = date('Y-m-d H:i:s.u');
|
$timestamp = date('Y-m-d H:i:s.u');
|
||||||
|
|||||||
@@ -229,7 +229,6 @@ class userControlController extends Controller
|
|||||||
// Successful Call
|
// Successful Call
|
||||||
else {
|
else {
|
||||||
// $AWREQN = $result['io_param']["var0"];
|
// $AWREQN = $result['io_param']["var0"];
|
||||||
// return "success";
|
|
||||||
if ($request->ACTION == 'P') {
|
if ($request->ACTION == 'P') {
|
||||||
echo "<script>alert('The password has been reset to QAZ1WSX2 for '" . $request->USERID . "'. The user will need to enter a new password on next green screen connection.');</script>";
|
echo "<script>alert('The password has been reset to QAZ1WSX2 for '" . $request->USERID . "'. The user will need to enter a new password on next green screen connection.');</script>";
|
||||||
}
|
}
|
||||||
@@ -289,7 +288,6 @@ class userControlController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $params[] = $conn->AddParameterChar('in', 10, 'userid','USRPRF',$request->USERID);
|
// $params[] = $conn->AddParameterChar('in', 10, 'userid','USRPRF',$request->USERID);
|
||||||
// $params[] = $conn->AddParameterChar('in', 10, 'pwd','PASSWORD',$request->PASSWORD);
|
|
||||||
// $params[] = $conn->AddParameterChar('in', 9, 'sts','STATUS','*ENABLED');
|
// $params[] = $conn->AddParameterChar('in', 9, 'sts','STATUS','*ENABLED');
|
||||||
// $params[] = $conn->AddParameterChar('in', 4, 'pwdexp','PWDEXP','*NO');
|
// $params[] = $conn->AddParameterChar('in', 4, 'pwdexp','PWDEXP','*NO');
|
||||||
|
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ class userPickingStats4 extends Controller
|
|||||||
// display webpage of statistic version 4
|
// display webpage of statistic version 4
|
||||||
$request->ports = Config::get('arrays.env_ports');
|
$request->ports = Config::get('arrays.env_ports');
|
||||||
$no_data = 'N';
|
$no_data = 'N';
|
||||||
if (count($statistic4) == 0 && $_SERVER['REQUEST_URI'] != '/userPickingStats4') {
|
if (empty($statistic4) && $_SERVER['REQUEST_URI'] != '/userPickingStats4') {
|
||||||
$no_data = 'Y';
|
$no_data = 'Y';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ class utilitiesContoller extends Controller
|
|||||||
// Parse PDF file and build necessary objects.
|
// Parse PDF file and build necessary objects.
|
||||||
$parser = new Parser;
|
$parser = new Parser;
|
||||||
|
|
||||||
// dump($pdf);
|
|
||||||
// $text = $pdf->getText();
|
// $text = $pdf->getText();
|
||||||
// dump("Text Only");
|
// dump("Text Only");
|
||||||
// dump($text);
|
// dump($text);
|
||||||
@@ -164,7 +163,6 @@ class utilitiesContoller extends Controller
|
|||||||
->get();
|
->get();
|
||||||
|
|
||||||
foreach ($iCM688M2SLTMP as $key => $ICM688M2SL) {
|
foreach ($iCM688M2SLTMP as $key => $ICM688M2SL) {
|
||||||
// $counter == 10 ? exit : '';
|
|
||||||
|
|
||||||
$a5MACPKR = isset($ICM688M2SL->A5MACPKR) ? $ICM688M2SL->A5MACPKR : '';
|
$a5MACPKR = isset($ICM688M2SL->A5MACPKR) ? $ICM688M2SL->A5MACPKR : '';
|
||||||
$a5SENTPKR = isset($ICM688M2SL->A5SENTPKR) ? $ICM688M2SL->A5SENTPKR : '';
|
$a5SENTPKR = isset($ICM688M2SL->A5SENTPKR) ? $ICM688M2SL->A5SENTPKR : '';
|
||||||
@@ -415,9 +413,6 @@ class utilitiesContoller extends Controller
|
|||||||
{
|
{
|
||||||
print_r('>>> Generate PDF');
|
print_r('>>> Generate PDF');
|
||||||
|
|
||||||
// $image = $builder->output('(10)123456(400)11(3906)333333');
|
|
||||||
|
|
||||||
// $builder->setBarcodeType('gs1-128');
|
|
||||||
// $builder->setFilename('barcode.png');
|
// $builder->setFilename('barcode.png');
|
||||||
// $builder->setImageFormat('png');
|
// $builder->setImageFormat('png');
|
||||||
// $builder->setWidth(500);
|
// $builder->setWidth(500);
|
||||||
@@ -594,7 +589,6 @@ class utilitiesContoller extends Controller
|
|||||||
$response = $controller->processShipment($myRequest);
|
$response = $controller->processShipment($myRequest);
|
||||||
|
|
||||||
$responseData = $response->getData();
|
$responseData = $response->getData();
|
||||||
// $responseJSON = json_encode($responseData);
|
|
||||||
// dump($responseJSON);
|
// dump($responseJSON);
|
||||||
|
|
||||||
$error = isset($responseData->error) ? $responseData->error : '';
|
$error = isset($responseData->error) ? $responseData->error : '';
|
||||||
|
|||||||
@@ -79,9 +79,7 @@ class M3ServiceProvider extends ServiceProvider
|
|||||||
$commandPath = __DIR__ . '/../Console';
|
$commandPath = __DIR__ . '/../Console';
|
||||||
$commands = collect(File::allFiles($commandPath))
|
$commands = collect(File::allFiles($commandPath))
|
||||||
->map(function ($file) {
|
->map(function ($file) {
|
||||||
$class = 'Modules\\' . $this->moduleName . '\\Console\\' . $file->getFilenameWithoutExtension();
|
return 'Modules\\' . $this->moduleName . '\\Console\\' . $file->getFilenameWithoutExtension();
|
||||||
|
|
||||||
return $class;
|
|
||||||
})
|
})
|
||||||
->filter(function ($class) {
|
->filter(function ($class) {
|
||||||
return class_exists($class);
|
return class_exists($class);
|
||||||
|
|||||||
Reference in New Issue
Block a user