• exec/imapservice.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Fri Apr 10 21:07:44 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/09a6a040db5965a1dd674b3f
    Modified Files:
    exec/imapservice.js
    Log Message:
    Fix imapservice.js toSource() calls for SM128 compatibility

    Replace all 33 toSource() occurrences:
    - Deep copies: eval(x.toSource()) -> JSON.parse(JSON.stringify(x))
    - Error messages: x.toSource() -> JSON.stringify(x)
    - Value embedding in eval'd functions: x.toSource() -> JSON.stringify(x)
    and wrap function expressions in parens for SM128
    - NOT/OR search: replace eval+toSource function serialization with
    direct closure composition
    - Fix bug in OR: next1[0]==next1[1] -> next1[0]==next2[0]

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Tue Nov 24 19:23:19 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/764da78a8b46556b2a9d74d1
    Modified Files:
    exec/imapservice.js
    Log Message:
    IMAP: let users flag and delete their own mail (#1369)

    An ordinary user's \Flagged (MSG_VALIDATED) or \Deleted on their own
    mail was silently dropped; only a sysop's stuck. check_msgflags() now
    grants a mail recipient MSG_VALIDATED and MSG_DELETE as well as
    MSG_READ, so a star set in a mail app matches web mail's "Starred". On sub-boards MSG_VALIDATED stays operator-only.

    Fixes in do_store():

    - The recipient/sender test compared hdr.to/hdr.from (names) with the
    user number and NET_NONE with to_net_type, which is undefined for
    local mail, so it never matched. Use to_ext/from_ext. (8b1ad2a3aa)
    - base.is_operator is not a MsgBase property, so sub-board operators
    never got operator rights. Use msg_area.sub[].is_operator.
    (8b1ad2a3aa)
    - For mail, the faked per-user \Seen replaced the header's real
    MSG_READ (e0a367bdea). With the recipient now granted MSG_READ, a
    client's +FLAGS (\Seen) on mail read outside IMAP toggled it back to
    unread. Mail now uses the header's MSG_READ, as read_index() does.
    - Flag changes were computed against the index loaded at SELECT and
    XOR'd onto the current header, so a flag changed elsewhere since
    could flip the wrong way. Compute from the current header and set
    the permitted bits to the requested state.
    - The untagged FETCH reply to a STORE reported the flags from before
    the change. Sync the index entry from the stored header first.

    Tested live over IMAP as a non-sysop user: \Flagged and \Seen set and
    clear, survive reconnect, and +\Seen on already-read mail stays read.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net