Art Cancro [Sat, 26 Feb 2022 20:13:14 +0000 (15:13 -0500)]
Handle messages that are empty (or which appear empty to MSG4 because they consist solely of a non-renderable attachment in Part 0) by delivering a null json instead of locking up.
Art Cancro [Thu, 17 Feb 2022 00:41:50 +0000 (19:41 -0500)]
The sidebar buttons are now unhighlighted by default. When rendering a room view, iterate through all of them, unhighlight any that are highlighted, and then highlight the correct one.
Art Cancro [Wed, 16 Feb 2022 23:53:34 +0000 (18:53 -0500)]
Use the Font Awesome 6.0.0 hosted version instead of 5.whatever ... note to self: now that I know they just randomly pull back versions off the CDN, we need to host our own or include it in the package during final distribution. Bad form, FA people. Bad form.
Art Cancro [Fri, 11 Feb 2022 21:56:42 +0000 (16:56 -0500)]
Fixed a bug in the "goto next room" logic that was causing the first click of Goto (or Skip) to load the march list but then didn't actually change rooms.
Art Cancro [Sat, 22 Jan 2022 21:02:22 +0000 (16:02 -0500)]
Added a button to the screen that can be populated and brought into
view whenever a "new item" command is available, such as "Post message"
or "Enter mail" or "New calendar item"
Art Cancro [Fri, 14 Jan 2022 16:08:55 +0000 (11:08 -0500)]
This is a better version of detect_logged_in() for webcit-ng that
checks the server cookie instead of clumsily attempting a command.
This works synchronously so it can be combined with other commands
without creating a race condition. Also moved the login screen to
a modal.
Art Cancro [Thu, 13 Jan 2022 23:38:34 +0000 (18:38 -0500)]
Removed some debugs that are no longer needed now that the listsub rework is complete. Also updated the netconfig specification to remove the obsolete pending command.
Art Cancro [Thu, 13 Jan 2022 16:48:37 +0000 (11:48 -0500)]
Big change to mailing list subscription/unsubscription!
The old confirmation method involved generating a confirmation token
during the first opt, which was mailed to the user and saved to disk
so they could confirm it in the second opt. In the new code, the
token can be re-generated persistently by the server using a
combination of the email address, the room name, and a host key that
is known only to the site operator (stored in the config db). So
there is no longer a need to store the pending request, and the
confirmation links are valid forever (and reusable!).
Aside from being algorithmically nifty, this will also give us the
ability to implement "one click unsubscribe" in the near future.
Art Cancro [Mon, 10 Jan 2022 22:42:26 +0000 (17:42 -0500)]
ssl ciphers had to be set to its old value of
"ALL:RC4+RSA:+SSLv2:+TLSv1:!MD5:@STRENGTH"
instead of
"DEFAULT"
even though the latter works just fine in WebCit, works just fine
in all protocols on the development host, but causes all sorts of
chaos on Uncensored. I don't know why.
Art Cancro [Mon, 10 Jan 2022 19:54:54 +0000 (14:54 -0500)]
I got a little too eager in removing old cruft from the TLS code. Not setting the correct cipher list broke production in a way that didn't fail in development.
Art Cancro [Mon, 10 Jan 2022 16:59:07 +0000 (11:59 -0500)]
Switch out the key/cert in a critical section (mutex wrapped). This will prevent multiple threads from doing it at once and leaking memory (thanks zcw159357)
Art Cancro [Sat, 8 Jan 2022 18:42:27 +0000 (13:42 -0500)]
When a new certificate is installed, allocate a new ssl_ctx and bind to it; then wait a moment before freeing the old one to let any in-progress binds complete.
Art Cancro [Sat, 8 Jan 2022 18:30:23 +0000 (13:30 -0500)]
Significant cleanup of the code that generates a self-signed certificate. There is no need to keep the CSR around so we don't do that anymore. The remainder of the code contains only what is needed; the rest I had copied from OpenSSL example code 20 years ago and never looked at again.
Art Cancro [Fri, 7 Jan 2022 16:54:54 +0000 (11:54 -0500)]
Removed the local implementation of snprintf() and vsnprintf() that we hacked in two decades ago to work around broken or missing system libraries. Not needed anymore.
Art Cancro [Fri, 7 Jan 2022 16:38:19 +0000 (11:38 -0500)]
ssl_ctx = SSL_CTX_new(SSLv23_server_method()) instead of using a temporary variable f or the server method. (Changed in Citadel Server, WebCit Classic, and WebCit-NG)
Art Cancro [Wed, 5 Jan 2022 18:49:17 +0000 (13:49 -0500)]
When checking to see whether we have to rebind a new key and/or
certificate, the stored "previous value" is now the sum of the
existing key *and* certificate modification times. This causes a
rebind to occur if either file's modification time is touched.
It does not matter if this rolls over on 32-bit systems because
we are only checking to see if the value changed, not for any
particular date comparison.
Art Cancro [Mon, 3 Jan 2022 22:33:19 +0000 (17:33 -0500)]
I went looking for something in the text client, and was reminded
how absolutely rubbish my coding style was in the late 1980s. I did
a few bits of cleanup but most of that code ought to be rewritten.
The good news is that unlike WebCit, I believe we can redo the text
client in place over a period of time.
Art Cancro [Sat, 1 Jan 2022 20:49:08 +0000 (15:49 -0500)]
The "reply" function in webcit-ng now correctly replaces the editor div with
the final rendered version of the message that came back from the server.
It looks nice.
Art Cancro [Wed, 29 Dec 2021 22:53:59 +0000 (17:53 -0500)]
Extend the source_room field all the way into the SMTP delivery loop.
Tested adding SMTP headers directly into the outgoing message at the
moment of transmission -- it worked really well. Temporarily adding
an "X-Citadel-Room:" header as a placeholder, but in the next couple
of commits we will make it a "List-Unsubscribe:" header.
Art Cancro [Wed, 29 Dec 2021 19:47:34 +0000 (14:47 -0500)]
When delivering mailing list messages, populate the sending_room
field of the recipient list. This in turn populates the source_room
directive in the SMTP delivery list, which we will use soon.
Art Cancro [Wed, 29 Dec 2021 16:28:48 +0000 (11:28 -0500)]
Fucking hell. We actually HAVE a "Allow non-subscribers to mail to
this room" flag. I was confused by the poor wording of this option
in the text client, and screwed up the server's behavior when I
rewrote the mailing list server. It's fixed now, and once again
has the correct behavior: anyone can email a room when the flag is
set, and subscribers can email the room regardless of the flag.