summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-06-30Fix runtime crashes: logd recursion, trim OOB, sock SO_REUSEADDR/accept, md5 ↵Paul Buetow
session Multiple latent bugs made the chat crash on real use (login POST segfaulted): - logd::flush: when a log file can't be opened, log the error to stderr and exit(1). Previously it called wrap::system_message, which routes back through LOGD->log_simple_line->flush on the same failing logd -> infinite recursion -> stack overflow (SIGSEGV). Bitten in k8s where an emptyDir on /app/log hides the image's /app/log/rooms, so the room log open failed on login. - tool::trim: rewrite the right-trim; the original did s_str[s_str.size()] (out-of-bounds under _GLIBCXX_ASSERTIONS / UB) and erased at i_pos=size. - sock::_make_server_socket: move SO_REUSEADDR setsockopt BEFORE bind so a quick container restart rebinds port 2000 (was EADDRINUSE -> fallback to 2001, which the k8s Service doesn't target -> 502). - sock::process_request: init accept() addrlen and bail on any accept error (not just EAGAIN/EINTR) so we never proceed with fd=-1 (EBADF). - chat.session.md5hash=false at runtime: the md5 session-id path does s_hash.substr(s_ret.find(s_salt)+salt.len()+3); the default salt has chars not in chat.session.validchars so find() returns npos and the substr/append corrupts the heap and segfaults on login. Overridden via -o in the image CMD. - docker-entrypoint.sh: mkdir -p /app/log/rooms at startup (volume mount hides the image's copy).
2026-06-30reqp: write the built HTTP/1.1 header+body back to p_responsePaul Buetow
parse() constructed the full 'HTTP/1.1 200 OK ... Content-Length ... Content-Type' response into a local s_resp but never assigned it back, so the socket writer sent only the body (HTTP/0.9-style). Traefik/proxies 500'd on these responses. This makes ychat emit proper HTTP/1.1 responses so the f3s ingress can proxy it.
2026-06-30Docker revival (Mode A): build in container, deploy to f3sPaul Buetow
Multi-stage Dockerfile (Rocky 9 builder + runtime) builds ychat entirely in a container with SSL/MySQL/readline disabled (in-memory guest chat). Three minimal legacy-C++ patches so it builds on GCC 11: - glob.h/modl.cpp: rename project 'function' typedef to 'mod_func_t' (collides with std::function via 'using namespace std') - logd.cpp: 'ofstream == NULL' -> '!is_open()' - sock.cpp: assign i_server_sock before set_nonblock() (was EBADF on startup) Add DOCKER.md with build/push/deploy workflow and quirks (HTTP/0.9 responses, ephemeral in-memory state).
2010-11-21renamed branche into kind in order not to confuse with subversion branchesPaul Buetow
2010-11-21added yhttpd and ycurses trunk versionsPaul Buetow
2010-11-21(no commit message)Paul Buetow
2010-11-21moving into ychat subdirPaul Buetow
2010-11-21(no commit message)Paul Buetow
2010-11-21moving stuff to branchesPaul Buetow
2010-11-21moving stuff to branchesPaul Buetow
2009-01-27(no commit message)Paul Buetow
2009-01-27(no commit message)Paul Buetow
2009-01-27(no commit message)Paul Buetow
2009-01-27(no commit message)Paul Buetow
2008-05-15trunkPaul Buetow
2008-05-15moved stuff the trunkPaul Buetow