Kim Alvefur
0ec577b5df
mod_saslauth: Collect SASL EXTERNAL failures into an util.error object
...
Will be easier than that concatenated string to extract info out of for
use elsewhere.
7 years ago
Kim Alvefur
01aea4e5d2
net.server_epoll: Add debug logging for delayed reading
...
In :onreadable, if there is still buffered incoming data after reading
from the socket (as indicated by the :dirty method, usually because
LuaSocket has an 8k buffer that's full but it read a smaller amount),
another attempt to read is scheduled via this :pausefor method. This is
also called from some other places where it would be pointless to read
because there shouldn't be any data.
In the delayed read case, this should report that the socket is "dirty".
If it reports that the socket is "clean" then the question is where
the buffer contents went?
If this doesn't get logged after the scheduled time (0.000001s by
default) then this would suggests a problem with timer or scheduling.
7 years ago
Kim Alvefur
9c4ff0b712
net.connect: Mention RFC 6724 regression
...
Default Address Selection algorithm is not applied, resulting in a
strong bias towards IPv4.
7 years ago
Kim Alvefur
02fcdb63ef
net.connect: Add some TODOs and FIXMEs
...
And mention issue numbers: #1246 , #1428 and #1429
7 years ago
Kim Alvefur
ee33732c5f
mod_s2s: Invert condition to return early and reduce indentation
7 years ago
Kim Alvefur
129b463d81
mod_s2s: Fix mistake in 28755107c2f4
7 years ago
Kim Alvefur
947c10c689
mod_saslauth: Advertise correct set of mechanisms
...
Mistakenly iterates over the set of all supported mechanisms instead of
the one without insecure mechanisms if the connection is insecure.
Not a problem if c2s_require_encryption is true
Introduced in 56a0f68b7797
7 years ago
Emmanuel Gil Peyrot
83a7665a0e
util.*.c: Add static qualifiers everywhere
7 years ago
Emmanuel Gil Peyrot
52ab88e51e
util.encodings: Remove redundant cast
7 years ago
Emmanuel Gil Peyrot
af6462aa3a
util.encodings: Don?t export unneeded symbols
...
This reduces the binary size from 22704?B to 18592?B.
7 years ago
Kim Alvefur
190a2a2cab
mod_s2s: Refactor stream error handling on close
...
Deduplicates the 3 log calls that log the same thing but subtly
differently. The first one would say "Disconnecting localhost" and the
last one didn't log the IP.
7 years ago
Kim Alvefur
a5d6f3717a
mod_s2s: Use stanza type check instead of duck typing
7 years ago
Kim Alvefur
ae49a4500f
mod_net_multiplex: Remove debug message
...
This was something I added during development and set to info level for
visibility.
7 years ago
Kim Alvefur
376d6bf4f3
net.server_select: Remove prefix added to TLS handshaker errors
...
For consistency. None of the other implementations do this.
7 years ago
Kim Alvefur
7f02081af2
mod_s2s: Improve TLS handshake error messages
...
This should make it clearer that it's about the TLS handshake. Otherwise
it's something like "unsupported protocol" or "no shared ciphers" that
might not be that obvious.
7 years ago
Kim Alvefur
78a340ccf7
mod_s2s: Log from session logger
...
Helps locating all messages related to a specific session
7 years ago
Kim Alvefur
6494446456
mod_s2s: Improve log message about forbidding insecure connections
...
This new wording generator is nice.
7 years ago
Kim Alvefur
07645554cc
mod_admin_telnet: Sort hosts
...
Groups by domain in DNS hierarchy order or something.
Why not split on '.' you ask? Well becasue that's not what I typed here. Also "[^.]" is longer than "%P".
7 years ago
Kim Alvefur
5aee95c57c
mod_carbons: Improve performance by delaying creation of carbon payload
...
If there are no other sessions which also enabled carbons then the
carbons wrapper is not used and the potentially expensive clone
operation was a waste of cycles.
7 years ago
Kim Alvefur
d1420d641f
core.portmanager: Complete error message for SNI TLS context problems
7 years ago
Kim Alvefur
4a4e62688b
tests: Disable s2s in scansion tests
...
These are all c2s tests, no need to have s2s enabled.
7 years ago
Kim Alvefur
a577a981ee
mod_net_multiplex: Tweak debug logging for ALPN case
7 years ago
Kim Alvefur
349ac37e3c
mod_net_multiplex: Add support for using ALPN
...
Potentially a bit more efficient since it can jump to the selected
protocol on connect instead of waiting for some data to look at.
Adds a 'protocol' field to net providers for this purpose.
7 years ago
Kim Alvefur
e0a077e53b
net.http: Set ALPN on requests
...
Shouldn't hurt. Revert if it turns out it does.
Supported in LuaSec 0.8. Should be ignored otherwise.
7 years ago
Kim Alvefur
b1338d27ac
core.portmanager: Fix TLS context inheritance for SNI hosts (completes SNI support)
7 years ago
Kim Alvefur
af05495fa2
core.portmanager: Don't set the first TLS context with a cert as main context
...
Don't think this works and it's apparently acceptable to require SNI these days.
7 years ago
Kim Alvefur
2d7eada577
mod_admin_telnet: Display ALPN in show_tls() if supported and available
7 years ago
Kim Alvefur
83f9904a48
mod_http: Log served URLs at 'info' level
...
These are similar to the "activated service" messages from portmanager
and similarily useful for the service admin to know even if they're not
debugging anything.
7 years ago
Kim Alvefur
36483b12ca
mod_s2s: Prevent unhandled stanza handler from complaining about stream features on aborted connections
...
I have no idea why I wrote return false in e5945fb5b71f
7 years ago
Kim Alvefur
2de1ed7ca2
mod_s2s_bidi: Ignore unencrypted connections if s2s_require_encryption is set
...
Prevents some weirdness in cases where no authentication is done
7 years ago
Kim Alvefur
ebfbcab1a9
mod_s2s: Abort outgoing connections earlier when TLS requirement isn't satisfied
...
This ensures the closure reason is accurate and not reported as an
authentication or other problem
7 years ago
Kim Alvefur
4560212e9b
mod_s2s: Send stream errors for cert problems on outgoing connections
...
Rationale in comment.
7 years ago
Kim Alvefur
07e3b93181
mod_s2s: Improve error in bounces due to cert validation problems
7 years ago
Kim Alvefur
838f903396
mod_s2s_auth_certs: Save chain validation errors for later use
7 years ago
Matthew Wild
3dea196a53
net.websocket: Fix traceback in case of ondisconnect being called twice
...
We want to figure out what situations the double ondisconnect happens in, and
aim to fix the root cause in the future.
7 years ago
Kim Alvefur
a98badef8e
net.connect: Add some TODO comments
7 years ago
Kim Alvefur
7801141c08
MUC: Add missing reference to room (thanks buildbot) [luacheck]
7 years ago
Kim Alvefur
d7d2b03003
MUC: Indicate the component as origin of various errors where there's no room
...
A room that doesn't exist can't return an error, can it?
7 years ago
Kim Alvefur
5a37794485
MUC: Indicate that the room is the origin of various errors where 'from' is an occupant JID
7 years ago
Kim Alvefur
caa5b2ca77
MUC: Indicate origin of registration related errors
7 years ago
Kim Alvefur
97b1139a7c
MUC: Indicate origin of password related errors
7 years ago
Kim Alvefur
1396c094b6
util.stanza: Support the 'by' attribute on errors
...
This is to be used when the entity generating the error is not the same
as the one the stanza was directed to, e.g. an intermediate server.
7 years ago
Kim Alvefur
cb1ec16059
util.stanza: Check that argument to error_reply is NOT a stanza of type error
...
Replying to an error is Very Bad
7 years ago
Kim Alvefur
7954f16d59
util.stanza: Check that argument to error_reply is a stanza
7 years ago
Kim Alvefur
7fdb06225e
util.stanza: Remove redundant check for attrs
...
A stanza can't not have attrs if created the correct way
7 years ago
Kim Alvefur
b9875e5501
util.stanza: Check that argument to reply is a stanza
7 years ago
Kim Alvefur
e7c738ba3f
Merge 0.11->trunk
7 years ago
Kim Alvefur
378673b456
net.resolvers.service: Pass IP literals directly to basic resolver
...
IP literals will not work with SRV records anyways.
Fixes s2s with IP literals.
7 years ago
Kim Alvefur
d9c64e1f41
net.resolvers.basic: Normalise IP literals, ensures net.server is happy
7 years ago
Kim Alvefur
3b8df57d56
Merge 0.11->trunk
7 years ago