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
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
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
c90918837e
mod_c2s,mod_s2s: Make stanza size limits configurable
6 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
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.
7 years ago
Kim Alvefur
e131bbd3a4
mod_c2s: Validate that a 'to' attribute exists at all
...
Prevents traceback from nameprep(nil)
7 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.
7 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
8 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 )
9 years ago
Kim Alvefur
b395681f11
mod_c2s: Set a default value for c2s_timeout ( fixes #1036 )
9 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.
9 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
10 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 )
11 years ago
Kim Alvefur
48652fb9d3
mod_c2s, mod_s2s: Collect statistics on number of connections
11 years ago
Matthew Wild
899b6d53ae
net.http, net.http.server, mod_c2s, mod_s2s, mod_component, mod_admin_telnet, mod_net_multiplex: Add ondetach to release connection from 'sessions' table (or equivalent)
12 years ago
Matthew Wild
933bb5a869
mod_c2s, mod_s2s: Log received invalid stream headers
12 years ago
Kim Alvefur
57940a8351
mod_c2s: Fix traceback if c2s stream sent to component
12 years ago
Kim Alvefur
e06966ee43
mod_c2s, mod_s2s, mod_component, util.xmppstream: Move all session:open_stream() functions to util.xmppstream
12 years ago
Florian Zeitz
c5c7ef5b0f
mod_c2s: Break out stream opening into a separate function
13 years ago
Kim Alvefur
5178a1e79f
mod_c2s, mod_s2s: Set session.encrypted as session.secure does not allways mean encrypted (eg consider_bosh_secure)
13 years ago
Kim Alvefur
0c39eb02b9
mod_c2s: Move another log message to debug level
13 years ago
Kim Alvefur
938d568ac4
mod_c2s, mod_s2s: Log cipher and encryption info in a more compact and (hopefully) less confusing way
13 years ago
Matthew Wild
e0216573ab
mod_c2s: Port coroutine code to util.async
13 years ago