🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: bit.listserv.netnws-l
1 messages
1 total messages Started by Andy Hooper Tue, 01 Aug 1995 00:00
NNSERVER REXX error on long message-ids
#184
Author: Andy Hooper
Date: Tue, 01 Aug 1995 00:00
34 lines
2334 bytes
There are some trashy cancel articles going around with long message-ids.
They cause a REXX error in NNSERVER procedure CheckMsgId:

  1326 +++          if g.msgid.msg_id = 0
  1212 +++        art.error = CheckMsgid()
   649 +++       art.error = CheckHeaders()
   449 +++     call ProcessArticle            /* go process one article */
   204 +++   call ProcessReader
Error 30 running NNSERVER EXEC, line 1326: Name or string > 250 characters

My fix for this is to reject the article if the message id is too long, on
the line marked with /*QK*/ below:

CheckMsgId: procedure expose g. b. art. head.
/* Set art.message_id with msgid for control files locally (remove <>  */
/* & uppercase); head.message_id keeps header to pass to other sites.  */
/* Check if it is a duplicate. */

   /* Remove <>, translate () to '_' to avoid CMS cmd problems in Purge*/
   art.message_id = translate(head.message_id,'  __.','<>() ')
   art.message_id = strip(translate(art.message_id),'L')  /* uppercase */
   parse var art.message_id art.message_id . /* Just take first token */
   if art.message_id = '' | length(art.message_id) > 242 then   /*QK*/
      return '"Message-ID:" missing or invalid' head.message_id

   /* Set in memory since file last sorted; also sequentially in file */
   msg_id = art.message_id
   if g.msgid.msg_id = 0 then do  /* Not set in memory - must srch file*/
      g.msgid.msg_id = 1          /* Set it for later search */

The magic number 242 is 250 (the limit on a REXX variable name) minus the
length of the variable prefix 'g.msgid.'.

Andy Hooper
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads