Skip to content
Snippets Groups Projects
  1. May 24, 2019
    • rswindell's avatar
      Don't read the spamblock.cfg unnecessarily: · 2f2c9ac9
      rswindell authored
      We don't store (findable) hostnames in the file, so don't search for them.
      Don't search file if the host is listed in the spamblock_exempt.cfg file.
      If you have a really large spamblock.cfg file, this could result in the
      unnecessary reading of potential many megabytes of data for each inbound
      SMTP connection. We might want to read this file even less frequently and
      store the list in a searchable str_list_t or something.
      2f2c9ac9
  2. May 23, 2019
    • rswindell's avatar
      Increase MAX_POST_LEN from 1MB to 4MB (QWK REP packets can be > 1MB) - · a59fba4a
      rswindell authored
        I think that > 1MB post data is supported, but the http_request.post_data
        property won't be created if the length > MAX_POST_LEN. Perhaps would just
        store the post data in a file (uh, it already is?) and expose the filename to
        JS scripts? It'd be a lot cleaner than storing the data in a file and then
        reading (or mem-mapping) the file and then copying the contents into a JS
        property.
      
      Allow the JS http_request.post_data property to contain NULs.
      
      open_post_file() will now open the post file (and return the FILE*) even if
        session->req.post_data is NULL, it just won't try to write to the file if the
        post_data is NULL.
      
      mem-map the large post data files using XPMAP_WRITE (read/write) rather than
        XPMAP_READ (read-only) - without this change, this line in read_post_data()
        would cause an exception:
          session->req.post_data[session->req.post_len]=0;
        Now, we seem to have the potential of an off-by-one here (if the length
        mem-mapped is not post_len + 1), but that isn't happening. <shrug>
      
      Fixed a couple of FILE pointer/descriptor leaks if post_to_file() failed.
      
      Changed name of post data file to SBBS_POST.*.*.data (it's not necessarily
      html).
      
      So now, uploads > 1MB work, but questions remain:
      - wouldn't PUT be a more appropriate method (than POST) for file uploads?
      - how can we support post_data > MAX_POST_LEN (now 4MB) in JS?
      a59fba4a
  3. May 22, 2019
  4. May 20, 2019
  5. May 11, 2019
    • rswindell's avatar
      Fix most likely cause of new crashes seen in mailsrvr, calls to · 4ca5fc1c
      rswindell authored
      smb_freemsgmem():
      bounce() is using a strange method of copying a message header in memory
      (not using smb_copymsgmem) and when it frees the message, ends up with a
      double-free of the 2 new smbmsg_t members (not header fields): text_subtype
      and text_charset.
      4ca5fc1c
  6. May 09, 2019
    • rswindell's avatar
      Support bright background colors: · 48e7520e
      rswindell authored
      - for PETSCII, this is automatic and you don't lose blink, but you do lose
        colored foreground when enabling a bright background ("reverse video")
      - for ANSI, this mode is typically referred to as "iCE colors" and disables
        blinking-text support
      - Ctrl-AE (^AE) is the new attribute code to enable bright-background
        (will have no effect on ANSI terminals that are not iCE color enabled)
        "E" is now valid in the ctrl/attr.cfg file and string values for JS
        console.attributes assignments, as well
      - Ctrl-AI (^AI) - blink - now does nothing for ANSI/ICE color terminals
        (blinking is not supported in combination with bright-background)
      - Using a new/non-standard CGA attribute bit-flag to indicate the selection of
        bright-background colors (BG_BRIGHT, bit 10), separate from BLINK.
        This change required all/most char/uchar attribute representations to be
        converted to int/uint.
      
      New text.dat strings:
      - PetTerminalDetected (renamed from PetTermDetected)
      - PetTerminalQ
      - TerminalAutoDetect
      - TerminalColumns
      - TerminalRows
      - TerminalMonochrome
      - TerminalColor
      - TerminalIceColor
      - IceColorTerminalQ
      This also moved the MsgCarbonCopyList definition to the end of the file
      for now.
      
      PETSCII reverse-video attribute fix:
      When a CR is sent to the terminal, the reverse-video attibute is auto-disabled
      so update our "current attribute" (curatr) value to match the remote.
      
      Support new printfile/putmsg mode flag: P_WRAP to force an ungraceful
      line-wrap (splitting) to the specified column width. If no column width is
      specified (0), then this mode will force an ungraceful wrap before the last
      terminal column where some terminals *may* auto-wrap.
      
      JS console.printfile() and printtail() methods now support an optional
      "orig_columns" argument, similar to console.putmsg(). Must specify P_WORDWRAP
      or P_WRAP for this argument to have any effect.
      
      Much improved terminal-type selection/configuration in the user defaults
      menu and abort (^C) at any of the yes/no prompts is now detected/handled much
      better (to answers to the prompted questions are not saved to the user
      settings).
      48e7520e
    • rswindell's avatar
      fc529baa
    • rswindell's avatar
      Added todo comment about require() behavior which is unexpected when the · 6305d447
      rswindell authored
      passesd filename is not found - function reports the symbol was not
      defined rather than file not found or something similar.
      6305d447
    • rswindell's avatar
      if sbbs_t::exec_bin() is called with a blank or NULL module name, just · 0d69795a
      rswindell authored
      return an error value (-33, it's the magic number).
      0d69795a
    • rswindell's avatar
      Work-around for issue with the old implib version: · 43176e34
      rswindell authored
      Borland Implib Version 3.0.22 Copyright (c) 1991, 2000 Inprise Corporation
      and MSVC-generated DLLs with exported functions using _cdecl calling convention
      ... sometimes or with some verisons of some DLLs, implib won't add the
      underscore prefix to the exported function name which caused the build error:
      Error: Unresolved external '_total_users' ...
      
      Using coff2omf instead to convert the MSVC-generated import library (sbbs.lib)
      to the Borland/OMF flavor works, however. I'd seen this issue before but it
      went away when the number of symbols in the source DLL changes. Newer versions
      of implib appear to *not* have this issue so when we upgrade to a newer
      C++Builder, this work-around will no longer be necessary.
      43176e34
  7. May 07, 2019
  8. May 06, 2019
  9. May 05, 2019
  10. May 04, 2019
    • rswindell's avatar
      smb_getplaintext and smb_getmsgtxt(...,GETMSGTXT_PLAIN) will now fall-back · 284b31b3
      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
      284b31b3
    • rswindell's avatar
    • rswindell's avatar
      Added a new sbbs_t.console (JS console.status) flag: CON_CR_CLREOL, which · 0dcfd4ff
      rswindell authored
      when set, force a clear-to-end-of-line sequence to be sent to the remote
      terminal before sending a carriage-return (CR, '\r') character. This is useful
      in scenarios where you want to move/home the cursor and *not* clear the screen
      and then display or execute something that assumes clean lines are being
      displayed on and thus wouldn'd bother with any clear-to-eol sequences before
      line-endings.
      Any scripts that enable this mode should disable it upon exit (e.g. using
      js.on_exit() to restore the original console status).
      0dcfd4ff
    • rswindell's avatar
      Add an optional mode (K_* flag) argument to sbbs_t::getkeys() and by extension, · 578f7af1
      rswindell authored
      JS's console.getkeys(). If no mode value is specified, K_UPPER is the default
      behavior (same as before). *.getkeys() currently only recognizes the following
      mode flags:
      - K_UPPER
      - K_NOECHO
      - K_NOCRLF
      
      K_NONE (0) is also a valid value.
      578f7af1
    • rswindell's avatar
    • rswindell's avatar
      Resolved GCC error: 'js_bbs_class' was declared 'extern' and later 'static' · efb81b98
      rswindell authored
      MSVC had no problem with this. <sigh>
      efb81b98
    • rswindell's avatar
      Define and use a wrapper for JS_GetInstancePrivate(): js_GetClassPrivate() · 6f83c4ff
      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.
      6f83c4ff
  11. May 03, 2019
  12. May 02, 2019
Loading