Kim Alvefur <zash@zash.se> [Sat, 11 Dec 2021 20:40:23 +0100] rev 12039
util.format: Fix Lua 5.1 quirks thanks to ALL THE TESTS
Kim Alvefur <zash@zash.se> [Sat, 11 Dec 2021 20:38:54 +0100] rev 12038
util.format: ALL THE TESTS!!!
The more tests I made, the more Lua 5.1 quirks I discovered.
Tests generated using a tool plus some touch-up.
Kim Alvefur <zash@zash.se> [Sat, 11 Dec 2021 13:39:58 +0100] rev 12037
util.format: Also handle the %p format added in Lua 5.4
Kim Alvefur <zash@zash.se> [Sat, 11 Dec 2021 13:30:34 +0100] rev 12036
util.format: Ensure sanitation of strings passed to wrong format
Ie. log("debug", "%d", "\1\2\3") should not result in garbage.
Also optimizing for the common case of ASCII string passed to %s and
early returns everywhere.
Returning nil from a gsub callback keeps the original substring.
Kim Alvefur <zash@zash.se> [Fri, 10 Dec 2021 22:48:45 +0100] rev 12035
util.format: Escape invalid UTF-8 by passing trough serialization
Should prevent invalid UTF-8 from making it into the logs, which can
cause trouble with terminals or log viewers or other tools, such as when
grep determines that log files are binary.
Kim Alvefur <zash@zash.se> [Fri, 10 Dec 2021 22:25:34 +0100] rev 12034
mod_mam: Avoid storing bounces for messages from the bare account (thanks Ge0rG)
This should rule out error replies to PEP notifications, which come from
the account bare JID, and would be reflected back to it if they can't be
delivered for some reason, e.g. s2s problems.
Kim Alvefur <zash@zash.se> [Wed, 08 Dec 2021 21:55:25 +0100] rev 12033
MUC: Remove <{muc}x> tags in some errors
Including the payload of the stanza that caused the error is optional
and we're generally not doing it anywhere else.
Kim Alvefur <zash@zash.se> [Wed, 08 Dec 2021 21:06:16 +0100] rev 12032
MUC: Fix error origin JID in wrong argument position
Mistake introduced in cbe524ed1a6a. Removing because this is a query to
the bare JID where the error origin matches the resulting stanza 'from'.
Kim Alvefur <zash@zash.se> [Wed, 08 Dec 2021 21:02:14 +0100] rev 12031
MUC: Remove remaining deprecated numeric error codes
The numeric error codes seems to have been removed from the examples in
XEP-0045 version 1.24, and were deprecated even by RFC 3920 in 2004,
only allowed for backwards compatibility.
Kim Alvefur <zash@zash.se> [Wed, 08 Dec 2021 16:40:51 +0100] rev 12030
MUC: Return a friendly textual error when trying to speak without voice
I spend several minutes confused over where the bug was until I
remembered I had set myself as visitor in the previous debug session.
This would have helped.