citadel.git
7 months agoRelease version 996 generated by do-release.sh v996
Art Cancro [Fri, 29 Sep 2023 02:19:43 +0000 (22:19 -0400)]
Release version 996 generated by do-release.sh

7 months agoAdditional checks to keep zero-length messages from crashing the indexer.
Art Cancro [Fri, 29 Sep 2023 02:14:24 +0000 (22:14 -0400)]
Additional checks to keep zero-length messages from crashing the indexer.

7 months agouploads: return uploaded file info to caller
Art Cancro [Wed, 27 Sep 2023 17:48:29 +0000 (13:48 -0400)]
uploads: return uploaded file info to caller

7 months agoupload.c: more progress on returning values
Art Cancro [Wed, 27 Sep 2023 15:29:16 +0000 (11:29 -0400)]
upload.c: more progress on returning values

7 months agodo not require autoconf 2.71 wtf
Art Cancro [Wed, 27 Sep 2023 04:21:39 +0000 (00:21 -0400)]
do not require autoconf 2.71 wtf

7 months agoRelease version 995 generated by do-release.sh v995
Art Cancro [Wed, 27 Sep 2023 03:59:55 +0000 (23:59 -0400)]
Release version 995 generated by do-release.sh

7 months agoserv_fulltext: don't try to index a null message
Art Cancro [Wed, 27 Sep 2023 03:59:43 +0000 (23:59 -0400)]
serv_fulltext: don't try to index a null message

7 months agotextclient: makefile no longer leaves behind test compiles
Art Cancro [Wed, 27 Sep 2023 03:49:53 +0000 (23:49 -0400)]
textclient: makefile no longer leaves behind test compiles

7 months agoupload.c: write uploaded data to a temp file
Art Cancro [Wed, 27 Sep 2023 03:44:05 +0000 (23:44 -0400)]
upload.c: write uploaded data to a temp file

7 months agoview_mail.js: throbber and "Processing dropped files..." message appears
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.

7 months agoview_mail.js: make the function names more consistent with webcit
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

7 months agoSimplify the upload dialog.
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.

7 months agoview_mail.js: move upload dialog from ctdl_big_modal to ctdl-upload
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.

7 months agoupload.c: stub function for accepting uploads
Art Cancro [Tue, 26 Sep 2023 02:13:59 +0000 (22:13 -0400)]
upload.c: stub function for accepting uploads

7 months agoview_mail.js: more progress on upload dialog
Art Cancro [Mon, 25 Sep 2023 14:57:34 +0000 (10:57 -0400)]
view_mail.js: more progress on upload dialog

7 months agoImproving my template-literal-fu
Art Cancro [Sun, 24 Sep 2023 21:07:18 +0000 (17:07 -0400)]
Improving my template-literal-fu

7 months agoview_mail.js: convert ugly syntax to heredocs
Art Cancro [Sun, 24 Sep 2023 21:00:37 +0000 (17:00 -0400)]
view_mail.js: convert ugly syntax to heredocs

7 months agoClose attachments window on Cancel
Art Cancro [Sun, 24 Sep 2023 19:38:48 +0000 (15:38 -0400)]
Close attachments window on Cancel

7 months agoview_mail.js: show/hide attachments screen, added title bar style and close button
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

7 months agoloadtest: use a random password
Art Cancro [Sat, 23 Sep 2023 18:30:57 +0000 (14:30 -0400)]
loadtest: use a random password

7 months agoAttachment download links target to _blank
Art Cancro [Tue, 19 Sep 2023 22:31:15 +0000 (18:31 -0400)]
Attachment download links target to _blank

7 months agoAttachments now download with the appropriate filename.
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.

7 months agoview_mail.js: better display of attachment links; attachments are now working
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

7 months agoWhere gettimeofday() is required, include both time.h and sys/time.h
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

7 months agoremoved some verbage, but really a git test
Art Cancro [Mon, 18 Sep 2023 19:37:02 +0000 (15:37 -0400)]
removed some verbage, but really a git test

