Kim Alvefur <zash@zash.se> [Wed, 12 May 2021 01:25:44 +0200] rev 13139
mod_storage_internal: Lazy-load archive items while iterating
Very large list files previously ran into limits of the Lua parser, or
just caused Prosody to freeze while parsing.
Using the new index we can parse individual items one at a time. This
probably won't reduce overall CPU usage, probably the opposite, but it
will reduce the number of items in memory at once and allow collection
of items after we iterated past them.
Kim Alvefur <zash@zash.se> [Tue, 11 May 2021 02:09:56 +0200] rev 13138
util.datamanager: Add O(1) list indexing with on-disk index
Index file contains offsets and lengths of each item() which allows
seeking directly to each item and reading it without parsing the entire
file.
Also allows tricks like binary search, assuming items have some defined
order.
We take advantage of the 1-based indexing in tables to store a magic
header in the 0 position, so that table index 1 ends up at file index 1.
Kim Alvefur <zash@zash.se> [Tue, 11 May 2021 02:04:59 +0200] rev 13137
storagemanager tests: Reorder test data in chronological order
Why was the test data not in chronological order?
Altho, maybe that was the point? Except for MAM, the data might *not* be
in chronological order!
Kim Alvefur <zash@zash.se> [Fri, 09 Jun 2023 17:38:46 +0200] rev 13136
mod_admin_shell: Use new serialize preset to simplify default config
Two pairs replaced by one. Blame lua-format for the line diff delta.
Kim Alvefur <zash@zash.se> [Fri, 09 Jun 2023 17:26:38 +0200] rev 13135
util.serialization: Add a "pretty" preset
This is the config I want 90% of the time when just showing data in the
console or so.
Kim Alvefur <zash@zash.se> [Wed, 07 Jun 2023 16:56:53 +0200] rev 13134
doc/hgrc-email: Example config for using 'hg email' to contribute
The initial setup can be tricky if you don't know what and were settings
should be added.
This should maybe also go into site/doc/contributing
Kim Alvefur <zash@zash.se> [Wed, 07 Jun 2023 16:42:59 +0200] rev 13133
doc/hgrc: Some useful Mercurial settings
Some useful settings that might benefit new contributors and get them up
to speed with Modern Mercurialâ„¢ faster :)
Kim Alvefur <zash@zash.se> [Tue, 06 Jun 2023 22:00:54 +0200] rev 13132
mod_admin_shell: Warn when (un-)loading module would be undone by restart
Reminder to update the configuration if the change is to be permanent.
Kim Alvefur <zash@zash.se> [Sat, 03 Jun 2023 21:53:20 +0200] rev 13131
mod_http: Make RFC 7239 Forwarded opt-in for now to be safe
Supporting both methods at the same time may open to spoofing attacks,
whereby a client sends a Forwarded header that is not stripped by a
reverse proxy, leading Prosody to use that instead of the X-Forwarded-*
headers actually sent by the proxy.
By only supporting one at a time, it can be configured to match what the
proxy uses.
Disabled by default since implementations are sparse and X-Forwarded-*
are everywhere.
Kim Alvefur <zash@zash.se> [Sat, 03 Jun 2023 17:10:04 +0200] rev 13130
mod_http: Use RFC 7239 Forwarded header to find original client IP
Prefer over X-Forwarded-* since it has an actual specification.
Main practical difference is that Forwarded may carry more properties
than only the IP address since it is a structured header.
Since we parse it into an array, it is easier to do the logical thing
and iterate backwards trough proxies until an untrusted one is
encountered. Compare the handling of X-Forwarded-For.
The 'secure' field now accounts for the full chain of proxies, which
must be secure all the way to be considered secure.