Skip to content

webui.mod enhancement#1909

Merged
vanosg merged 21 commits into
eggheads:developfrom
michaelortmann:webui.better
May 23, 2026
Merged

webui.mod enhancement#1909
vanosg merged 21 commits into
eggheads:developfrom
michaelortmann:webui.better

Conversation

@michaelortmann
Copy link
Copy Markdown
Member

@michaelortmann michaelortmann commented May 16, 2026

Found by: thommey and Claude Code
Patch by: michaelortmann
Fixes:

One-line summary:

Additional description (if needed):
Issue: https://text.is/66JQ3
This PR Fixes:

  1. Blocker — src/tls.c ssl_init() X509 use-after-free on error.
  1. Blocker — src/tcldcc.c webui listen type works even without the webui module.
  • Init webui_dcc_telnet_hostresolved() hook to null_func instead of 0
  • But we dont need any fix here, because the listen type webui is only set for webui listen ports to begin with.
  1. Should-fix — src/tls.c:1075-1104 HTTP-on-SSL handler hijacks every TLS listener, not just webui.
  • Fixed SSL_R_HTTP_REQUEST logic to only apply to webui ports
  • Response status HTTP 200 -> 400 for error msg "Error: HTTP request received on an SSL port, please try HTTPS"
  • Leaking program name and version when stealth telnets is set to 1 is not a bug but a feature. nginx does the same.
  • The write()/SSL_shutdown() was only suffering from a bad comment. I removed the comment, because the connection is properly closed with SO_LINGER + close(), verified with strace and tcpdump
  1. killsock(): dont kill stdout, so that we keep stdout logging until the very last cycle of .die waving killsock(), it just doesnt make sense to kill stdout.
  2. puts(): fix openssl error logging
  3. puts(): fix memleak
  4. Fix error logging for SSL_write() by doing ERR_clear_error() before that write call
  5. Stop writing to sock after close notify during write and enhance logging
  6. Fix fatal(): end all logging to dcc for killed sock
  7. Fix memleak by calling changeover_dcc() before dcc[i].u is reused. this bug existed since at least eggdrop 1.10.1.

Test cases demonstrating functionality (if applicable):

@vanosg vanosg added this to the v1.10.2 milestone May 17, 2026
@michaelortmann michaelortmann changed the title (WIP) webui.mod enhancement webui.mod enhancement May 17, 2026
…e very last cycle of .die waving killsock(), it just doesnt make sense to kill stdout. puts(): fix memleak / recursion openssl error logging
This reverts commit 4e5065f.
…until the very last cycle of .die waving killsock(), it just doesnt make sense to kill stdout. puts(): fix memleak / recursion openssl error logging"

This reverts commit 31f779f.
…e very last cycle of .die waving killsock(), it just doesnt make sense to kill stdout.
@michaelortmann
Copy link
Copy Markdown
Member Author

ready for review

@vanosg vanosg merged commit d195ccf into eggheads:develop May 23, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants