| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
lissine)
The username field of roster invites is the username of the inviter. It is not
possible for a roster invite to restrict the registration username.
|
|
|
|
|
|
|
|
|
|
| |
Queries with start > last item would return one item, because there's
some boundary condition in binary_search().
This is here fixed by always applying filters that omit items outside
the requested range.
See also 2374c7665d0b
|
|
|
|
| |
Otherwise it warns about it being missing, even if it exists.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes two problems:
1) Account invites that were created with a specific username were not
in fact restricted to that username.
2) Password reset invites were not restricted to resetting passwords,
but could be used to create an arbitrary new account if the client
or registration frontend (e.g. mod_invites_register_web) doesn't
handle/enforce the username.
This new validation ensures that registrations and resets are always for the
username specified in the invitation.
|
|
|
|
| |
Make `make lint` happy again
|
|
|
|
|
|
|
|
|
|
| |
Somehow a user ended up with duplicate data preventing creation of the
new unique index needed for UPSERT (see 3ec48555b773).
This should eventually self-heal #1918 if the duplicate data is replaced
by the older DELETE + INSERT method.
Without any index at all, it will be slower.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This fixes the problem that an un-bracketed IPv6 address will not match
the first pattern (since it matches brackets) and instead the first
decimal digits will match the pattern meant to strip port numbers from
IPv4 addresses, e.g. 2001:db8::1 --> 2000
This pattern instead matches enough of a regular IPv4 address to make an
IPv6 address fall back to the last case.
|
|
|
|
|
|
|
| |
This is meant as a way to diagnose e.g. issues creating indices.
It would have been nice to capture e.g. PostgreSQL notices, but LuaDBI
would need support for this first, see https://github.com/mwild1/luadbi/issues/62
|
|
|
|
|
|
|
| |
This should ensure that e.g. failure to load LuaSQLite3 is not logged
unless it is needed, since module failures are very verbose.
Closes #1919
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Enabling at least one of the ssl.verifyext modes enables a callback that
collects all the errors, which are used by mod_s2s to report better
problem descriptions.
|
|
|
|
|
|
| |
Setting ssl.verifyext enables a callback that collects all errors from
every layer of the certificate chain. Otherwise a single string is
returned, which we did not handle before.
|
|
|
|
| |
https://github.com/openssl/openssl/commit/ade08735f9d0ac85d611c5abee8a1df651bbca13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(fixes #1916) (thanks Damian, Zash)
Various options in Prosody allow control over the behaviour of the certificate
verification process For example, some deployments choose to allow falling
back to traditional "dialback" authentication (XEP-0220), while others verify
via DANE, hard-coded fingerprints, or other custom plugins.
Implementing this flexibility requires us to override OpenSSL's default
certificate verification, to allow Prosody to verify the certificate itself,
apply custom policies and make decisions based on the outcome.
To enable our custom logic, we have to suppress OpenSSL's default behaviour of
aborting the connection with a TLS alert message. With LuaSec, this can be
achieved by using the verifyext "lsec_continue" flag.
We also need to use the lsec_ignore_purpose flag, because XMPP s2s uses server
certificates as "client" certificates (for mutual TLS verification in outgoing
s2s connections).
Commit 99d2100d2918 moved these settings out of the defaults and into mod_s2s,
because we only really need these changes for s2s, and they should be opt-in,
rather than automatically applied to all TLS services we offer.
That commit was incomplete, because it only added the flags for incoming
direct TLS connections. StartTLS connections are handled by mod_tls, which was
not applying the lsec_* flags. It previously worked because they were already
in the defaults.
This resulted in incoming s2s connections with "invalid" certificates being
aborted early by OpenSSL, even if settings such as `s2s_secure_auth = false`
or DANE were present in the config.
Outgoing s2s connections inherit verify "none" from the defaults, which means
OpenSSL will receive the cert but will not terminate the connection when it is
deemed invalid. This means we don't need lsec_continue there, and we also
don't need lsec_ignore_purpose (because the remote peer is a "server").
Wondering why we can't just use verify "none" for incoming s2s? It's because
in that mode, OpenSSL won't request a certificate from the peer for incoming
connections. Setting verify "peer" is how you ask OpenSSL to request a
certificate from the client, but also what triggers its built-in verification.
|
|
|
|
|
| |
Prevent attempt to load rosters on Components since they do not have
users or rosters.
|
|
|
|
| |
entered (fixes #1907)
|
| |
|
| |
|
|
|
|
| |
Fail fast. Otherwise it sends the whole file.
|
|
|
|
| |
See #1914
|
|
|
|
|
| |
Deleting one index should be safe enough to do without requiring a
explicitly upgrading during downtime. People had trouble with this.
|
|
|
|
| |
Off-by-one in autoindent after `if not success then` since 3ec48555b773
|
|
|
|
|
| |
This should pass back the error message as well as the status code to
the client.
|
| |
|
|
|
|
|
|
|
|
| |
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!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This matches what we use for SQL already, so provides some consistency.
Client developers prefer sortable ids.
|
|
|
|
| |
(thanks moreroid)
|
| |
|
|
|
|
|
|
| |
It blocked loading on VirtualHosts since it was already loaded globally
Thanks eTaurus
|
|
|
|
|
|
| |
The WIP groups support is not complete yet, and won't work without extra
modules (which are not yet a part of Prosody). For now we hide --group support
unless mod_invites_groups (community module) is specified in modules_enabled.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
server-side, with argparse support
This allow a shell-command to provide a 'flags' field, which will automatically
cause the parameters to be fed through argparse.
The rationale is to make it easier for more complex commands to be invoked
from the command line (`prosodyctl shell foo bar ...`). Until now they were
limited to accepting a list of strings, and any complex argument processing
was non-standard and awkward to implement.
|
|
|
|
|
|
|
| |
This made it ignore `--group` completely, but if you incorrectly used
`--group foo` it would store `groups=true`.
Introduced in 9ba11ef91ce4
|
| |
|
|
|
|
|
|
|
| |
Changes from community version:
- Add options to allow explicit control over whether BOSH/WS is advertised
- Always serve XML at /host-meta (no guessing based on Accept), least surprising
|
| |
|
|
|
|
|
| |
These two settings are only really needed for XMPP server-to-server
connections.
|
| |
|
|
|
|
| |
Revert with muc_hats_compat = true in the config if necessary.
|