7 months agoAdditional memory allocated since startup: %d bytes message now identical to other...
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

7 months agoWrite server PID to citadel.lock in addition to locking it.
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.

7 months agoFixed build failure induced by the new version of autoconf.
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.

7 months agoI have no words to describe the fuckery I am trying to reverse-enginner here. Ever...
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?

7 months agoSanitize better. "&" is handled before "<" and ">" so it doesn't sanitize the &gt...
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 &gt; and &lt; ampersands.

Ampersands are awesome.  They look a lot like treble clefs, don't they?  Actually they hate each other.

7 months agoRelease version 994 generated by do-release.sh v994
Art Cancro [Sat, 16 Sep 2023 02:05:02 +0000 (22:05 -0400)]
Release version 994 generated by do-release.sh

7 months agowebcit: sanitize instant messages against XSS type stuff
Art Cancro [Sat, 16 Sep 2023 02:04:27 +0000 (22:04 -0400)]
webcit: sanitize instant messages against XSS type stuff

7 months agoObsolete sys/time.h and HAVE_TIME_WITH_SYS_TIME
Art Cancro [Fri, 15 Sep 2023 22:43:46 +0000 (18:43 -0400)]
Obsolete sys/time.h and HAVE_TIME_WITH_SYS_TIME

7 months agocdb_chmod_data() : don't make so much noise unless there was an error
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

7 months agoSuppress noise during configure
Art Cancro [Sat, 9 Sep 2023 19:19:13 +0000 (15:19 -0400)]
Suppress noise during configure

7 months agovalidate_recipients(): don't send mail to user 0
Art Cancro [Sat, 9 Sep 2023 00:51:54 +0000 (20:51 -0400)]
validate_recipients(): don't send mail to user 0

7 months agoserv_expire: remove two TRACE directives I left in there by accident
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

7 months agoTDAP: consolidated transcripts to a single summary
Art Cancro [Thu, 7 Sep 2023 13:58:36 +0000 (09:58 -0400)]
TDAP: consolidated transcripts to a single summary

7 months agoserv_expire: abort() if any malloc() calls fail.
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.

7 months agoRelease version 993 generated by do-release.sh v993
Art Cancro [Wed, 6 Sep 2023 03:05:01 +0000 (23:05 -0400)]
Release version 993 generated by do-release.sh

7 months agoberkeley_db: cdb_next_item() use DB_REALLOC, not DB_MALLOC
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.

7 months agoctdldump/ctdlload: document the -y flag
Art Cancro [Wed, 6 Sep 2023 03:00:39 +0000 (23:00 -0400)]
ctdldump/ctdlload: document the -y flag

7 months agoserv_fulltext: better handling of exit by yield vs complete
Art Cancro [Wed, 6 Sep 2023 02:55:15 +0000 (22:55 -0400)]
serv_fulltext: better handling of exit by yield vs complete

7 months agoRichard Stallman is a fucking left-wing communist douchebag.
Art Cancro [Tue, 5 Sep 2023 22:14:40 +0000 (18:14 -0400)]
Richard Stallman is a fucking left-wing communist douchebag.

7 months agotextclient: don't prompt to change internet email addresses when deleting a user
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.

7 months agoOmit the warning about session scheduled for termination but not idle.
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.

7 months agoRelease version 992 generated by do-release.sh v992
Art Cancro [Sat, 2 Sep 2023 21:27:59 +0000 (17:27 -0400)]
Release version 992 generated by do-release.sh

7 months agoonly build chkpw and chkpwd if we can
Art Cancro [Sat, 2 Sep 2023 03:22:50 +0000 (23:22 -0400)]
only build chkpw and chkpwd if we can

7 months agoRemove the warning-this-is-unfinished warnings from ctdldump.c and ctdlload.c
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.

