aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mod_admin_adhoc: Fix log messages for reloading modules.origin/0.120.12Aidan Epstein2024-09-291-10/+10
| | | | Also rename for loop item so that it doesn't shadow module variable.
* mod_invites: Fix traceback when token_info isn’t setEmmanuel Gil Peyrot2024-07-311-1/+1
|
* util.prosodyctl.cert: Ensure old cert is moved out of the wayKim Alvefur2024-08-301-1/+1
| | | | This should make it visible if the move fails
* core.moduleapi: Default labels to empty list to fix error if omittedKim Alvefur2024-08-181-0/+1
| | | | | In a host-scoped module in the `if is_scoped` clause the resulting `array:append(nil)` call throws.
* net.http: Throw error if missing TLS context for HTTPS requestKim Alvefur2024-08-081-0/+3
| | | | | | | Prevents the mistake of creating a http context without any TLS context and then trying to use HTTPS, which doesn't work right. Thanks nils
* util.xtemplate: Fix error on applying each() to zero stanzasKim Alvefur2024-07-112-2/+6
| | | | Backport of 1f93e4f78c53
* net.server_event: Add 'wrapserver' APIKim Alvefur2024-07-071-1/+16
| | | | | | | | | This enables accepting admin stream socket (UNIX) connections trough the same procedures as any other (TCP) socket, which avoids problems caused by using the wrapclient API, which ends up discarding early data due to only expecting early connection failure. Fixes #1867
* scansion: Enable blocklist compat during tests to fix CIKim Alvefur2024-06-121-0/+2
|
* mod_admin_shell: Allow matching on host or bare JID in c2s:showKim Alvefur2023-03-311-2/+2
| | | | | | | | | Only supporting exact match on full JID isn't helpful if you want to list sessions per host or user. Backport of 430333198e4c Fixes #1857
* mod_blocklist: Drop blocked messages without error, option to restore ↵Kim Alvefur2024-04-271-2/+7
| | | | | | | | | | | | compliant behavior From XEP-0191: > For message stanzas, the server SHOULD return an error, which SHOULD > be <service-unavailable/>. Following this may leak to a blocked JID that they have been blocked, which seems contrary to the goal of pretending to be perpetually offline.
* mod_invites_adhoc: Fix result form type (thanks betarays)Kim Alvefur2024-04-041-2/+2
|
* prosodyctl check: Warn about invalid domain names in the config fileMatthew Wild2024-03-271-0/+51
| | | | | This ensures that domain names of virtual hosts and components are valid in XMPP, and that they are encoded correctly.
* net.http.files: Validate argument to setup functionKim Alvefur2024-02-271-1/+1
| | | | Fixes error in #1765 by throwing an error earlier
* mod_disco: Advertise disco#info and #items on bare JIDs to fix #1664Kim Alvefur2023-12-172-0/+30
| | | | | | | | Having to add these in *there* places seems less than ideal. I would also think that advertising disco#info is a bit redundant, since it is a requirement for everything in XMPP and if it was missing you would get an error back.
* net.http.parser: Reject overlarge header section earlierKim Alvefur2023-08-232-1/+34
| | | | This case would eventually be rejected by the buffer size limit.
* core.certmanager: Validate that 'tls_profile' is one of the valid valuesKim Alvefur2023-10-271-1/+4
| | | | A typo should not result in ending up with "legacy"
* mod_muc_mam: Improve wording of enable settingKim Alvefur2023-10-151-1/+1
| | | | | | | | Suggested by jstein in the chat This option label is used by XMPP clients to explain what the option does. a) The user should know where the data is archived. b) The user needs a statement that can be enabled/disabled by the variable. A question would have the wrong logic here.
* Added tag 0.12.4 for changeset a2ba3f06dcf4Kim Alvefur2023-09-050-0/+0
|
* util.prosodyctl.check: Correct modern replacement for 'disallow_s2s'0.12.4Kim Alvefur2023-08-271-1/+1
| | | | | The code would have suggested adding to modules_enabled instead of modules_disabled
* util.array: Fix new() library functionKim Alvefur2023-07-222-1/+10
| | | | Backport of ffe4adbd2af9 since new was added in the 0.12 branch
* util.prosodyctl.check: Hint about the 'external_addresses' config optionKim Alvefur2023-07-171-0/+5
|
* util.prosodyctl.check: Validate format of module list optionsKim Alvefur2023-07-171-0/+28
| | | | Should detect things like misplaced settings inside modules_enabled
* util.prosodyctl.check: Get some config options via minimal moduleapi #896Kim Alvefur2023-07-171-41/+54
| | | | | | The module API has certain coercion features that are useful. Fixes traceback reported in #1812 and other duplicates
* core.certmanager: Update Mozilla TLS config to version 5.7Kim Alvefur2023-07-091-1/+2
| | | | Ref https://github.com/mozilla/server-side-tls/issues/285
* mod_pubsub: Send correct jid attribute in disco#itemsKim Alvefur2023-07-081-1/+1
| | | | Fixes use in PEP where the JID does not equal the bare domain.
* mod_http: Fix error if 'access_control_allow_origins' is setKim Alvefur2023-06-101-1/+1
| | | | | | | | | | | Because it changes the type of the 'opt_origins' variable from util.set to the internal _items table so next time an http app is added an error "attempt to call a nil value (method 'empty')" is triggered. The value is not used anywhere else. Noticed when reviewing uses of the '_items' set property. Not reported by any users, implying this setting is rarely used.
* util.array: Expose new() on module tableKim Alvefur2023-06-101-0/+2
| | | | | | For consistency with other utils. Consistency is good.
* util.prosodyctl.check: Fix error where hostname can't be turned into A labelKim Alvefur2023-05-311-4/+5
| | | | | | | | | Where gethostname or tohostname returns an invalid name, e.g. containing underscores or something, to_ascii would reject this and return nil, which triggers an error in the dns lookup. Reported by prova2 in the chat, for whom tohostname returned a long name containing underscores.
* mod_s2s: Add event where resolver for s2sout can be tweakedKim Alvefur2022-08-182-0/+6
| | | | | | | | Could be used to implement custom connection methods (c.f. mod_onions) without needing to duplicate the rest of route_to_new_session(). Adds a feature to enable detection since it can be difficult to detect support for an event otherwise.
* mod_csi_simple: Disable revert-to-inactive timer when going to active modeKim Alvefur2023-05-011-0/+4
| | | | This timer shouldn't kick in in the middle of active mode.
* mod_csi_simple: Clear delayed active mode timer on disableKim Alvefur2023-05-011-0/+4
| | | | | | It should not be there afterwards. Noticed that it seems to fire some time after resumption claiming that the queue size is nil, implying that it may hold a reference to an expired session somehow.
* util.error: Fix error on conversion of invalid error stanza, fix #1805Kim Alvefur2023-04-191-1/+1
| | | | | | | | | Error stanzas should have an <error> element, but if you pass a stanza without one to util.error.from_stanza() it triggers an attempt to index a nil value, which this patch avoids. In the conditional, it should be safe to assume error_tag is non-nil since condition can't have those values then.
* mod_admin_shell: Fix display of remote cert status when expired etcKim Alvefur2023-04-061-1/+1
| | | | | Looks like autocomplete unhelpfully capitalized this word, but it's lowercase where it is set in mod_s2s_auth_certs
* prosodyctl: Fix using variable content in a format stringMatthew Wild2023-04-071-1/+1
| | | | This broke if the error message contained a format specified such as '%s'.
* mod_smacks: Replace existing watchdog when starting hibernationKim Alvefur2023-04-021-0/+4
| | | | | | There shouldn't be one here but if there is, for some reason, it's better to close it than have it around to wake up and possibly try to destroy the session.
* mod_smacks: Fix stray watchdog closing sessionsKim Alvefur2023-04-021-1/+6
| | | | | | Unsure exactly how this happens, but sometimes a watchdog appears to close a session that isn't hibernating, or hasn't hibernating long enough.
* mod_http: Unhook CORS handlers only if active (fixes #1801)Kim Alvefur2023-03-051-3/+7
|
* util.prosodyctl.check: Suggest 'http_cors_override' instead of older CORS ↵Kim Alvefur2023-02-221-2/+2
| | | | | | | | settings The cross_domain_* settings were added here prior to http_cors_override being added back in 17d87fb2312a, so for a time there was no replacement, but now there is.
* Added tag 0.12.3 for changeset 0598d822614fMatthew Wild2023-02-210-0/+0
|
* mod_websocket: Fire pre-session-close event (fixes #1800)0.12.3Matthew Wild2023-02-201-0/+3
| | | | | | | | | | | | | | | | This event was added in a7c183bb4e64 and is required to make mod_smacks know that a session was intentionally closed and shouldn't be hibernated (see fcea4d9e7502). Because this was missing from mod_websocket's session.close(), mod_smacks would always attempt to hibernate websocket sessions even if they closed cleanly. That mod_websocket has its own copy of session.close() is something to fix another day (probably not in the stable branch). So for now this commit makes the minimal change to get things working again. Thanks to Damian and the Jitsi team for reporting.
* net.http.parser: Fix off-by-one error in chunk parserMatthew Wild2023-02-172-5/+53
|
* mod_admin_socket: Return error on unhandled input to prevent apparent freezeKim Alvefur2023-02-162-1/+7
| | | | | | When mod_admin_socket is loaded without mod_admin_shell, attempt to use `prosodyctl shell` will appear to freeze after any input, since no response is returned.
* net.http.server: Add new API to get HTTP request from a connectionMatthew Wild2023-02-161-0/+4
| | | | | | | | | | | This information is sometimes necessary in the context where we have a connection that we know (or believe to be) associated with an incoming HTTP request. For example, it can be used to retrieve the IP address of a request (which may differ from the IP address of the connection, due to X-Forwarded-For and co). Thanks to the Jitsi team for highlighting this gap in the API.
* net.http.parser: Improve handling of responses without content-lengthMatthew Wild2023-02-092-9/+14
| | | | | | This ensures that we support responses without a content-length header, and allow streaming them through the streaming handler interface. An example of such a response would be Server-Sent Events streams.
* net.http: Add missing log parameterMatthew Wild2023-02-091-1/+1
|
* sessionmanager: Improve logging around session destructionMatthew Wild2023-02-091-3/+10
|
* core.sessionmanager: Mark session as destroyed to prevent reentryKim Alvefur2023-01-191-0/+1
| | | | | If it reaches this point, then the session will be most definitely be destroyed, so try to prevent destroy_session() from being called again.
* core.sessionmanager: Skip log when (not) destroying destroyed sessionsKim Alvefur2023-01-191-2/+1
| | | | | | | | | On regular disconnects, </stream> is sent, then sessionmanager.destroy_session() is called, then sessionmanager.destroy_session() is called again when the TCP connection is closed, from ondisconnect in mod_c2s. It is a bit annoying and doesn't really tell you much.
* util.startup: Close state on exit to ensure GC finalizers are calledKim Alvefur2023-01-222-5/+5
| | | | | | | | | | | | | Ensures a last round of garbage collection and that finalizers are called. Fixes things like proper closing of SQLite3 state. There are more calls to os.exit() but most of them exit with an error or in a case where a final GC sweep might not matter as much. It would be nice if this was the default. Calling util.statup.exit() everywhere may be sensible, but would be more involved, requiring imports everywhere.
* util.prosodyctl.shell: Close state on exit to fix saving shell historyKim Alvefur2023-01-221-2/+2
| | | | | | | | | | | | | | | | | | This ensures a last round of garbage collection and finalizers, which should include flushing the readline history file. Test procedure: ``` $ ./prosodyctl shell prosody> s2s:show() -- any command that is not the last in history ... output prosody> bye $ ./prosodyctl shell prosody> ^P ``` After this, the shell prompt should contain the last command from before the "bye". Before this patch, recent history is gone most of the time.