Art Cancro [Tue, 21 Nov 2023 14:41:18 +0000 (09:41 -0500)]
Removed temporary diagnostic output
Art Cancro [Tue, 21 Nov 2023 00:00:13 +0000 (19:00 -0500)]
upload.js: when removing an attachment, delete the div
This is handled the usual way, when we get a successful response from
the HTTP DELETE method, it triggers the removal of the list element
showing the attachment.
Art Cancro [Sun, 19 Nov 2023 18:39:12 +0000 (13:39 -0500)]
When a mail compose is canceled, flush all uploads.
Most of this was already in place. We now just run through our upload
list and do an async DELETE operation for each one.
Art Cancro [Thu, 9 Nov 2023 23:44:52 +0000 (13:44 -1000)]
upload.js: moved the delete-an-attachment skeleton code to its own function
Art Cancro [Mon, 6 Nov 2023 22:57:44 +0000 (17:57 -0500)]
Fixed the MIME boundary after the message text.
It had the trailing dashes in it, so it was getting interpreted as the end of the message.
Now that's corrected and the parsers of the world are happy.
Also, we eliminated the double-nesting thing, and everything is hunky dory now.
Art Cancro [Mon, 6 Nov 2023 22:51:13 +0000 (17:51 -0500)]
Quoted-printable encode HTML messages on the WebCit Server side.
This allows us to do multipart with attachments without nested encoding.
Art Cancro [Mon, 6 Nov 2023 21:56:55 +0000 (16:56 -0500)]
webcit-ng: fixed the way HTTP uploads are fed into the MIME Parser.
mime_parser() expects HEADERS+CONTENT but our h.request_body only contains CONTENT.
The fix: our transaction struct now has h.request_body_with_synth_headers that
begins with a synthetic Content-Type: header followed by a blank line and then the
request body. h.request_body is now just a pointer into that buffer, starting at
the position where the actual body begins.
This gives us the ability to supply the body with or without headers, without having
to make two copies of it.
Art Cancro [Mon, 6 Nov 2023 16:57:37 +0000 (11:57 -0500)]
considering nuclear weapons
Art Cancro [Mon, 6 Nov 2023 16:48:36 +0000 (11:48 -0500)]
Looks like I need to remove some optimization cancer from mime_parser.c, but first, a bit of style cleanup.
Art Cancro [Mon, 6 Nov 2023 16:30:08 +0000 (11:30 -0500)]
Progress on upload
Art Cancro [Fri, 3 Nov 2023 20:34:07 +0000 (16:34 -0400)]
room_functions.c: remove diagnostic hex dump of recipient field
Art Cancro [Fri, 3 Nov 2023 04:13:46 +0000 (19:13 -0900)]
json.c: encode JSON strings the correct way (RFC 7159 section 7).
The previous code used the JavaScript encoder from the stringbuf library, which
is *not* the same encoding. Now it doesn't make the browser's parser barf when
it encounters a control character.
Art Cancro [Fri, 3 Nov 2023 02:42:28 +0000 (17:42 -0900)]
War on old style continues.
I really ought to be writing some real code tonight. But I get into a file and I see
old style and I want to make it clean and shiny and it's easier than the kind of heavy
brain work I should be doing. When faced with a heavy think, I dawdle for a long time
before I really get started. I've done this since I was a child.
Art Cancro [Mon, 30 Oct 2023 18:05:20 +0000 (09:05 -0900)]
stringbuf.c: chipped away at style modernization
This is a big one with a lot of outdated style in it.
Folded lines which were >80 columns but <132 columns.
Add {} braces to single-line conditional blocks.
Replaced C89 comments with C99 comments.
Art Cancro [Mon, 30 Oct 2023 17:49:24 +0000 (08:49 -0900)]
vcard.c: style cleanup
Art Cancro [Fri, 27 Oct 2023 20:39:54 +0000 (11:39 -0900)]
Changed some C89 style comments to C99 style.
This is what I do when I'm slacking off and should be doing something useful.
Art Cancro [Fri, 27 Oct 2023 17:57:43 +0000 (08:57 -0900)]
removed an unused function
Art Cancro [Sat, 21 Oct 2023 16:55:17 +0000 (07:55 -0900)]
Saving my place.
Note to self: there is something in the mailbox of admin@dev that is
causing the renderer to fail and the javascript console emits unhelpful
messages.
Art Cancro [Mon, 16 Oct 2023 20:22:52 +0000 (20:22 +0000)]
loadtest: counters row offset from banner is definable
Art Cancro [Mon, 16 Oct 2023 19:53:17 +0000 (19:53 +0000)]
loadtest: counter position is now derived from thread id, not socket number.
This is what I was actually trying to accomplish a couple of commits ago. I made
a race condition and that's why it was malfunctioning. This way is better and it
works. It also once shot a man in Reno just to watch him die.
Art Cancro [Mon, 16 Oct 2023 19:34:59 +0000 (19:34 +0000)]
loadtest: paint the screen in a separate pass
Art Cancro [Mon, 16 Oct 2023 16:14:27 +0000 (12:14 -0400)]
tried some random cosmetic stuff and removed it
Art Cancro [Mon, 16 Oct 2023 16:08:39 +0000 (12:08 -0400)]
Revert "loadtest: change display"
This reverts commit
fdd4f3034903e50395e72acf74636e4cb12c2291.
Art Cancro [Mon, 16 Oct 2023 15:59:58 +0000 (06:59 -0900)]
loadtest: change display
Art Cancro [Fri, 13 Oct 2023 15:45:30 +0000 (06:45 -0900)]
server/housekeeping.c: fix a small compiler warning
Art Cancro [Fri, 13 Oct 2023 15:32:40 +0000 (11:32 -0400)]
More progress on attaching attachments
Art Cancro [Wed, 11 Oct 2023 22:55:08 +0000 (18:55 -0400)]
messages.c: inching towards saving the attachments
Art Cancro [Wed, 11 Oct 2023 22:44:05 +0000 (18:44 -0400)]
Don't try to destroy the upload window if it doesn't exist.
Art Cancro [Wed, 11 Oct 2023 22:36:29 +0000 (18:36 -0400)]
Got multipart/mixed being transmitted
Art Cancro [Wed, 11 Oct 2023 21:58:46 +0000 (17:58 -0400)]
deactivate_uploads() hides the window.
Art Cancro [Wed, 11 Oct 2023 03:18:07 +0000 (23:18 -0400)]
broken: attachments window cannot be a child of the editor body
It causes the attachments window to be saved as part of the message text.
Oof.
Art Cancro [Wed, 11 Oct 2023 02:37:48 +0000 (22:37 -0400)]
upload: reduce attachment identifiers to 9 characters.
Also switched from a unicode X to a fontawesome rounded-X for the
'remove attachment' button. The unicode one was too big.
Art Cancro [Tue, 10 Oct 2023 22:56:09 +0000 (18:56 -0400)]
move struct uploaded_file to webcit.h
Art Cancro [Fri, 6 Oct 2023 03:31:54 +0000 (23:31 -0400)]
loadtest: small file cleanup
Art Cancro [Fri, 6 Oct 2023 03:20:27 +0000 (23:20 -0400)]
upload DELETE method
Art Cancro [Fri, 6 Oct 2023 03:10:24 +0000 (23:10 -0400)]
Various operations in the /ctdl/p/ hierarchy to handle uploading of attachments
Art Cancro [Wed, 4 Oct 2023 21:34:10 +0000 (17:34 -0400)]
❌ marks the spot
root [Wed, 4 Oct 2023 18:55:26 +0000 (14:55 -0400)]
uploads
root [Wed, 4 Oct 2023 16:49:34 +0000 (12:49 -0400)]
upload.c: hold uploads in temporary file handles
Art Cancro [Tue, 3 Oct 2023 18:35:01 +0000 (14:35 -0400)]
upload: change REST path from /ctdl/a/upload/ to /ctdl/p/
Art Cancro [Tue, 3 Oct 2023 18:26:11 +0000 (14:26 -0400)]
api.txt: updated
Art Cancro [Tue, 3 Oct 2023 17:50:06 +0000 (13:50 -0400)]
libcitadel/configure.in: renamed to configure.ac
Art Cancro [Sat, 30 Sep 2023 04:55:54 +0000 (00:55 -0400)]
upload.c: rename "tempfilename" to "ref"
This will hopefully discourage people from trying to play stupid tricks
involving guessing the filename and trying to escape the containment.
Art Cancro [Sat, 30 Sep 2023 04:47:08 +0000 (00:47 -0400)]
upload.js: moved these functions into own file.
Good clean separation of functions.
This should allow us to handle uploads in lots of different places
in the system.
Art Cancro [Sat, 30 Sep 2023 04:27:35 +0000 (00:27 -0400)]
array.c: minor changes to comments
Art Cancro [Fri, 29 Sep 2023 02:19:43 +0000 (22:19 -0400)]
Release version 996 generated by do-release.sh
Art Cancro [Fri, 29 Sep 2023 02:14:24 +0000 (22:14 -0400)]
Additional checks to keep zero-length messages from crashing the indexer.
Art Cancro [Wed, 27 Sep 2023 17:48:29 +0000 (13:48 -0400)]
uploads: return uploaded file info to caller
Art Cancro [Wed, 27 Sep 2023 15:29:16 +0000 (11:29 -0400)]
upload.c: more progress on returning values
Art Cancro [Wed, 27 Sep 2023 04:21:39 +0000 (00:21 -0400)]
do not require autoconf 2.71 wtf
Art Cancro [Wed, 27 Sep 2023 03:59:55 +0000 (23:59 -0400)]
Release version 995 generated by do-release.sh
Art Cancro [Wed, 27 Sep 2023 03:59:43 +0000 (23:59 -0400)]
serv_fulltext: don't try to index a null message
Art Cancro [Wed, 27 Sep 2023 03:49:53 +0000 (23:49 -0400)]
textclient: makefile no longer leaves behind test compiles
Art Cancro [Wed, 27 Sep 2023 03:44:05 +0000 (23:44 -0400)]
upload.c: write uploaded data to a temp file
Art Cancro [Tue, 26 Sep 2023 04:13:35 +0000 (00:13 -0400)]
view_mail.js: throbber and "Processing dropped files..." message appears
"Processing dropped files..." is not exactly the right message because
the upload message might have been clicked, but I don't want to throw
away the translations of that message.
Anyway, it's really cool, they appear in the list, and go away when the
uploads are complete.
Art Cancro [Tue, 26 Sep 2023 03:47:52 +0000 (23:47 -0400)]
view_mail.js: make the function names more consistent with webcit
(They were previously the same names used in the example, natch)
Also we're incrementing num_attachments
Art Cancro [Tue, 26 Sep 2023 03:35:17 +0000 (23:35 -0400)]
Simplify the upload dialog.
Reduce the number of divs and make it more generic. Allow the upload dialog to
be attached to any parent div. Make the dialog appear automatically when a file
is dragged into the parent div.
Art Cancro [Tue, 26 Sep 2023 02:44:10 +0000 (22:44 -0400)]
view_mail.js: move upload dialog from ctdl_big_modal to ctdl-upload
Uploads now have their own div in their own separate modal.
This is, of course, because I am trying to loosely couple the uploader so
that it can be attached to other parts of the system when needed.
Also I realized that my div names are ctdl-not ctdl_consistent with each other.
Trying to fix that.
Art Cancro [Tue, 26 Sep 2023 02:13:59 +0000 (22:13 -0400)]
upload.c: stub function for accepting uploads
Art Cancro [Mon, 25 Sep 2023 14:57:34 +0000 (10:57 -0400)]
view_mail.js: more progress on upload dialog
Art Cancro [Sun, 24 Sep 2023 21:07:18 +0000 (17:07 -0400)]
Improving my template-literal-fu
Art Cancro [Sun, 24 Sep 2023 21:00:37 +0000 (17:00 -0400)]
view_mail.js: convert ugly syntax to heredocs
Art Cancro [Sun, 24 Sep 2023 19:38:48 +0000 (15:38 -0400)]
Close attachments window on Cancel
Art Cancro [Sat, 23 Sep 2023 20:28:05 +0000 (16:28 -0400)]
view_mail.js: show/hide attachments screen, added title bar style and close button
Art Cancro [Sat, 23 Sep 2023 18:30:57 +0000 (14:30 -0400)]
loadtest: use a random password
Art Cancro [Tue, 19 Sep 2023 22:31:15 +0000 (18:31 -0400)]
Attachment download links target to _blank
Art Cancro [Tue, 19 Sep 2023 20:26:13 +0000 (16:26 -0400)]
Attachments now download with the appropriate filename.
This was accomplished by disregarding any REST components to the right of
the part number, allowing the filename to be placed there. The filename is
sanitized to prevent script injection.
Art Cancro [Tue, 19 Sep 2023 20:02:38 +0000 (16:02 -0400)]
view_mail.js: better display of attachment links; attachments are now working
Displaying each one as a link definitely makes it stand out from the message text.
Display the size of each attachment -- _(bytes) is already in the webcit-classic translations
Downloads are working, but the wrong file name is derived
Art Cancro [Tue, 19 Sep 2023 16:11:05 +0000 (12:11 -0400)]
Where gettimeofday() is required, include both time.h and sys/time.h
Art Cancro [Mon, 18 Sep 2023 19:37:02 +0000 (15:37 -0400)]
removed some verbage, but really a git test
Art Cancro [Mon, 18 Sep 2023 18:32:05 +0000 (09:32 -0900)]
Additional memory allocated since startup: %d bytes message now identical to other components
Art Cancro [Mon, 18 Sep 2023 18:21:10 +0000 (09:21 -0900)]
Write server PID to citadel.lock in addition to locking it.
This will be useful for systems like FreeBSD that need to know a PID to monitor.
Art Cancro [Mon, 18 Sep 2023 00:19:56 +0000 (20:19 -0400)]
Fixed build failure induced by the new version of autoconf.
Die in a hail of capitalist machine gun fire, Richard Stallman.
Communism is straight from hell and so are you.
Art Cancro [Sun, 17 Sep 2023 23:29:16 +0000 (19:29 -0400)]
I have no words to describe the fuckery I am trying to reverse-enginner here. Ever heard of COMMENTS?
Art Cancro [Sat, 16 Sep 2023 16:12:25 +0000 (12:12 -0400)]
Sanitize better. "&" is handled before "<" and ">" so it doesn't sanitize the > and < ampersands.
Ampersands are awesome. They look a lot like treble clefs, don't they? Actually they hate each other.
Art Cancro [Sat, 16 Sep 2023 02:05:02 +0000 (22:05 -0400)]
Release version 994 generated by do-release.sh
Art Cancro [Sat, 16 Sep 2023 02:04:27 +0000 (22:04 -0400)]
webcit: sanitize instant messages against XSS type stuff
Art Cancro [Fri, 15 Sep 2023 22:43:46 +0000 (18:43 -0400)]
Obsolete sys/time.h and HAVE_TIME_WITH_SYS_TIME
Art Cancro [Fri, 15 Sep 2023 22:19:48 +0000 (18:19 -0400)]
cdb_chmod_data() : don't make so much noise unless there was an error
Art Cancro [Sat, 9 Sep 2023 19:19:13 +0000 (15:19 -0400)]
Suppress noise during configure
Art Cancro [Sat, 9 Sep 2023 00:51:54 +0000 (20:51 -0400)]
validate_recipients(): don't send mail to user 0
Art Cancro [Fri, 8 Sep 2023 22:59:00 +0000 (18:59 -0400)]
serv_expire: remove two TRACE directives I left in there by accident
Art Cancro [Thu, 7 Sep 2023 13:58:36 +0000 (09:58 -0400)]
TDAP: consolidated transcripts to a single summary
Art Cancro [Wed, 6 Sep 2023 23:07:24 +0000 (19:07 -0400)]
serv_expire: abort() if any malloc() calls fail.
This is drastic, but the alternative is to purge records that are still good.
Art Cancro [Wed, 6 Sep 2023 03:05:01 +0000 (23:05 -0400)]
Release version 993 generated by do-release.sh
Art Cancro [Wed, 6 Sep 2023 03:04:50 +0000 (23:04 -0400)]
berkeley_db: cdb_next_item() use DB_REALLOC, not DB_MALLOC
Fixes a 'Brown Paper Bug' that will leak memory ... catastrophically if ctdldump is run on a big db.
Art Cancro [Wed, 6 Sep 2023 03:00:39 +0000 (23:00 -0400)]
ctdldump/ctdlload: document the -y flag
Art Cancro [Wed, 6 Sep 2023 02:55:15 +0000 (22:55 -0400)]
serv_fulltext: better handling of exit by yield vs complete
Art Cancro [Tue, 5 Sep 2023 22:14:40 +0000 (18:14 -0400)]
Richard Stallman is a fucking left-wing communist douchebag.
Art Cancro [Tue, 5 Sep 2023 22:09:38 +0000 (18:09 -0400)]
textclient: don't prompt to change internet email addresses when deleting a user
The 'edit user' and 'delete user' workflows run through the same function since
the process of deleting a user simply edits them and changes their access level
to 0. Add a check for cmd==25 (edit user) before asking the user if they want
to change the email addresses.
Art Cancro [Tue, 5 Sep 2023 03:59:44 +0000 (23:59 -0400)]
Omit the warning about session scheduled for termination but not idle.
Something about this warning makes it reference a bad pointer and crash
during periods of extremely high load. I don't know why, but just leaving
it alone seems to fix the problem.
Art Cancro [Sat, 2 Sep 2023 21:27:59 +0000 (17:27 -0400)]
Release version 992 generated by do-release.sh
Art Cancro [Sat, 2 Sep 2023 03:22:50 +0000 (23:22 -0400)]
only build chkpw and chkpwd if we can
Art Cancro [Sat, 2 Sep 2023 03:15:14 +0000 (23:15 -0400)]
Remove the warning-this-is-unfinished warnings from ctdldump.c and ctdlload.c
Most of these tools are now building successfully on FreeBSD.
Art Cancro [Sat, 2 Sep 2023 02:42:03 +0000 (22:42 -0400)]
Include -lintl where we need it on systems that have it
Art Cancro [Sat, 2 Sep 2023 02:37:20 +0000 (22:37 -0400)]
Include -lresolv only if we have it
Charlie Root [Sat, 2 Sep 2023 02:27:08 +0000 (22:27 -0400)]
loadtest: run with a warning instead of exiting when not all threads connect.
Art Cancro [Fri, 1 Sep 2023 16:10:02 +0000 (16:10 +0000)]
loadtest: pretty display when running with hundreds of threads
Art Cancro [Fri, 1 Sep 2023 15:55:20 +0000 (15:55 +0000)]
fulltext: be smarter about exiting silently if there's nothing to do.
Art Cancro [Fri, 1 Sep 2023 15:07:42 +0000 (15:07 +0000)]
fulltext: after the indexer runs for 60 seconds (tunable), yield the thread