Skip to content
Snippets Groups Projects
Commit 73783e2b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Strip the "in-transit" attribute flag from imported packed-messages

Log a warning message when either the "local" or "in-transit" flag has been
stripped from ("Sanitized") imported packed-messages.

Keyop reported a chksmb warning on a FidoNet message that contained the
'in-transit' attribute:
<Keyop> Message flagged as 'In Transit'     (?): 1
<Keyop> fidonet_fidosoft Message Base has Errors!

The message in question appears just to be a corrupted echomail msg coming
from HPT:
Sender           '56:43 '
To               Tommi Koivula
Subject          test
X-FTN-AREA       FIDOSOFT.HUSKY
X-FTN-TID        hpt/os2-wc 1.9.0-cur 2021-03-14

SBBSecho didn't use to convert/import the "in-transit" flag on imported
netmail or echomail messages, ... until commit 446ab0ef, which
was needed to support the TickFix robot. So now, let's just sanitize the
packed-message attributes a little sooner in the import process and log a
warning when such sanitization has taken place.
parent ece643ba
No related branches found
No related tags found
No related merge requests found
...@@ -3175,7 +3175,7 @@ enum { ...@@ -3175,7 +3175,7 @@ enum {
}; };
/****************************************************************************/ /****************************************************************************/
/* Coverts a FidoNet message into a Synchronet message */ /* Converts a FidoNet message into a Synchronet message */
/* Returns 0 on success, 1 dupe, 2 filtered, 3 empty, 4 too-old */ /* Returns 0 on success, 1 dupe, 2 filtered, 3 empty, 4 too-old */
/* or other SMB error */ /* or other SMB error */
/****************************************************************************/ /****************************************************************************/
...@@ -5828,7 +5828,11 @@ void import_packets(const char* inbound, nodecfg_t* inbox, bool secure) ...@@ -5828,7 +5828,11 @@ void import_packets(const char* inbound, nodecfg_t* inbox, bool secure)
break; break;
} }
hdr.attr&=~FIDO_LOCAL; /* Strip local bit, obviously not created locally */ int16_t org_attr = hdr.attr;
hdr.attr &= ~(FIDO_LOCAL | FIDO_INTRANS); // Strip unexpected attributes
if(hdr.attr != org_attr)
lprintf(LOG_WARNING, "Sanitized message attributes (%04X->%04X) at offset %ld of packet: %s"
,org_attr, hdr.attr, (long)(msg_offset - sizeof(pkdmsg)), packet);
if(strncmp(fmsgbuf, "AREA:", 5) != 0) { /* Netmail */ if(strncmp(fmsgbuf, "AREA:", 5) != 0) { /* Netmail */
(void)fseeko(fidomsg, msg_offset, SEEK_SET); (void)fseeko(fidomsg, msg_offset, SEEK_SET);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment