- Feb 15, 2021
-
-
Rob Swindell authored
Hopefully not introducing any bugs in the process.
-
- Dec 25, 2020
-
-
Rob Swindell authored
Advertise the system's QWK-ID (a.k.a. BBS ID) in exported echomail messages. This will allow correlation of avatars that were imported via SYNCDATA carried via QWKnet (e.g. DOVE-Net) with messages imported from those same BBSes via FTN. The alternative was to have SYNCDATA Avatar messages include all the AKAs of each BBS (in the body text), but that was looking like a rather complicated solution. This approach (the BBSID kludge) seems a much simpler solution. I still need to implement the JS side of this solution however (for avatar lookups using the FTN BBSID), but this was the first important step.
-
- Nov 22, 2020
-
-
Rob Swindell authored
-
- Nov 19, 2020
-
-
Deucе authored
Then, add JSDOC support to crypto class constant objects. Also, since crypto stuff is almost half of all the docs, move all the crypto classes and objects to the end. It would be nice if these massive lists were hidden by default line the menu tree at the start.
-
- Aug 16, 2020
-
-
Rob Swindell authored
-
- May 07, 2020
-
-
rswindell authored
corresponding *_net_addr field is present (not NULL).
-
rswindell authored
Allow an added or modified message header to have to/from/reply-to "net type" values of NET_NONE. This is a weird scenario, but it is technically possible (e.g. for nntpservice.js) to save a message with a to/from/treply-to "net address" header, but an associated net-type of NET_NONE. By saving the net-type NET_NONE, when saving a modified header, if the associated net address header field value cannot be parsed into a valid network address, there won't be any error reported, e.g. Error -110 adding SENDERNETADDR field to message header
-
- Apr 24, 2020
-
-
rswindell authored
header field) when saving a message using the MsgBase class. A similar problem existed with REPLYTOLIST/RFC822REPLYTO, but was not actually observed. Since the following header fields were not populated in the msg header "field_list", if they existed in a message header that was modified using the MsgBase class, they would be lost: - RFC822TO - RFC822CC - RFC822ORG - RFC822REPLYTO - RFC822SUBJECT
-
- Apr 15, 2020
-
-
rswindell authored
-
- Apr 06, 2020
-
-
rswindell authored
It would create 3 0-byte files (*.shd, *.sdt, *.sid), but more is actually needed for a message base to be "created" (i.e. a call to smb_create()). So, MsgBase.open() now uses smb_open_sub() rather than smb_open() to initialize theSMB status fields with the proper default values (based on the sysop configuration) and calls smb_crate() if the header file is empty. Yes, normally, SCFG creates message bases, but it shouldn't have to (e.g. a fresh install on *nix, doesn't actually start with any files in data/subs) and now that we have JavaScript-based message lister/readers, we really needed this support.
-
- Apr 04, 2020
-
-
rswindell authored
(SMTPREVERSEPATH a.k.a. "reverse_path") if it didn't already have one. That's because smb_getmsghdr() will point the msg.reverse_path convenience pointer to the from_net_addr if there was no explicit reverse-path (e.g. RFC822's "return-path" header field). This could manifest itself in *any* change to a message header via JS failing with an "illegal header length increase" error if the added header field just happen to put the total header length over the allocation threshold of the pre-existing msg header. Fix: only model a msg header "reverse_path" property if the header field actually existed (not based on the SMBLIB convenience pointer). When the expand_fields option is used, the old behavior remains but expanded headers cannot be written back to the base, so no harm there. Reported by Coz in #synchronet from failed runs of scrubmsgs.js. Thanks!
-
- Mar 19, 2020
-
-
rswindell authored
"dump" to an array of strings using the (new) smb_msghdr_str_list() SMBLIB function. The message header passed must've been previously returned from the get_msg_header() or get_all_msg_headers() method. A similar dump could be constructed from the header properties, as available in JS, but that would be inconsistent with other msg header dumps and likely lack header fields or details available from the lowest level dump method provided in SMBLIB.
-
- Mar 18, 2020
-
-
rswindell authored
The number of messages loaded was limited by the number of messages that were in the status header the last time the status header was read (i.e. when the msgbase was opened or when any of its status header properties were referenced). Also fixed a couple of weird/useless uses of the WHERE macro in error messages.
-
- Mar 01, 2020
-
-
rswindell authored
checking for non-NULL value.
-
rswindell authored
MsgBase.get_msg_header or get_all_msg_headers), the message header object's private data (used internally in these C source functions) would be freed and NULL'd, apparenty as a form of optimization. This would cause some methods which can accept a msg header object as an argument (e.g. MsgBase.put_msg_header, bbs.show_msg/show_msg_header) to fail or behave in strange ways. Instead of freeing/NULLing the private data (and depending on that as an indication that the header has been enuemrated), just set a member variable indicating that the header has been enumerated (once) already. This is the bug that has been tripping me up with my message lister JS mod (see YouTube video). I can finally get that committed to CVS for testing now. :-)
-
- Aug 23, 2019
-
-
rswindell authored
with the FTN (FTS-5003) "CHRS" control line/paragraph. The values recoginized by Synchronet are: "ASCII 1" "CP437 2" "UTF-8 4" These values indicate that header fields and body text of a message are encoded with the specifiec charset. The default (assumed charset, if not specified), is CP437.
-
- Aug 06, 2019
-
-
rswindell authored
-
- Jul 24, 2019
-
-
rswindell authored
- Boolean: is_utf8 In the case of multi-part MIME messages, this may not be populated accurately until the message body is read with the get_msg_body() method.
-
- Jul 16, 2019
-
-
rswindell authored
JS_ValueToUint32() for converting to integers where we may need the full 32 bits.
-
- May 04, 2019
-
-
rswindell authored
to a text/html part of a multi-part MIME encoded message if no text/plain part exists. Changed smbmsg_t.charset to smbmsg_t.text_charset. Added smbmsg_t.text_subtype (e.g. "plain" or "html"). Fixed issue with parsing parsed plain-text when the charset was the last element of the MIME-part header. MIMEDecodedPlainTextFmt text.dat line now includes the text sub-type arg
-
rswindell authored
declaration
-
rswindell authored
Use this in place of JS_GetPrivate() in native class methods that need the class instance's private data pointer and will do bad things if that pointer points to something other than what is expected. mcmlxxix (matt) discovered that using Object.apply(), you can invoke class methods where the 'this' instance is a different class. This would result in "Internal Error: No Private Data." or a crash. So now, gracefully detect this condition and report a meaningful error: "'<class-name>' instance: No Private Data or Class Mismatch" Also, important to note: if the method uses JS_THIS_OBJECT to get the JSObject* to pass to JS_Get*Private, then it must do this *before* it calls JS_SET_RVAL. From jsapi.h: * NB: there is an anti-dependency between JS_CALLEE and JS_SET_RVAL: native * methods that may inspect their callee must defer setting their return value * until after any such possible inspection. Otherwise the return value will be * inspected instead of the callee function object. The js_crypt*.c files still need this treatment.
-
- May 03, 2019
-
-
rswindell authored
- votes - priority - delivery_attempts
-
rswindell authored
headers). Don't reference the (currently unused) times_downloaded and last_downloaded msghdr_t elements/properties. Set the current node action value *before* calling the scanposts_mod ("Scan Msgs module") in sbbs_t::scanposts().
-
- May 02, 2019
-
-
rswindell authored
Copy the upvotes, downvotes, and total_votes to the smbmsg_t, replicating what is done in sbbs_t::scanposts() - these are used by sbbs_t::show_msghdr() so we need to copy them if we're going to be replicating that functionality (showing up/down votes and score) in message headers shown with bbs.show_msg() and bbs.show_msg_header().
-
- Apr 30, 2019
-
-
rswindell authored
- mime_version (from the message header, if MIME) - content_type (from the messgae header, if MIME) - charset (from the plain-text MIME portion content-type header field)
-
- Apr 29, 2019
-
-
rswindell authored
Refer to the dubious get_msg_body() feature of dot-stuffing as that ("dot-stuffing") and not "rfc822-encoding" - because it isn't. dot-stuffing is a requirment of SMTP (RFC*821) and NNTP, not RFC822 (oops).
-
rswindell authored
- to_list (RFC822TO, previosuly unavailable via JS) - cc_list - replyto_list (RFC822REPLYTO, previously unavailable via JS) Added RFC822FROM to the "field_list" array (previously unavailable via JS). Removed SMB_CARBONCOPY from the "field_list" (now duplicated in cc_list).
-
- Apr 11, 2019
-
-
rswindell authored
*_net_type hfield has a value of 0 (NET_NONE) - according to smbdefs.h.
-
rswindell authored
'data_length', but not always (e.g. may include text from some header fields, excludes any non-text data fields). Mark 'data_length' msg header property as read-only.
-
rswindell authored
back in 1993, but were never needed/used.
-
- Apr 09, 2019
-
-
rswindell authored
-
- Apr 06, 2019
-
-
rswindell authored
of the message header so that functions that need it (e.g. bbs.show_msg_header) don't use/show stale data. This change requires the updated smb_copymsgmem() which clear/sets message convenience pointers upon copying hfields from one message header to another.
-
rswindell authored
(objects, in the same format as returned by the get_mgs_index() method) much faster than iterating through a loop, calling the get_msg_index() method for each message. If you want to load messages (e.g. headers, text), filtering by criteria found in the message index (attributes, to/from user, subject CRC) loading a list of indexes and filtering before calling get_msg_header() for the selected messages is much faster than previously available MsgBase object methods (e.g. get_all_msg_headers()). If you don't need to filter the loaded messages (you really want *all* message headers), then get_index() is of no benefit to you, the script-writer. This is most useful for the "mail" msgbase where selective loading of messages is more common.
-
- Apr 01, 2019
-
-
rswindell authored
js_put_msg_header (MsgBase.put_msg_header) - we can't free the memory associated with 'gotten' msg header. Just use the header offset from the header retrieved via MsgBase.get_msg_header() - for fast lookup. Also fixed an innocuous extra increment of 'n' in argv/argc loop.
-
- Mar 24, 2019
-
-
rswindell authored
- bbs.show_msg() - bbs.show_msg_header() Re-worked the JS bbs.netmail() implementation sbbs::show_msg(), show_msghdr(), msgtotxt() now take an smb_t* argument (don't use the pseudo-global 'smb' in these functions any longer) sbbs_t::putmsg() and JS console.putmsg() now accept an optional orig_columns argument to specify the original column width of a text for intelligent re-word-wrapping (e.g. as taken from a message header field). Previously, the original-column value was hard-coded to 80 columns (technically, 79). sbbs_t::show_msghdr() no longer sends a CRLF if the cursor is already at the top-of-screen (TOS). sbbs_t::show_msg() now uses the stored "columns" msg header fields to pass to putmsg() to intelligently re-word-wrap message bodies for display. sbbs_t::show_msg() and msgtotxt() return bool now instead of void. JS MsgBase.get_all_msg_headers() now supports an optional "expand_fields" argument (defaults to true). I contemplated just getting rid of the (few) expanding header fields (more like default-value-header fields, like 'id'), but decided against it, at least for now. JS MsgBase.put_msg_header(), the "number_or_offset" argument is optional and not needed if a header object argument is provided. Make this clear in this JS docs for this method Note: I sat on this commit for a while because I noticed occasional errors like this: Node 1 <Digital Man> !ERROR 2 (No such file or directory) (WinError 0) in readmsgs.cpp line 217 (sbbs_t::loadposts) locking "path/to/sub" access=-100 info=smb_locksmbhdr msgbase not open started cropping up after introducing these changes and which I never root-caused. But after a clean-build and waiting a week, I haven't seen it again, so hopefully it was just a incomplete rebuild issue and not a new bug.
-
- Mar 16, 2019
-
-
rswindell authored
or more specifically, if the index (.sid) file is of an unexpected size (too big or too small) handle that situation gracefully.
-
- Mar 13, 2019
-
-
rswindell authored
fail if the current file pointer (offset) was not currently at the beginning of the file. So calling MsgBase.get_all_msg_headers() after previously calling any method that read/seeked the index would cause the reported error: "index read (xxxx) failed"
-
- Feb 20, 2019
-
-
rswindell authored
(JS bbs.post_msg()): If the WM_QUOTE mode flag is *not* set, then it will auto- create the quote file (quotes.txt) and add the WM_QUOTE mode bit before calling sbbs_t::writemsg(). So if existing JS scripts call bbs.post_msg(..., WM_QUOTE) with a custom-created quote file (e.g. with msg tails), that'll still work as before (e.g. DDMsgReader.js). bbs.email() and bbs.netmail() now support an optional reply_header_object argument which works like bbs.post_msg(). These methods (and the underlying C++ methods: sbbs_t::email(), netmail(), inetmail(), all auto-create the quote file now, when the WM_QUOTE mode flag is *not* set. The auto-created quotes.txt now includes the plain-text version of MIME-encoded messages. the bbs.post_msg(), email(), and netmail() methods now all support reply header objects that came directly from bbs.get_msg_header() *or* copies of such header objects (but the auto-quoting feature won't work when supplied this type of header object). So if passed a header object returned from bbs.get_msg_header(), we can now use the message base (for auto-quoting) and the underlying msg storage directly (no JS parsing necessary). This is what the new js_GetMsgHeaderObjectPrivates() function is used for. js_ParseMsgHeaderObject() (and the underlying parse_header_object() function) now supports either an actual internally-generated msg header object (e.g. returned from bbs.get_msg_header()) or one that is a copy or hand-constructed. quotemsg() no longer tries to get a copy of the msg index/header. It shouldn't have to since we can now get to underlying msg storage in the js_msgbase.c via js_GetMsgHeaderObjectPrivates(). quotemsg() now reads only the plain-text portion of MIME-encoded messages. As part of this effort, I modernized the method prototypes using default argument values (e.g. WM_NONE for wm_mode arguments) and removed some extraneous WM_EMAIL and WM_NETMAIL specifications (these wm_mode flags are automatically added by the sbbs_t::email() and *netmail() functions). savemsg() now *does* support reply-IDs/thread-linkage via the additional 'remsg' argument (when non-NULL). Replaced some use of nulstr with NULL. Replaced more boilerplate SMB open code with calls to smb_open_sub().
-
- Feb 19, 2019
-
-
rswindell authored
used by js_post_msg() (the JS bbs.post_msg() method when used with the reply_header object argument) - the private data attached to a message header object is of type privatemsg_t, not private_t. This caused the dereferences of and assignments to p->smb_result in parse_header_object() to corrupt the privatemsg_t->msg memory causing heap corruption (caught on Windows debug builds in js_get_msg_header_finalize()) and stack faults (caught on Linux-gcc in parse_recipient_object()). This one was hard to find. <whew!>
-