M3 Security Fixes for Pass 34

This commit is contained in:
Mark Gregory
2026-09-17 12:04:08 +01:00
parent 0a05f05843
commit e1824f399e
69 changed files with 1804 additions and 1791 deletions
@@ -5,7 +5,6 @@ namespace Modules\M3\Http\Controllers;
use Config;
use DB;
use Illuminate\Http\Request;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
@@ -34,13 +33,13 @@ class whsePerfController extends Controller
from ICM711M
where AVDATE between ' . date('Ym', strtotime($date_in)) . '00 and ' . date('Ym', strtotime($date_in)) . '32';
$ICM711M = DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt);
$USER_INFO = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')->selectRaw('R428US as USERPRF, R428STS as STATUS, NULL as DATE_EXPIRED, NULL as EXPIRED')->get()->all();
$iCM711M = DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt);
$uSER_INFO = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')->selectRaw('R428US as USERPRF, R428STS as STATUS, NULL as DATE_EXPIRED, NULL as EXPIRED')->get()->all();
$power_user = DB::connection(config('m3.connection', 'pgsql'))->select("select R428PWRUSR, R428CO, R428PL, R428WH from ICM428M where R428US='" . strtoupper(m3_user()) . "'");
$pct_array = Config::get('arrays.whsePerf_targets');
return view('m3::liberty-theme.pages.whsePerf', compact('ICM711M', 'power_user', 'USER_INFO', 'date_in', 'pct_array'));
return view('m3::liberty-theme.pages.whsePerf', ['ICM711M' => $iCM711M, 'power_user' => $power_user, 'USER_INFO' => $uSER_INFO, 'date_in' => $date_in, 'pct_array' => $pct_array]);
}
@@ -57,13 +56,13 @@ class whsePerfController extends Controller
from ICM711M
where AVDATE between ' . date('Ym', strtotime($date_in)) . '00 and ' . date('Ym', strtotime($date_in)) . '32';
$ICM711M = DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt);
$USER_INFO = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')->selectRaw('R428US as USERPRF, R428STS as STATUS, NULL as DATE_EXPIRED, NULL as EXPIRED')->get()->all();
$iCM711M = DB::connection(config('m3.connection', 'pgsql'))->select($sqlstmt);
$uSER_INFO = DB::connection(config('m3.connection', 'pgsql'))->table('icm428m')->selectRaw('R428US as USERPRF, R428STS as STATUS, NULL as DATE_EXPIRED, NULL as EXPIRED')->get()->all();
$power_user = DB::connection(config('m3.connection', 'pgsql'))->select("select R428PWRUSR, R428CO, R428PL, R428WH from ICM428M where R428US='" . strtoupper(m3_user()) . "'");
$pct_array = Config::get('arrays.whsePerf_targets');
$html = view('m3::liberty-theme.pages.whsePerf', compact('ICM711M', 'power_user', 'USER_INFO', 'date_in', 'pct_array'))->render();
$html = view('m3::liberty-theme.pages.whsePerf', ['ICM711M' => $iCM711M, 'power_user' => $power_user, 'USER_INFO' => $uSER_INFO, 'date_in' => $date_in, 'pct_array' => $pct_array])->render();
libxml_use_internal_errors(true);
$doc = new \DOMDocument;