Changes to Authorisation for users to edit systems, minor cosmetic fixes and more logging

This commit is contained in:
Deon George
2021-12-29 13:44:27 +11:00
parent 10afd6f3a4
commit fa2ac9a656
6 changed files with 24 additions and 5 deletions

View File

@@ -219,6 +219,8 @@ class Message extends FTNBase
*/
public static function parseMessage(string $msg,Zone $zone=NULL): self
{
Log::info(sprintf('%s:Processing message [%d] bytes from zone [%d]',self::LOGKEY,strlen($msg),$zone?->zone_id));
$o = new self($zone);
try {

View File

@@ -422,10 +422,14 @@ class Packet extends FTNBase implements \Iterator, \Countable
*/
private function parseMessage(string $message): void
{
Log::info(sprintf('%s:Processing message [%d] bytes',self::LOGKEY,strlen($message)));
$msg = Message::parseMessage($message,$this->zone);
// If the message is invalid, we'll ignore it
if ($msg->errors) {
Log::info(sprintf('%s:- Message has errors',self::LOGKEY));
// If the from address doenst exist, we'll create a new entry
if ($msg->errors->messages()->has('from')) {
$e = NULL;