Repository navigation
fix(recorder): mask the admin password in #login chat commands - #137
Conversation
YetheSamartaka
commented
Dec 1, 2026
- A #login chat command carries the server admin password. Until now it went in full to the extension, and from there into the recording, the Postgres database, the resend spool and the debug log.
- The new OCAP_recorder_fnc_redactLoginCommand keeps the command and replaces everything after it with a fixed ********, which doesn't reveal the password's length. Matching ignores case and surrounding whitespace, the same as the web server.
- Ordinary chat, #logout, and #login in the middle of a sentence are recorded as typed.
- Tests: adds tests/chat_redaction_regressions.sqf, which needs no players. hemtt check passes. The new test has not been run yet: it needs an Arma test build.
A #login chat command carries the server admin password, which reached
the extension and from there the recording, its database and spool.
The chat handler now keeps the command and replaces everything after it
with a fixed mask ("#login ********") that does not reveal the length.
Matching ignores case and surrounding whitespace, like the web server.
Adds tests/chat_redaction_regressions.sqf, which needs no players.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ratatoskr reviewed this pull request. Changes requested on Finished 2026-12-01 22:29 UTC. |
fank
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES — 1 blocking credential-redaction gap.
Review details
Leading Unicode whitespace can leave the password in the extension payload. addons/recorder/fnc_redactLoginCommand.sqf:35–37 uses SQF trim, documented to remove spaces, tabs, and line returns. The companion web implementation uses Go's Unicode-aware strings.TrimSpace. Under the documented SQF behavior, a chat message with a leading non-breaking space (U+00A0) followed by #login synthetic-password fails the prefix check and returns the original text. That sends the password in :EVENT:CHAT: and exposes it in the extension-call debug log before web ingestion can mask it. This does not depend on Arma accepting the message as a successful login. Match the web server's whitespace handling and add an extension-boundary regression with a leading non-breaking space.
The existing payload assertions would catch removal of the redaction call for ASCII input, but do not cover this case. I checked the payload layout against extension c2d8c0c and the fallback against web#626 at 4edca58.
Verification: git diff --check passed. hemtt check and hemtt build passed in a temporary copy of 8c13f45 with HEMTT 1.23.1; the local build warned that Arma 3 Tools were absent. Both steps also passed in GitHub Actions. The SQF regression and live chat path were not run because no Arma 3 runtime was available; the Unicode finding is based on the documented command behavior and source trace.
Earlier discussions: GitHub GraphQL returned no review threads; none to resolve, keep open, or skip.
SQF trim removes only spaces, tabs and line breaks, so a #login behind a non-breaking space kept its password in the :EVENT:CHAT: payload and the extension's debug log. The command is now found after any Unicode White_Space character or U+FEFF, the set the web server trims, matched on code points from toArray. The regression suite covers the extension boundary with a leading non-breaking space and other Unicode whitespace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ratatoskr reviewed this pull request. Changes requested on Finished 2026-12-02 08:06 UTC. |
fank
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES — 1 blocking compatibility defect in password redaction.
Review details
The login redactor uses an array slice that requires Arma 3 2.14. fnc_redactLoginCommand.sqf:52 calls _chars select [_start + 6] for every matched #login. Bohemia’s 2.14 changelog says the count only became optional in 2.14, but the recorder manifest still declares 2.10. On 2.10 and 2.12, the new helper relies on unsupported behavior before :EVENT:CHAT: is sent, so the masked event is not guaranteed. Pass an explicit count (count _chars - (_start + 6)) or scan the suffix without slicing. The compatibility mismatch is documented; I did not observe the exact older-engine failure mode in game.
Previous finding and coverage: The earlier review’s Unicode prefix issue is addressed at the matching step: the new scan skips NBSP and the same whitespace set as web#626 at 3e6f82b. The extension-boundary test now asserts the masked NBSP payload and would fail if the handler stopped calling the redactor. The extension at c2d8c0c still reads the message from slot 5.
Verification: git diff --check HEAD~2 HEAD passed. hemtt check and hemtt build passed in a temporary copy of 5cd11fb with HEMTT 1.23.1; the local build warned that Arma 3 Tools were absent. Both steps also passed in GitHub Actions. No Arma 3 runtime was available, so neither the SQF regression nor the live chat path was run.
Review threads: GitHub GraphQL returned no review threads; none were resolved, left open, or skipped.
The suffix slice omitted its count, which became optional only in Arma 2.14, while the recorder declares 2.10. Pass the count explicitly and cover a command at the very end of the message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ratatoskr reviewed this pull request. Approved on Finished 2026-12-02 20:04 UTC. |
fank
left a comment
There was a problem hiding this comment.
APPROVE — 0 blocking findings; both prior findings are addressed.
Review details
- Unicode whitespace: The redactor now skips leading NBSP and the rest of the web fallback’s whitespace set. The server handler masks the text before the extension call and its debug logging, without changing the extension’s payload layout. The boundary regression would fail if either NBSP handling or the handler’s redaction call were removed.
- Arma 3 2.10 compatibility: Both slices now pass an explicit count; neither relies on the one-argument range form added in 2.14. The regression includes a bare command after NBSP to cover the empty suffix.
Verification: git diff --check passed. hemtt check and hemtt build passed in a temporary copy of 7f5c000 using HEMTT 1.23.1 (local build warned that Arma 3 Tools were absent). Both steps also passed in GitHub Actions. No Arma 3 runtime was available, so neither the SQF regression nor the live chat path was run.
Review threads: GitHub GraphQL returned no threads; none were resolved, left open, or skipped. The earlier findings were in the submitted review bodies linked above.