25 Commits
Author SHA1 Message Date
Stefan-Sanger b49e9bcaa1 fix: guard mod_saslauth against session destroyed during async HTTP auth
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>
2026-07-16 08:38:14 +02:00
Stefan-Sanger a4f17e2506 fix: cap WebSocket fragment buffer at configurable max message size
The mod_websocket continuation-frame patch accumulated fragments in an
unbounded dataBuffer with no size limit, fragment count limit, or
timeout. A buggy or malicious client sending endless continuation
frames without FIN could exhaust memory and degrade the entire server.

Add a configurable websocket_max_message_size option (default 2 MB)
that closes the connection with code 1009 ("Message too big") and
resets the buffer when exceeded. Also add wss-perf-analysis.md
documenting the WebSocket performance and drop investigation.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/8>
2026-07-16 06:10:01 +00:00
Stefan-Sanger a2f46c99bc fix: re-add WebSocket continuation-frame support for fragmented messages
Prosody 13.0.6 removed continuation-frame (fragmented-message) support
from mod_websocket — validate_frame hard-rejects any frame with FIN=false
(close code 1003). VNCtalk clients fragment large WebSocket messages
(e.g. vCard sets with avatars >~64 KB), so the connection is silently
reset. The rejection fires on the partial-frame validation path before
handle_frame is reached, and websocket_close() does not log, so nothing
appears in prosody debug logs.

This patch removes the blanket FIN=false rejection from validate_frame
and restores the dataBuffer fragment-accumulation logic from 0.11.6 in
handle_frame: text frames (0x1) with FIN=false start a buffer,
continuation frames (0x0) append, and concatenated data is returned
only when FIN=true arrives.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 26e7512b24 feat: upgrade Prosody 0.12.6 → 13.0.6 (milestone 3)
Bump Dockerfile to prosody-13.0.6; all 8 patches re-ported against 13.0.6.

Re-ported patches (3 changed, 5 applied with offset):
- hidden.lib.patch: 13.0 uses module:may() instead of um_is_admin; changed
  to 'if restrict_public then' (same intent: hide option for everyone)
- mod_muc.patch: 13.0 added restrict_pm between register and
  presence_broadcast; updated hunk 1 context
- mod_muc_unique.patch: 13.0 uses 'require "prosody.util.stanza"'
  (namespaced); updated context
- muc.lib, mod_carbons, mod_mam, mod_muc_mam, register.lib: applied
  with line offsets, no re-port needed

Config changes:
- Remove mod_posix from modules_enabled (13.0 absorbed signal handling,
  pidfile, and run_as_root check into core util/startup.lua)
- Move pubsub from modules_enabled to Component (13.0 requires pubsub
  to be loaded as a component, not a module)

Test fix:
- test_muc_fcm_push_to_offline_member: wait for count=2 captures instead
  of 1 — mod_vnc_muc_fcm pushes to ALL affiliated members (including
  sender, because it can't see main-host sessions from the MUC
  component); the test was racing on which push arrived first

Verified: prosodyctl check config passes; compose-harness testsuite
green (80 passed, 6 skipped, 0 failed).

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-SangerandClaude Fable 5 bdb9aed9e3 feat: upgrade prosody 0.11.6 -> 0.12.6 (milestone 1)
Re-port all source patches onto 0.12.6; three are gone entirely:
moduleapi (the two vnc_muc_fcm modules call core.storagemanager
directly now), mod_admin_telnet and portmanager (replaced by
console_interfaces/http_interfaces config). The muc.lib fork keeps its
four functional changes including the externally consumed
muc-config-sub-mitted event; the operator-precedence hunk was fixed
upstream. mod_muc_mam shrinks to keep-archive-on-room-destroy since
muc_log_expires_after="never" disables cleanup upstream in 0.12.

Delete the bundled mod_smacks fork and the no-op mod_smacks_offline;
core 0.12 smacks supersedes them (options audited, dead smacks_max_old
corrected to smacks_max_old_sessions).

Config/startup: drop legacyauth, run_as_root, daemonize; bosh_ports ->
http_ports; cross_domain_* -> http_cors_override; randomize
component_secret at startup (env-overridable); export
log_slow_events_threshold fallback (latent render bug).

Found while smoke-testing: pin --idn-library=idn (0.12's ICU default
segfaults without ICU data in the image); http became a private
service in 0.12 so 5280 needs http_interfaces to stay public; the
telnet console now depends on mod_admin_socket, whose socket moves to
/var/log/prosody.

Verified: prosodyctl check config clean; boots against Postgres with
empty error log and same port bindings as 0.11; healthcheck green;
telnet console and SQL storage round-trip; 0.11->0.12 schema upgrade
rehearsed on a 0.11-created database with data intact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-SangerandClaude Fable 5 2552a58872 refactor: convert prosody patches from full-file copies to unified diffs
Phase 0 of upgrade-plan.md. The 11 forked copies of 0.11.6 files in
patches/ are replaced by unified .patch files applied in the Dockerfile
builder stage with patch -p1 --fuzz=0 before make install, so upstream
drift fails the build instead of silently shipping stale forks. The
cp-over-installed-files block in the final stage is gone and /vnc/patches
no longer ships in the image. Stale patches.list replaced by a README
documenting each patch's intent.

Verified: installed prosody tree (269 files) is byte-identical to the
image built from the previous mechanism.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 06f2766078 fix: cleanup debugging 2023-10-09 08:52:35 +02:00
Stefan-Sanger a2da2fb0b2 fix: change check order 2023-10-08 13:29:19 +02:00
Stefan-Sanger 20e0e8a4b4 fix: cleanup logging1 2023-10-08 12:28:23 +02:00
Stefan-Sanger 842f1cfa53 fix: update condition 2023-10-08 11:34:39 +02:00
Stefan-Sanger 9a0a37c515 fix: more debug verbosity6 2023-10-08 11:15:23 +02:00
Stefan-Sanger 6f482603b0 fix: more debug verbosity5 2023-10-08 11:03:34 +02:00
Stefan-Sanger 06bb3963da fix: more debug verbosity4 2023-10-08 10:40:50 +02:00
Stefan-Sanger 312a09629f fix: more debug verbosity3 2023-10-08 10:27:38 +02:00
Stefan-Sanger bafa5750a6 fix: more debug verbosity2 2023-10-08 10:06:36 +02:00
Stefan-Sanger e021584179 fix: more debug verbosity 2023-10-08 09:39:03 +02:00
Stefan-Sanger 17dcb2a433 fix: enhanced debug 2023-10-08 08:55:06 +02:00
Stefan-Sanger 04b6cbbb67 fix: add pep log for omemo debug 2023-10-08 08:40:00 +02:00
Stefan-Sanger bed1656942 fix: more verbose output 2022-10-19 11:40:00 +02:00
Stefan-Sanger 517c2dcf65 fix: add debug info for measurements 2022-10-19 11:31:00 +02:00
Stefan-Sanger d8002fd380 fix: import upstream mod to add debug info 2022-10-19 11:24:23 +02:00
Stefan-Sanger 19f35d8bdb fix: log cleanup 2022-09-29 07:59:16 +02:00
Stefan-Sanger 8f1f42fd38 fix: log cleanup 2022-09-15 08:50:33 +02:00
Stefan-Sanger a63e6b8d4b fix: add patch for private and public rooms 2022-09-15 05:31:53 +02:00
Stefan-Sanger 7601143bad fix: initial dockerbuild of current prosody for alpine 2022-09-05 06:50:25 +02:00