7 months agoInclude -lintl where we need it on systems that have it
Art Cancro [Sat, 2 Sep 2023 02:42:03 +0000 (22:42 -0400)]
Include -lintl where we need it on systems that have it

7 months agoInclude -lresolv only if we have it
Art Cancro [Sat, 2 Sep 2023 02:37:20 +0000 (22:37 -0400)]
Include -lresolv only if we have it

7 months agoloadtest: run with a warning instead of exiting when not all threads connect.
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.

7 months agoloadtest: pretty display when running with hundreds of threads
Art Cancro [Fri, 1 Sep 2023 16:10:02 +0000 (16:10 +0000)]
loadtest: pretty display when running with hundreds of threads

7 months agofulltext: be smarter about exiting silently if there's nothing to do.
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.

7 months agofulltext: after the indexer runs for 60 seconds (tunable), yield the thread
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

7 months agoloadtest: minor changes
root [Fri, 1 Sep 2023 14:50:57 +0000 (14:50 +0000)]
loadtest: minor changes

7 months agoRelease version 991 generated by do-release.sh v991
Art Cancro [Fri, 1 Sep 2023 03:10:36 +0000 (23:10 -0400)]
Release version 991 generated by do-release.sh

7 months agoMoved the creation of the data directory.
Art Cancro [Fri, 1 Sep 2023 03:10:28 +0000 (23:10 -0400)]
Moved the creation of the data directory.

It was happening too late in the new code and failing on some new installations.

7 months agoRelease version 990 generated by do-release.sh v990
Art Cancro [Thu, 31 Aug 2023 21:35:40 +0000 (12:35 -0900)]
Release version 990 generated by do-release.sh

7 months agoRelease version 989 generated by do-release.sh v989
Art Cancro [Thu, 31 Aug 2023 21:35:33 +0000 (12:35 -0900)]
Release version 989 generated by do-release.sh

7 months agoOn second thought, let's do it this way.
Art Cancro [Thu, 31 Aug 2023 21:13:13 +0000 (12:13 -0900)]
On second thought, let's do it this way.

7 months agoRevert "setup: reflect the fact that the operator should restart the server"
Art Cancro [Thu, 31 Aug 2023 21:08:02 +0000 (12:08 -0900)]
Revert "setup: reflect the fact that the operator should restart the server"

This reverts commit c7589e995080a55e55c587d65c85a5889beb4194.

7 months agosetup: reflect the fact that the operator should restart the server
Art Cancro [Thu, 31 Aug 2023 21:00:12 +0000 (12:00 -0900)]
setup: reflect the fact that the operator should restart the server

7 months agoRemoved background and restart from citserver.
Art Cancro [Thu, 31 Aug 2023 19:10:32 +0000 (10:10 -0900)]
Removed background and restart from citserver.

These functions should be managed by an external supervisor program.

7 months agofix compiler warning
Art Cancro [Thu, 31 Aug 2023 18:48:43 +0000 (09:48 -0900)]
fix compiler warning

7 months agoRenamed Makefile to GNUmakefile to enforce the use of gmake
Art Cancro [Thu, 31 Aug 2023 18:32:55 +0000 (14:32 -0400)]
Renamed Makefile to GNUmakefile to enforce the use of gmake

8 months agoRewrite of the indexer is complete!
Art Cancro [Thu, 31 Aug 2023 04:03:53 +0000 (00:03 -0400)]
Rewrite of the indexer is complete!

No more search hooks.  Modules can call each other now and that's a lot simpler.
We also eliminated the index cache, because it made things a lot more complex, and
a modern database is going to mmap most of the index as it gets used anyway.

8 months agoRemoved all the disused CtdlUnregister functions.
Art Cancro [Thu, 31 Aug 2023 03:28:30 +0000 (23:28 -0400)]
Removed all the disused CtdlUnregister functions.

We don't call Unregister functions anymore because our objective is now
to close the databases and GTFO when the server needs to shut down.

