m3 Security Fixes

This commit is contained in:
Mark Gregory
2026-09-16 17:16:25 +01:00
parent d68687f062
commit 8f37245e13
64 changed files with 4247 additions and 4426 deletions
+10 -8
View File
@@ -4,24 +4,26 @@ namespace Modules\M3\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Config;
class ICM428M extends Model
{
use HasFactory;
protected $connection = 'pgsql';
protected $table;
public $incrementing = false;
public $timestamps = false;
public function __construct(){
protected $table;
public $incrementing = false;
public $timestamps = false;
public function __construct()
{
$this->table = 'ICM428M';
}
# R428DV R428PL R428WHS R428STS R428US R428FIRST R428FAMILY R428EMPCDE R428ADMUSR R428PWRUSR -->
// R428DV R428PL R428WHS R428STS R428US R428FIRST R428FAMILY R428EMPCDE R428ADMUSR R428PWRUSR -->
protected $fillable = [
'R428CO', 'R428PL', 'R428WH', 'R428STS', 'R428US', 'R428FIRST', 'R428FAMILY', 'R428EMPCDE', 'R428ADMUSR', 'R428PWRUSR'
'R428CO', 'R428PL', 'R428WH', 'R428STS', 'R428US', 'R428FIRST', 'R428FAMILY', 'R428EMPCDE', 'R428ADMUSR', 'R428PWRUSR',
];
}
+9 -7
View File
@@ -4,23 +4,25 @@ namespace Modules\M3\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Config;
class ICM658M extends Model
{
use HasFactory;
protected $connection = 'pgsql';
protected $table;
public $incrementing = false;
public $timestamps = false;
public function __construct(){
protected $table;
public $incrementing = false;
public $timestamps = false;
public function __construct()
{
$this->table = 'ICM658M';
}
protected $fillable = [
'R658CO', 'R658PL', 'R658WH', 'R658LC', 'R658PN', 'R658MQ', 'R658RQ', 'R658TL','R658RMQ','R658IZLCF'
'R658CO', 'R658PL', 'R658WH', 'R658LC', 'R658PN', 'R658MQ', 'R658RQ', 'R658TL', 'R658RMQ', 'R658IZLCF',
];
}
+7 -5
View File
@@ -2,16 +2,18 @@
namespace Modules\M3\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Config;
class ShipTo extends Model
{
protected $table = 'ICM665M';
public $timestamps = false;
protected $primaryKey = ['AUSHSHZP', 'AUSHWHS'];
protected $uniqueKey = ['AUSHSHZP', 'AUSHWHS'];
public $incrementing = false;
protected $fillable = [
@@ -23,7 +25,7 @@ class ShipTo extends Model
'AUSHSHST',
'AUSHSHZP',
'AUSHSHCT',
'AUSHWHS'
'AUSHWHS',
];
public function save(array $options = [])
@@ -42,11 +44,11 @@ class ShipTo extends Model
{
$query = self::query();
# Check if the combination of AUSHSHZP and AUSHWHS already exists
// Check if the combination of AUSHSHZP and AUSHWHS already exists
$existingRecord = $query->where('AUSHSHZP', $this->AUSHSHZP)
->where('AUSHWHS', $this->AUSHWHS);
# If this is an existing record being updated, exclude itself from the check
// If this is an existing record being updated, exclude itself from the check
if ($this->exists) {
$existingRecord->where($this->getKeyName(), '!=', $this->getKey());
}
-1
View File
@@ -2,7 +2,6 @@
namespace Modules\M3\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;