| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This ensures that domain names of virtual hosts and components are valid in
XMPP, and that they are encoded correctly.
|
|
|
|
| |
Fixes error in #1765 by throwing an error earlier
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This case would eventually be rejected by the buffer size limit.
|
|
|
|
| |
A typo should not result in ending up with "legacy"
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
The code would have suggested adding to modules_enabled instead of
modules_disabled
|
|
|
|
| |
Backport of ffe4adbd2af9 since new was added in the 0.12 branch
|
| |
|
|
|
|
| |
Should detect things like misplaced settings inside modules_enabled
|
|
|
|
|
|
| |
The module API has certain coercion features that are useful.
Fixes traceback reported in #1812 and other duplicates
|
|
|
|
| |
Ref https://github.com/mozilla/server-side-tls/issues/285
|
|
|
|
| |
Fixes use in PEP where the JID does not equal the bare domain.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
For consistency with other utils.
Consistency is good.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This timer shouldn't kick in in the middle of active mode.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Looks like autocomplete unhelpfully capitalized this word, but it's
lowercase where it is set in mod_s2s_auth_certs
|
|
|
|
| |
This broke if the error message contained a format specified such as '%s'.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Unsure exactly how this happens, but sometimes a watchdog appears to
close a session that isn't hibernating, or hasn't hibernating long
enough.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
If it reaches this point, then the session will be most definitely be
destroyed, so try to prevent destroy_session() from being called again.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Not sure why this was missing from MUC MAM, it already had some of the
code for dealing with it.
|
|
|
|
| |
Oversight in cabb022f31c0
|
|
|
|
|
| |
Should have no functional difference, but makes it easier keeping
mod_mam and mod_muc_mam in sync.
|
|
|
|
|
| |
Will hopefully save future confusion about sessions being destroyed when
they are in fact not.
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
To mirror behavior of prosodyctl invocation
|
|
|
|
|
|
|
|
|
| |
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.
|