TIC and PKT passwords are case insensitive, so convert them to uppercase when we are using them
This commit is contained in:
parent
4070a060c3
commit
6abf10ab0b
@ -418,7 +418,7 @@ class Packet extends FTNBase implements \Iterator, \Countable
|
||||
'H' => $date->format('H'), // Hour
|
||||
'M' => $date->format('i'), // Minute
|
||||
'S' => $date->format('s'), // Second
|
||||
'password' => (! is_null($passwd)) ? $passwd : $o->session('pktpass'), // Packet Password
|
||||
'password' => strtoupper((! is_null($passwd)) ? $passwd : $o->session('pktpass')), // Packet Password
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ class Tic extends FTNBase
|
||||
$result->put('REPLACES',$this->file->replaces);
|
||||
$result->put('AREA',$this->file->filearea->name);
|
||||
$result->put('AREADESC',$this->file->filearea->description);
|
||||
if ($x=$this->to->session('ticpass'))
|
||||
if ($x=strtoupper($this->to->session('ticpass')))
|
||||
$result->put('PW',$x);
|
||||
$result->put('CRC',sprintf("%X",$this->file->crc));
|
||||
|
||||
@ -348,7 +348,7 @@ class Tic extends FTNBase
|
||||
throw new SizeMismatchException(sprintf('TIC file size [%d] doesnt match file [%s] (%d)',$this->file->size,$fs->path($rel_path_name),$y));
|
||||
|
||||
// Validate Password
|
||||
if ($pw !== ($y=$this->file->fftn->session('ticpass')))
|
||||
if (strtoupper($pw) !== ($y=strtoupper($this->file->fftn->session('ticpass'))))
|
||||
throw new InvalidPasswordException(sprintf('TIC file PASSWORD [%s] doesnt match system [%s] (%s)',$pw,$this->file->fftn->ftn,$y));
|
||||
|
||||
// Validate Sender is linked
|
||||
|
@ -74,7 +74,7 @@ class PacketProcess implements ShouldQueue
|
||||
}
|
||||
|
||||
// Check the packet password
|
||||
if ($this->ao->session('pktpass') !== $pkt->password) {
|
||||
if (strtoupper($this->ao->session('pktpass')) !== strtoupper($pkt->password)) {
|
||||
Log::error(sprintf('%s:! Packet from [%s] with password [%s] is invalid.',self::LOGKEY,$this->ao->ftn,$pkt->password));
|
||||
|
||||
Notification::route('netmail',$this->ao)->notify(new PacketPasswordInvalid($pkt->password,$this->file->nameas));
|
||||
|
Loading…
Reference in New Issue
Block a user