| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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.
|
|
|
|
| |
Patch by Peter Kieser
|
|
|
|
| |
Transplanted 6b43bf85032b from trunk
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Allowed by XML despite arguably being a control character.
Drops the part of the range meant to rule out octets invalid in UTF-8
(\247 starts a 4-byte sequence), since UTF-8 correctness is validated by
util.encodings.utf8.valid().
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Since resumption is not supported on s2s currently, there is no point in
allocating resumption tokens. The code that removes entries from
session_registry is only invoked for c2s sessions, thus enabling
resumable smacks on s2s adds an entry that never goes away.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #1779.
Due to an oversight in the logic, if the user set 'enabled' to false in an
override, it would disable the item's requested CORS settings, but still apply
Prosody's default CORS policy.
This change ensures that 'enabled = false' will now disable CORS entirely for
the requested item.
Due to the new structure of the code, it was necessary to have a flag to say
whether CORS is to be applied at all. Rather than hard-coding 'true' here, I
chose to add a new option: 'http_default_cors_enabled'. This is a boolean that
allows the operator to disable Prosody's default CORS policy entirely (the one
that is used when a module or config does not override it). This makes it
easier to disable CORS and then selectively enable it only on services you
want it on.
|
| |
| |
| |
| | |
Similar to #1777
|
| | |
|
| |
| |
| |
| |
| | |
Fixes error in mod_authz_internal due to import() being unavailable as
it was only loaded in Prosody proper
|
| |
| |
| |
| |
| | |
Fixes test case type.json:0:1 covering treatment of 1.0 as an integer
according to the JSON definition
|
| |
| |
| |
| |
| | |
math.type() is unavailable before Lua 5.3 so this should use the compat
function added at the top
|
| |
| |
| |
| | |
Also touching on how arrays are indistinguishable from tables in Lua
|
| |
| |
| |
| | |
Full-URI references are not implemented
|
| |
| |
| |
| | |
Piped trough `sort -g`
|
| |
| |
| |
| |
| | |
Due to a change in luassert, a dependency luassert of the Busted test
framework, returning nothing is no longer treated as not falsy.
|
| |
| |
| |
| |
| | |
Fixes the same kind of issue as in 65563530375b but once and for all,
while improving similarity between incoming and outgoing connections.
|
| |
| |
| |
| |
| |
| |
| | |
user:roles() does not convey that this is the mutating command, it
should have been called setroles from the start but wasn't due to lack
of foresight. This has to accidentally removing roles when wanting to
show them.
|