aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* mod_muc_mam: Copy "include total" behavior from mod_mamKim Alvefur2023-01-211-1/+5
| | | | | Not sure why this was missing from MUC MAM, it already had some of the code for dealing with it.
* mod_muc_mam: Add mam#extended form fields #1796 (Thanks Rain)Kim Alvefur2023-01-211-0/+10
| | | | Oversight in cabb022f31c0
* mod_mam,mod_muc_mam: Minimize differences (reorder, copy some comments)Kim Alvefur2023-01-212-8/+11
| | | | | Should have no functional difference, but makes it easier keeping mod_mam and mod_muc_mam in sync.
* mod_smacks: Log something when hibernation startsKim Alvefur2023-01-191-0/+1
| | | | | Will hopefully save future confusion about sessions being destroyed when they are in fact not.
* prosodyctl check dns: Check for Direct TLS SRV records even if not ↵Kim Alvefur2023-01-141-4/+8
| | | | | | | configured (fix #1793) Existing such records may cause timeouts or errors in clients and servers trying to connect, despite prosodyctl check saying all is well
* mod_invites: Prefer landing page over xmpp URI in shell commandKim Alvefur2023-01-101-2/+2
| | | | To mirror behavior of prosodyctl invocation
* net.http.server: Fix #1789Kim Alvefur2023-01-081-1/+1
| | | | | | | | | Unregistering the response before sending the trailer of the chunked transfer encoding prevents opportunistic writes from being invoked and running this code again when, which may cause an error when closing the file handle a second time. Normally the file size is known, so no chuck headers are sent.
* mod_storage_sql: Fix #1639Kim Alvefur2023-01-011-14/+12
| | | | Patch by Peter Kieser
* configure: Fix quoting of $LUA_SUFFIX (thanks shellcheck/Zash)Matthew Wild2022-12-291-1/+1
| | | | Transplanted 6b43bf85032b from trunk
* mod_storage_sql: Don't avoid initialization under prosodyctl (fix #1787)Kim Alvefur2022-12-291-1/+0
| | | | | | | | | Fixes `prosodyctl adduser` etc. Prior to d580e6a57cbb the line did nothing. Sometimes storage in the prosodyctl context does cause weirdness, as it is not in a host context, but rather a variant of global.
* Tag 0.12.2Kim Alvefur2022-12-120-0/+0
|
* Merge 0.11->0.120.12.2Kim Alvefur2022-12-121-1/+5
|\
| * Tag 0.11.14origin/0.110.11Kim Alvefur2022-12-120-0/+0
| |