From 6284795e3b2b78bf7e3fef04202b9998a8ff1164 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 17 Apr 2025 09:36:39 +1000 Subject: [PATCH] Logging some @todos to do --- app/Classes/FTN/Message.php | 8 +++++++- app/Console/Commands/PacketProcess.php | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Classes/FTN/Message.php b/app/Classes/FTN/Message.php index 48facb7..52f0075 100644 --- a/app/Classes/FTN/Message.php +++ b/app/Classes/FTN/Message.php @@ -27,7 +27,7 @@ use App\Traits\ObjectIssetFix; * = By definition we should know the author node, because it's either ours or (will be) in the nodelist (but it might not be there yet) * = The target node may not be in the nodelist (anymore) * - * + Echomail - only has source addresses (MUST have an AREA: tag, otherwise its netmail)) + * + Echomail - only has source addresses (MUST have an AREA: tag, otherwise its netmail) * a Origin Line " * Origin: (z:f/n.p) * b MSGID Kludge "MSGID: z:f/n.p<@domain> * c net/node from msg headers (dst should be to hub to be processed) @@ -329,6 +329,7 @@ class Message extends FTNBase switch ($key) { // From Addresses + // @todo $this->src no longer appears to be defined case 'fz': return (int)Arr::get($this->src,'z'); case 'fn': return (int)($x=$this->src) ? Arr::get($x,'n') : Arr::get($this->header,'onet'); case 'ff': return (int)($x=$this->src) ? Arr::get($x,'f') : Arr::get($this->header,'onode'); @@ -677,6 +678,7 @@ class Message extends FTNBase * @param Echomail|Netmail $o * @return Echomail|Netmail * @throws InvalidPacketException + * @todo Remove parsing $o as second object, make this private, and use $this->... instead of $o->... */ public function unpackMessage(string $message,Echomail|Netmail $o): Echomail|Netmail { @@ -895,6 +897,10 @@ class Message extends FTNBase ); $validator->after(function($validator) { + // @todo If the message has an INTL kludge, we send the message to our ZC, and if we are the ZC onto the dst ZC + // @todo So validate we can send it on + // @todo This validation below is incorrect - netmails only need to have an INTL if they are traversing zones + // @todo Without an INTL it is affecting our determination of a source zone/dst zone if (($this->mo instanceof Netmail) && (! $this->mo->kludges->has('INTL'))) $validator->errors()->add('no-intl','Netmail message is missing INTL KLUDGE.'); diff --git a/app/Console/Commands/PacketProcess.php b/app/Console/Commands/PacketProcess.php index 5d632ac..e5f4770 100644 --- a/app/Console/Commands/PacketProcess.php +++ b/app/Console/Commands/PacketProcess.php @@ -34,6 +34,8 @@ use App\Models\Address; * - To areafix (processed) * - To ping (respond) * - With trace turned on (respond) + * + * @todo Enable force processing packets when the password is wrong */ class PacketProcess extends Command {