Commit graph

13791 commits

Author SHA1 Message Date
Kim Alvefur
3d5416fa91 Merge 13.0->trunk 2025-03-23 20:19:09 +01:00
Kim Alvefur
be51e54c68 doap: Add XEP-0333 2025-03-23 19:59:45 +01:00
Kim Alvefur
780b392d25 doap: Add XEP-0334 2025-03-23 19:57:06 +01:00
Kim Alvefur
4068c28023 doap: Add XEP-0156 and mod_http_altconnect 2025-03-23 19:47:34 +01:00
Kim Alvefur
d3899c1e16 Merge 13.0->trunk 2025-03-23 17:24:49 +01:00
Kim Alvefur
faed304d55 mod_http_file_share: Explicitly reject all unsupported ranges
Fail fast. Otherwise it sends the whole file.
2025-03-23 12:36:47 +01:00
Kim Alvefur
afd99708d6 mod_http_file_share: Fix off by one in Range response
See #1914
2025-03-23 12:21:19 +01:00
Kim Alvefur
b9d4cc24df mod_storage_sql: Drop legacy index without confirmation to ease upgrades
Deleting one index should be safe enough to do without requiring a
explicitly upgrading during downtime. People had trouble with this.
2025-03-23 12:15:16 +01:00
Kim Alvefur
244220453d Merge 13.0->trunk 2025-03-22 11:56:23 +01:00
Kim Alvefur
6959547703 core.usermanager: Fix COMPAT layer for legacy is_admin() function
Thanks ctrlaltca