8 months agosearch function is complete
Art Cancro [Thu, 31 Aug 2023 03:13:11 +0000 (23:13 -0400)]
search function is complete

8 months agoWrapping indexer transactions inside a critical section seems to make it not deadlock
Art Cancro [Wed, 30 Aug 2023 19:27:39 +0000 (15:27 -0400)]
Wrapping indexer transactions inside a critical section seems to make it not deadlock

8 months agoRewrote the indexer
Art Cancro [Wed, 30 Aug 2023 16:03:08 +0000 (12:03 -0400)]
Rewrote the indexer

8 months agoRemoved double-fetch-room in the indexer.
Art Cancro [Wed, 30 Aug 2023 02:49:34 +0000 (22:49 -0400)]
Removed double-fetch-room in the indexer.

I don't want to celebrate prematurely, but we've gotten through 10,000 ops
in every of 10 threads without deadlocking.

8 months agofree(msglist)
Art Cancro [Wed, 30 Aug 2023 02:40:31 +0000 (22:40 -0400)]
free(msglist)

8 months agoTotally ripping apart the indexer.
Art Cancro [Wed, 30 Aug 2023 02:30:32 +0000 (22:30 -0400)]
Totally ripping apart the indexer.

And yet, it doesn't seem to be anything 'deep' that's making it deadlock.
If I get desperate I may have to just give it its own thread or something.

8 months agoserv_fulltext: wordbreaker now returns a libcitadel Array
Art Cancro [Tue, 29 Aug 2023 21:12:04 +0000 (17:12 -0400)]
serv_fulltext: wordbreaker now returns a libcitadel Array

8 months agoCtdlForEachMessage() don't process message 0
Art Cancro [Tue, 29 Aug 2023 19:03:34 +0000 (15:03 -0400)]
CtdlForEachMessage() don't process message 0

8 months agothreads.c: commented out try_critical_section() , I don't want this
Art Cancro [Tue, 29 Aug 2023 17:12:09 +0000 (13:12 -0400)]
threads.c: commented out try_critical_section() , I don't want this

8 months agoloadtest.c: after creating accounts and rooms, log back in using a non privileged...
Art Cancro [Tue, 29 Aug 2023 15:50:22 +0000 (11:50 -0400)]
loadtest.c: after creating accounts and rooms, log back in using a non privileged socket

8 months agoMakefile: proper incantation for compiling loadtest
Art Cancro [Tue, 29 Aug 2023 15:44:31 +0000 (11:44 -0400)]
Makefile: proper incantation for compiling loadtest

8 months agocontext.c: fixed invalid pointer
Art Cancro [Tue, 29 Aug 2023 15:36:36 +0000 (11:36 -0400)]
context.c: fixed invalid pointer

8 months agoTemporarily disable the indexer
Art Cancro [Tue, 29 Aug 2023 05:37:59 +0000 (01:37 -0400)]
Temporarily disable the indexer

8 months agono diags
Art Cancro [Tue, 29 Aug 2023 03:54:50 +0000 (23:54 -0400)]
no diags

8 months agocdb_tick() called periodically
Art Cancro [Tue, 29 Aug 2023 03:53:58 +0000 (23:53 -0400)]
cdb_tick() called periodically

8 months agoWhen opening a cursor, always read through to the end.
Art Cancro [Tue, 29 Aug 2023 02:38:55 +0000 (22:38 -0400)]
When opening a cursor, always read through to the end.

This should theoretically eliminate the need to ever call cdb_close_cursor()

8 months agocosmetic stuff
Art Cancro [Tue, 29 Aug 2023 02:24:45 +0000 (22:24 -0400)]
cosmetic stuff

8 months agocleaned that up a bit
Art Cancro [Tue, 29 Aug 2023 02:08:52 +0000 (22:08 -0400)]
cleaned that up a bit

8 months agoloadtest.c: multiple threadds
Art Cancro [Tue, 29 Aug 2023 02:02:51 +0000 (22:02 -0400)]
loadtest.c: multiple threadds

