Commit Graph
12 Commits
Author SHA1 Message Date
Brad Arant 1a15f6ced8 Add real authentication to ConsoleServer/ConsoleSession, fix CommandList help
ConsoleSession's login flow never actually checked anything: the
entered username was discarded and the password was never compared,
so any input (including blank) reached the command prompt. Confirmed
live via an unauthenticated login against BARANTMail's admin console
on port 1027, which was reachable externally. ConsoleServer now takes
an optional credentialChecker callback consulted by the WAIT_PASSWORD
state; omitting it preserves the old accept-anything behavior for any
other use of this class.

Separately, the console never prompted until the client's first line
arrived - that line was silently discarded just to kick the state
machine off, shifting every subsequent line one slot early. Harmless
under the old accept-anything login, but it broke real credential
checking outright (the typed password was compared against the typed
username, etc). ConsoleSession::onConnected() now starts the state
machine immediately on connect instead.

CommandList::processCommand() was a no-op stub - the intended
"typing help lists the registered commands" body was commented out,
and even referenced a Command::getName() that was never added to the
base class. The map's own key from add() already is the registered
name, so this just walks it directly.
2026-09-06 04:05:59 +00:00
Brad Arant 5feabd0fde TLS almost connects. Needs read and write logic finished. 2025-02-20 15:33:28 -08:00
Brad Arant b7deabc5dc Rework for TLS. 2024-07-10 13:30:18 -07:00
Brad Arant 46f98dff69 Many changes 2021-08-05 13:07:53 -07:00
barant b4ab5fb86a New build. 2020-04-13 09:40:58 -07:00
barant 43a24b900a TLS work. Not done. 2019-09-20 20:25:45 -07:00
barant a40f7314a8 Elimination of Service object, 2019-09-18 18:32:15 -07:00
barant a46db126e9 Continued restructing. 2019-09-13 09:16:55 -07:00
Brad Arant f894f3fb66 Working compile copy. 2019-03-04 13:08:34 -08:00
Brad Arant 41ff757f09 Changed TCPServer to use IPAddress. 2019-02-22 19:48:25 -08:00
Brad Arant 2cb1e3e2f2 Implementation of Serice object into structure. 2019-02-16 12:01:36 -08:00
Brad Arant d8b1275884 Initial repository 1.0.0 2019-02-07 13:28:21 -08:00