Matthew Wild
6367311519
mod_c2s: Indicate stream secure state in error text when no stream features to offer
5 years ago
Kim Alvefur
f24aba7b19
mod_c2s: Rename Direct TLS listener 'c2s_direct_tls' for clarity
...
And to follow existing naming practices better than 'legacy_ssl' did.
4 years ago
Kim Alvefur
8bde7461c1
mod_c2s,mod_s2s: Indicate stanza size violation with condition from XEP-0205 (thanks mjk)
4 years ago
Kim Alvefur
48216c1dc8
mod_c2s,mod_s2s: Fire event just before writes
...
Could allow e.g. a XEP-0198 implementation to efficiently send ack
requests at optimal times without using timers or nextTick.
4 years ago
Matthew Wild
4c4e764e23
mod_c2s, mod_s2s, mod_component, mod_bosh, mod_websockets: Set default stanza size limits
...
c2s/bosh/ws streams will default to 256KB, s2s and components to 512KB.
These values are aligned with ejabberd's default settings, which should reduce
issues related to inconsistent size limits between servers on the XMPP network.
The previous default (10MB) is excessive for any production server, and allows
significant memory usage by even unauthenticated sessions.
5 years ago
Kim Alvefur
72cb2e0362
mod_c2s: Log about missing conn on async state changes
5 years ago
Kim Alvefur
846862e1e7
mod_c2s: Improve code style
...
We don't use the quoted table indexing style that often, it's not needed
here and it's enough to check for falsyness rather than `nil`.
5 years ago
Kim Alvefur
b5f808c769
mod_c2s: Fix traceback in session close when conn is nil
...
Unclear how this happens.
5 years ago
tmolitor
2b0c472f87
mod_c2s: Don't throw errors in async code when connections are gone
...
Fixes #1507
5 years ago
Kim Alvefur
c90918837e
mod_c2s,mod_s2s: Make stanza size limits configurable
6 years ago
Kim Alvefur
814a3a3482
mod_c2s: Guard against LuaSec not returning TLS info (thanks Martin)
...
The :info() method has been observed to return nothing ... sometimes.
Unclear what causes it. Perhaps the TLS connection was shut down or
hasn't fully settled?
The LuaSec code has code paths that return nothing or nil, error, so it
is best to guard against it.
5 years ago
Kim Alvefur
0acd505f2e
mod_c2s: Log the same messages for Direct TLS as with starttls
...
^C^V
5 years ago
Kim Alvefur
807c78400f
mod_c2s: Update a comment to reflect Direct TLS
5 years ago
Kim Alvefur
db64810141
mod_c2s: Add a Direct TLS listener
...
This only differs from 'legacy_ssl' in name, at least on the server
side. For clients this is the one that uses SRV records.
5 years ago
Kim Alvefur
aa041ffa10
mod_c2s,mod_s2s: Collect stats on TLS versions and ciphers
5 years ago
Jonas Schäfer
2bfa403e36
mod_c2s: Port to new OpenMetrics API
5 years ago
Kim Alvefur
21fa25b27b
mod_c2s: Fix traceback if session was destroyed while opening stream (thanks Ge0rG)
...
Could happen with the 'opportunistic_writes' setting, since then the
stream opening is written directly to the socket, which can in turn
trigger session destruction if the socket somehow got closed just after
the other sent their stream header.
Error happens later when it tries to `hosts[session.host == nil].events`
5 years ago
Kim Alvefur
f7cfe660cd
mod_c2s: Log a debug message before closing due to c2s_timeout
...
It was confusing that the connection would just close without much
explanation.
Wanted this while investigating https://github.com/conversejs/converse.js/issues/2438
5 years ago
Kim Alvefur
2845337d4b
mod_c2s: Reflect stream 'from' attribute back if set ( fix #1625 )
...
Clients should *not* be setting this before TLS anyways.
5 years ago
Kim Alvefur
5abc2e6a5c
mod_c2s,mod_s2s: Make stanza size limits configurable
6 years ago
Kim Alvefur
d22e85debc
mod_c2s,mod_s2s: Use a distinct stream error for hitting stanza size limit
...
Since this is not a real parse error, it should not be reported as such.
6 years ago
Kim Alvefur
0747cbea53
mod_c2s: Run stream open and close events in async thread, fixes #1103
...
Enables async processing during stream opening and closing.
6 years ago
Kim Alvefur
a63e5be1b7
mod_c2s: Swap comments
6 years ago
Kim Alvefur
0fdb85997a
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.
6 years ago
Kim Alvefur
e131bbd3a4
mod_c2s: Validate that a 'to' attribute exists at all
...
Prevents traceback from nameprep(nil)
6 years ago
Kim Alvefur
4512a6266d
mod_c2s: Associate connection with session last ( fixes #1313 )
...
This way, any fatal error in the callback will not leave a
half-established session.
7 years ago
Kim Alvefur
b16782257d
Remove COMPAT with temporary luasec fork
...
The changes in the temporary fork were merged into mainline luasec ca
2013 and included in the 0.5 release in 2014.
6 years ago
Kim Alvefur
40b1e3e0ed
plugins: Remove tostring call from logging
...
Taken care of by loggingmanager now
Mass-rewrite using lua pattern like `tostring%b()`
7 years ago
Kim Alvefur
0f11cd3a54
mod_c2s: Fix fallback for missing session logger
7 years ago
Kim Alvefur
32b507c866
mod_c2s: Do not allow the stream 'to' to change across stream restarts ( fixes #1147 )
8 years ago
Kim Alvefur
0f78fff909
mod_c2s: Avoid concatenating potential nil value ( fixes #753 )
8 years ago
Kim Alvefur
12cdea49b3
mod_c2s: Iterate over child tags instead of child nodes in stream error (fixes traceback from #987 )
8 years ago
Kim Alvefur
b395681f11
mod_c2s: Set a default value for c2s_timeout ( fixes #1036 )
8 years ago
Kim Alvefur
73b75571e6
core.usermanager, various modules: Disconnect other resources on password change (thanks waqas) ( fixes #512 )
9 years ago
Emmanuel Gil Peyrot
bf5d8303ce
mod_c2s: Add a counter for IPv6.
8 years ago
Kim Alvefur
a5612dad90
mod_c2s: Remove unused locals [luacheck]
9 years ago
Kim Alvefur
7e8dcd944e
mod_c2s: Rename unused loop variable to _ [luacheck]
9 years ago
Kim Alvefur
71d437db39
mod_c2s: Rename variable no avoid name clash [luacheck]
9 years ago
Kim Alvefur
befdc64576
mod_c2s, mod_s2s: Remove comment that no longer applies since 946871f6e3c8
9 years ago
Kim Alvefur
bdeb5cc9c5
mod_c2s: Clarify that there were no *stream* features to offer
9 years ago
Kim Alvefur
522f448b35
mod_c2s, mod_s2s: Switch connection counting to 'amount' type and enumerate once per statistics interval
9 years ago
Kim Alvefur
8631e529ba
mod_c2s: Don't try to keep alive sessions where the stream is not (yet) open
10 years ago
Kim Alvefur
0c9ea08015
mod_c2s: Fix whitespace (why does it keep getting messed up?)
10 years ago
Kim Alvefur
ddccdcd00d
mod_c2s, mod_s2s: Bootstrap connection count statistic on module load
10 years ago
Kim Alvefur
4308f867bb
mod_c2s: Just destroy the session when it has no connection (see #641 )
10 years ago
Kim Alvefur
13099c75ec
mod_c2s: Remove use of util.async
10 years ago
Kim Alvefur
89a474d458
mod_c2s: Remove connection object from session object when connection disconnected to prevent accidental use (see #590 )
10 years ago
Kim Alvefur
1875b4a83d
mod_c2s, mod_s2s: Lower priority of session shutdown to negative, so that plugins hooking at the default priority run first ( fixes #601 )
10 years ago
Kim Alvefur
7dda205176
mod_c2s, mod_s2s: Close incoming connections if there are no features to offer on incomplete streams ( fixes #285 )
10 years ago
Kim Alvefur
48652fb9d3
mod_c2s, mod_s2s: Collect statistics on number of connections
11 years ago