M3 Security Fixes for pass 29

This commit is contained in:
Mark Gregory
2026-09-17 10:54:04 +01:00
parent 1037c1c202
commit dca0f54109
34 changed files with 82 additions and 478 deletions
@@ -46,7 +46,6 @@ class ClosedOrderSaveXls extends Command
*/
public function handle()
{
// $this->info('Start CallCloseAPI...');
ini_set('max_execution_time', Config::get('arrays.PHPTimeOutCL'));
ini_set('max_input_time', Config::get('arrays.PHPTimeOutCL'));
ini_set('default_socket_timeout', Config::get('arrays.PHPTimeOutCL'));
@@ -122,7 +121,6 @@ class ClosedOrderSaveXls extends Command
AND A5CO=$COMPANY AND A5WHS=$WHS AND A5PLANT=$PLANT
");
// $newItem = ["A5MACPKR" => 'Delivery #', "A5ONO" => 'Order #', "A4REFORD" => 'Order Type',"A5PART" => 'Part #',"A5RSVQTY" => 'Reserved',
// "A5PACKED" => 'Packed',"CALCULATED_COLUMN" => 'Back Order Qty',"ANOTHER_CALCULATED_COLUMN" => 'Value Packed $',"A4SHSHNM" => 'Customer name',
// "SHDT" => 'Date',"SHTIME" => 'Time',"REASON" => 'Failure Reason','A1SHCURR'=> 'Currency Code','FREIGHT'=> 'Freight'];
@@ -208,7 +206,6 @@ class ClosedOrderSaveXls extends Command
AND A5CO=$COMPANY AND A5WHS=$WHS AND A5PLANT=$PLANT
");
// $newItem2 = ["A5MACPKR" => 'Delivery #', "A5ONO" => 'Order #', "A4REFORD" => 'Order Type',"A5PART" => 'Part #',"A5RSVQTY" => 'Reserved',
// "A5PACKED" => 'Packed',"CALCULATED_COLUMN" => 'Back Order Qty',"ANOTHER_CALCULATED_COLUMN" => 'Value Packed $',"A4SHSHNM" => 'Customer name',
// "SHDT" => 'Date',"SHTIME" => 'Time',"REASON" => 'Failure Reason','A1SHCURR'=> 'Currency Code','FREIGHT'=> 'Freight'];
@@ -245,7 +242,6 @@ class ClosedOrderSaveXls extends Command
$this->info('Cron...End Save Orders Closed Lines to Excel');
} catch (\Throwable $th) {
// Log::error($th);
Log::channel('dailyCron')->error($th);
}
}
-4
View File
@@ -40,7 +40,6 @@ class DeleteOldLabels extends Command
*/
public function handle(): void
{
// $this->info('Start CallCloseAPI...');
ini_set('max_execution_time', Config::get('arrays.PHPTimeOutCL'));
ini_set('max_input_time', Config::get('arrays.PHPTimeOutCL'));
ini_set('default_socket_timeout', Config::get('arrays.PHPTimeOutCL'));
@@ -62,7 +61,6 @@ class DeleteOldLabels extends Command
Log::channel('dailyCron')->info('Getting Files From Directory: ' . $labelsDirectory);
exec('find ' . $labelsDirectory . ' -ctime +180 -type f -exec rm {} \;');
// exec('find '.$labelsDirectory.' -ctime +190 -type f -print | wc -l');
}
$labelsFolder = $labelsDirectoryTmp;
@@ -82,7 +80,6 @@ class DeleteOldLabels extends Command
}
}
// $this->info("Files to Delete...");
// dump($filesToDeleteArr);
// Delete Old Files
@@ -92,7 +89,6 @@ class DeleteOldLabels extends Command
$this->info('End Delete Old Labels Command...');
} catch (\Throwable $th) {
// Log::error($th);
Log::channel('dailyCron')->error($th);
}
}
-5
View File
@@ -48,7 +48,6 @@ class GenerateGS1Cmd extends Command
*/
public function handle()
{
// $this->info('Start CallCloseAPI...');
ini_set('max_execution_time', Config::get('arrays.PHPTimeOutCL'));
ini_set('max_input_time', Config::get('arrays.PHPTimeOutCL'));
ini_set('default_socket_timeout', Config::get('arrays.PHPTimeOutCL'));
@@ -66,7 +65,6 @@ class GenerateGS1Cmd extends Command
// Get Manifest Array
$GSArray1 = $this->option('gsarray');
$GSArray = json_decode($GSArray1, true);
// dump($GSArray);
// MAK : Used for debug only
$GSArray = ['Macpkr' => '55555', 'Recipient_Address1' => '9571 Pan American DR', 'Recipient_Address2' => 'C/O AEE Solar', 'Recipient_City' => 'El Paso',
@@ -230,7 +228,6 @@ class GenerateGS1Cmd extends Command
}
$html .= '</body> </html>';
// dump($html);
// App::call('App\Http\Controllers\utilitiesContoller@generateGS128');
ob_start();
@@ -246,7 +243,6 @@ class GenerateGS1Cmd extends Command
// $dompdf->stream();
$pdfContent = $dompdf->output();
// dump($pdfContent);
$labelsPath = Config::get('arrays.PdfPath');
// Put the PDF in labels/CarrierLabel
@@ -266,7 +262,6 @@ class GenerateGS1Cmd extends Command
$this->info('<<< GS1-128...End of Label Creation');
} catch (\Throwable $th) {
// Log::error($th);
Log::channel('LabelCron')->error($th);
}
}
-4
View File
@@ -41,7 +41,6 @@ class UtilitiesCmd extends Command
*/
public function handle(): void
{
// $this->info('Start CallCloseAPI...');
ini_set('max_execution_time', Config::get('arrays.PHPTimeOutCL'));
ini_set('max_input_time', Config::get('arrays.PHPTimeOutCL'));
ini_set('default_socket_timeout', Config::get('arrays.PHPTimeOutCL'));
@@ -50,15 +49,12 @@ class UtilitiesCmd extends Command
try {
$this->info('Start Utilities Command...');
// $this->info('User: '.$SHUSER);
$myRequest = new Request;
utilitiesContoller::fixICM799MSentPKR($myRequest);
// Log::channel('dailyCron')->info("Cron...End Save Orders Closed Lines to Excel");
$this->info('End Utilities Command...');
} catch (\Throwable $th) {
// Log::error($th);
Log::channel('dailyCron')->error($th);
}
}
-8
View File
@@ -42,7 +42,6 @@ class WHSMetricsSaveXls extends Command
*/
public function handle()
{
// $this->info('Start CallCloseAPI...');
ini_set('max_execution_time', Config::get('arrays.PHPTimeOutCL'));
ini_set('max_input_time', Config::get('arrays.PHPTimeOutCL'));
ini_set('default_socket_timeout', Config::get('arrays.PHPTimeOutCL'));
@@ -56,13 +55,10 @@ class WHSMetricsSaveXls extends Command
$SHUSER = isset($userId) ? $userId : (m3_user() !== '' ? Str::upper(trim(m3_user())) : '');
$CO = $this->argument('co');
// $COMPANY = isset($CO) ? trim($CO) : '110';
$COMPANY = '110';
$PWHS = $this->argument('whs');
// $WHS = isset($PWHS) ? trim($PWHS) : '321';
$WHS = '321';
$PPL = $this->argument('pl');
// $PLANT = isset($PPL) ? trim($PPL) : '143';
$PLANT = '143';
$date = new \DateTime;
@@ -92,7 +88,6 @@ class WHSMetricsSaveXls extends Command
GROUP BY A4SHIPTYPE,STATUS,SOURCE
ORDER BY 1,3,2
");
// dd($ICM700MHeadSel);
$newItem = ['A4SHIPTYPE' => 'Method', 'STATUS' => 'Status', 'SOURCE' => 'Source', 'PICKERS' => 'Pickers',
'WEIGHT' => 'Weight', 'LINES' => 'Lines', 'DOLLARS' => 'Dollars'];
@@ -110,7 +105,6 @@ class WHSMetricsSaveXls extends Command
// Prepend Header to Collection
$ICM700MHeadCol->prepend($newItem);
// $this->info($ICM700MHeadCol);
// Log::channel('dailyCron')->info(">>> Header Content");
// Log::channel('dailyCron')->info($ICM700MHeadCol);
@@ -158,7 +152,6 @@ class WHSMetricsSaveXls extends Command
} else {
$ICM700MDetailsCol = collect();
}
// Log::channel('dailyCron')->info(">>> Detail Content");
// Log::channel('dailyCron')->info($ICM700MDetailsCol);
// Save Head and Details to XLS file
@@ -180,7 +173,6 @@ class WHSMetricsSaveXls extends Command
$this->info('Cron...End Save Today WHS Performance Report to Excel');
} catch (\Throwable $th) {
// Log::error($th);
Log::channel('dailyCron')->error($th);
}
}