mod_auth_http_async blocks the c2s async runner on an HTTP call inside SASL plain_test. If the client disconnects during that call, sessionmanager.retire_session nils every session field (incl. base_type) and marks it destroyed. When the runner resumed, mod_saslauth crashed at sasl_process_cdata line 94 on 'sasl/'..session.base_type..'/'. Bail out when the session is gone instead of firing the event and sending a reply to a dead connection. Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/9>
13 lines
553 B
Diff
13 lines
553 B
Diff
--- a/plugins/mod_saslauth.lua 2026-07-16 08:32:41.890007020 +0200
|
|
+++ b/plugins/mod_saslauth.lua 2026-07-16 08:33:10.667871912 +0200
|
|
@@ -89,6 +89,9 @@
|
|
end
|
|
local sasl_handler = session.sasl_handler;
|
|
local status, ret, err_msg = sasl_handler:process(text);
|
|
+ if session.destroyed or not session.base_type then
|
|
+ return true;
|
|
+ end
|
|
status, ret, err_msg = handle_status(session, status, ret, err_msg);
|
|
local event = { session = session, message = ret, error_text = err_msg };
|
|
module:fire_event("sasl/"..session.base_type.."/"..status, event);
|