Fixes #1912
2025-03-22 11:53:15 +01:00
Kim Alvefur
0ed2d38edf core.storagemanager: Fix tests by removing an assert that upset luarocks
Not sure why but this assert() caused a stack overflow in luarocks
2025-03-19 16:15:52 +01:00
Kim Alvefur
eacf72504c mod_storage_sql: Fix indentation
Off-by-one in autoindent after `if not success then` since 3ec48555b773
2025-03-19 16:13:32 +01:00
Matthew Wild
8a4d96bb71 Merge 13.0->trunk 2025-03-17 16:49:22 +00:00
Matthew Wild
3d74ce8584 prosodyctl check: Be more robust against invalid disco_items, and show warning 2025-03-17 16:48:39 +00:00
Kim Alvefur
8bcd4f6807 Merge 13.0->trunk 2025-03-17 15:23:50 +01:00
Kim Alvefur
780fd208bc mod_http_file_share: Improve error reporting by using util.error more
This should pass back the error message as well as the status code to
the client.
2025-03-16 15:20:45 +01:00
Matthew Wild
614ca69407 Merge 13.0->trunk 2025-03-13 13:11:57 +00:00
Matthew Wild
6bf45cacf9 Added tag 13.0.0 for changeset a8ad0741632d 2025-03-13 13:11:22 +00:00
Matthew Wild
421afd79f4 CHANGES: 13.0.0 release date 2025-03-13 13:11:05 +00:00
Matthew Wild
287349f2eb CHANGES: Fix 13.0.0 version number 2025-03-13 13:10:22 +00:00
Matthew Wild
77fb638f4d Merge 13.0->trunk 2025-03-13 11:41:32 +00:00
Matthew Wild
57d168dd5e prosodyctl shell: More reliable detection of REPL/interactive mode (fixes #1895) 2025-03-13 11:37:11 +00:00
Matthew Wild
384e3dbea2 mod_admin_shell: Remove outdated help text (fixes #1898)
The ! commands have been broken for some time, and we're not going to
implement them right now. If we want fancier editing, we can now do that on
the client side (with readline and stuff).

Also removes mention of telnet!
2025-03-13 11:35:39 +00:00
Matthew Wild
04bd8258ef prosodyctl check features: Report size limit for HTTP upload
This also adds a generic "meta" mechanism where checks can return annotations.
2025-03-13 11:33:08 +00:00
Matthew Wild
9f50add34e prosodyctl check features: Add descriptions to features
Also shuffles mod_pep check to multi-device sync, as I think that's a better
fit.
2025-03-13 11:32:22 +00:00
Matthew Wild
74970e2815 Merge 13.0->trunk 2025-03-11 18:45:23 +00:00
Matthew Wild
8005ac825f mod_websocket: Merge session close handling changes from mod_c2s (bug fixes)
This should bring some fixes and general robustness that mod_websocket had
missed out on. The duplicated code here is not at all ideal. To prevent this
happening again, we should figure out how to have the common logic in a single
place, while still being able to do the websocket-specific parts that we need.

The main known bug that this fixes is that it's possible for a session to get
into a non-destroyable state. For example, if we try to session:close() a
hibernating session, then session.conn is nil and the function will simply
return without doing anything. In the mod_c2s code we already handle this, and
just destroy the session. But if a hibernating websocket session is never
resumed or becomes non-resumable, it will become immortal!

By merging the fix from mod_c2s, the session should now be correctly
destroyed.
2025-03-11 18:44:40 +00:00
Matthew Wild
5b4624137d mod_c2s: Code formatting change
Although we do sometimes use single-line if blocks, I'm expanding this one to
make it easier to compare with the duplicated (but modified) code in
mod_websocket that we plan to de-duplicate one day.
2025-03-11 18:37:16 +00:00
Matthew Wild
5b1d83614b CHANGES: Add list of new modules 2025-03-11 18:27:54 +00:00
Matthew Wild
06994f0bc1 util.argparse: Fix bug (regression?) in argument parsing with --foo=bar
After recent changes, '--foo bar' was working, but '--foo=bar' was not. The
test had a typo (?) (bar != baz) and because util.argparse is not strict by
default, the typo was not caught.

The typo caused the code to take a different path, and bypassed the buggy
handling of --foo=bar options.

I've preserved the existing test (typo and all!) because it's still an
interesting test, and ensures no unintended behaviour changes compared to the
old code.

However I've added a new variant of the test, with strict mode enabled and the
typo fixed. This test failed due to the bug, and this commit introduces a fix.
2025-03-11 18:27:36 +00:00
Matthew Wild
afb9bc34a0 mod_storage_internal: Use UUIDv7 for message ids
This matches what we use for SQL already, so provides some consistency.

Client developers prefer sortable ids.
2025-03-10 11:54:52 +00:00
Matthew Wild
e66265d65a usermanager: Add info logging for all usermanager account changes 2025-03-10 11:52:55 +00:00
Matthew Wild
53774a4234 Merge 13.0->trunk 2025-03-06 13:34:55 +00:00
Matthew Wild
86341e87d3 util.sasl: Preserve 'userdata' field between clones
The :clean_clone() method is designed to provide a new cloned SASL handler,
to be used when starting a fresh SASL negotiation on an existing connection.

The userdata field is currently populated by mod_saslauth with the "read-only"
information that the channel binding methods need to do their stuff.

When :clean_clone() does not preserve this, it causes tracebacks in the cb
profile handlers due to the property being nil.

This does mean that SASL handlers should now not be reused (even when cloned)
across different connections, if they ever could.
2025-03-06 13:34:37 +00:00
Matthew Wild
9f9cc1ea09 Merge 13.0->trunk 2025-03-01 16:19:58 +00:00
Matthew Wild
830f3e122c mod_external_services: Also use TURN REST credential algo for 'turns' (thanks moreroid) 2025-03-01 16:19:43 +00:00
Kim Alvefur
08e6a1455b Merge 13.0->trunk 2025-02-27 21:38:00 +01:00
Kim Alvefur
c769eae82b net.server_epoll: Improve readability of DANE noise
Serialized Lua is not the most readable form of TLSA records.
2025-02-27 21:36:43 +01:00
Matthew Wild
7bf3a56ec6 Merge 13.0->trunk 2025-02-24 17:49:55 +00:00
Matthew Wild
faf20e5dc9 certmanager: Add more debug logging around cert indexing
Currently it's not obvious which directories have been indexed (especially
when the resulting index is empty), or why certain files have been skipped.
2025-02-24 17:48:58 +00:00
Kim Alvefur
70ee43995c Merge 13.0->trunk 2025-02-22 21:49:59 +01:00
Kim Alvefur
e52cc0126d mod_component: Don't return error reply for errors, fixes #1897 2025-02-22 21:48:07 +01:00
Kim Alvefur
68296b6a8e mod_bosh,mod_websocket: Don't load mod_http_altconnect in global context
It blocked loading on VirtualHosts since it was already loaded globally

Thanks eTaurus
2025-02-22 21:45:34 +01:00
Matthew Wild
4537e07daa Merge 13.0->trunk 2025-02-22 09:41:29 +00:00
Matthew Wild
783c8fcc81 prosodyctl: check features: stop searching after finding a matching component 2025-02-22 09:35:04 +00:00
Kim Alvefur
263b7e1e16 Merge 13.0->trunk 2025-02-22 00:26:35 +01:00
Kim Alvefur
6b1e056142 core.configmanager: Pass name and line number in context
Delays the string interpolation until the warning is logged, which may
slightly lower memory usage.

Allows retrieving the filename and line number easily.
2025-02-22 00:04:51 +01:00
Kim Alvefur
5e41daac79 core.configmanager: Fix reporting delayed warnings from global section
A Credential in the global section would be stored at
delayed_warnings["*/secret"], but get("example.com","secret") would look
for delayed_warnings["example.com/secret"]

Storing the warnings in the config itself has the unfortunate
side-effect that the config now contains util.error objects, which may
be awkward if something bypasses get(). Should rawget() also do this
filtering? getconfig() too?

Currently this only affects prosodyctl, so maybe it won't be much of a
problem.
2025-02-22 00:08:18 +01:00
Kim Alvefur
9eedb15c6f core.configmanager: Remove dependency on 'prosody' global for Credential
Minimizing dependencies on global state is nice, as it makes using
configmanager outside of Prosody easier.
2025-02-22 00:00:41 +01:00
Matthew Wild
bde377c10a Merge 13.0->trunk 2025-02-17 23:06:26 +00:00