8 months agoGenerate listsub token with a hash instead of crypt
Art Cancro [Tue, 29 Aug 2023 01:26:35 +0000 (16:26 -0900)]
Generate listsub token with a hash instead of crypt

8 months ago.gitignore: add dbnothing and loadtest
Art Cancro [Mon, 28 Aug 2023 23:43:38 +0000 (19:43 -0400)]
.gitignore: add dbnothing and loadtest

8 months agoMakefile: use ${CC} selected by configure
Art Cancro [Mon, 28 Aug 2023 15:26:54 +0000 (11:26 -0400)]
Makefile: use ${CC} selected by configure

8 months agoRemoved the 'ucred' stuff. It's insecure and it doesn't work on FreeBSD anyway.
Art Cancro [Mon, 28 Aug 2023 15:19:42 +0000 (11:19 -0400)]
Removed the 'ucred' stuff.  It's insecure and it doesn't work on FreeBSD anyway.

8 months agoFreeBSD compatibility (first of several commits)
Art Cancro [Mon, 28 Aug 2023 15:13:42 +0000 (11:13 -0400)]
FreeBSD compatibility (first of several commits)

8 months agoRemoved extra diagnostics
Art Cancro [Mon, 28 Aug 2023 01:03:01 +0000 (21:03 -0400)]
Removed extra diagnostics

8 months agodiagnostics
Art Cancro [Mon, 28 Aug 2023 00:40:34 +0000 (15:40 -0900)]
diagnostics

8 months agoFound a place where CM_SetAsField() was owning db memory.
Art Cancro [Sun, 27 Aug 2023 04:17:42 +0000 (00:17 -0400)]
Found a place where CM_SetAsField() was owning db memory.

Changed that, of course.  It was causing a double free.

8 months agoCM_SetField() no longer accepts a length, just uses strdup()
Art Cancro [Sun, 27 Aug 2023 04:04:57 +0000 (00:04 -0400)]
CM_SetField() no longer accepts a length, just uses strdup()

8 months agoloadtest.c: when deleting, always make sure we deleted 1 message.
Art Cancro [Sun, 27 Aug 2023 00:29:07 +0000 (20:29 -0400)]
loadtest.c: when deleting, always make sure we deleted 1 message.

If there are multiple loadtest processes running -- and that's really
the whole idea -- we will often try to delete a message that was already
deleted by another process.  That's not an error condition, but it would
cause posts to outnumber deletes and the rooms would grow endlessly.  So
if we didn't successfully delete something, we go back and try deleting
another one.

Fun fact: the algorithm used to decide which message to delete is the same
algorithm used in the 'fortune' program.

8 months agoloadtest.c: added
Art Cancro [Sun, 27 Aug 2023 00:09:59 +0000 (20:09 -0400)]
loadtest.c: added

8 months agoberkeley_db.c: improvements to transactional data store
Art Cancro [Sat, 26 Aug 2023 23:19:54 +0000 (19:19 -0400)]
berkeley_db.c: improvements to transactional data store

https://docs.oracle.com/cd/E17276_01/html/programmer_reference/transapp_env_open.html

The use of the DB_RECOVER flag to dbenv->open() appears to do more than just try to
recover the environment upon startup.  It also creates __db.00X files, which are
perhaps holding the environment???   In any case it seems to be more solid this way.
I am also removing the use of any "private" transactions, since they are no longer
needed.  Operations which write to the database check to see if the thread's dedicated
transaction pointer is in effect, maintaining that transaction if it is, and creating
a transaction in the same pointer otherwise.

There is a "double free" bug somewhere in here and I'm still trying to figure out what
conditions cause it to happen.

8 months agomaster_cleanup() is now the global shutdown/exit function
Art Cancro [Fri, 25 Aug 2023 21:08:53 +0000 (12:08 -0900)]
master_cleanup() is now the global shutdown/exit function