Skip to content

Commit 39672cb

Browse files
Fix MatchesEventFilter regression and update fuzzing docs
- Change structural guard in MatchesEventFilter to return false (reject) instead of true (pass through) when event JSON is missing params object. This matches the old inline behavior where missing fields resolved to empty strings and failed filter comparison. - Update doc/fuzzing.md to remove references to deleted fuzz targets: TranslateKeys, ValidateQuickPickChoices, ValidateSettingsJson. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 27f6919 commit 39672cb

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

doc/fuzzing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ OneFuzz for continuous coverage.
99

1010
| Project | Path | Targets |
1111
|---------|------|---------|
12-
| **WtcliFuzzer** | `src/tools/wtcli/ft_fuzzer/` | `TranslateKeys`, `BuildSendEventJson`, `MatchesEventFilter` |
13-
| **ProtocolFuzzer** | `src/cascadia/TerminalProtocol/ft_fuzzer/` | `ClassifySendEvent`, `ParseSplitDirection`, `ClassifyPaneOutputSource`, `ValidateQuickPickChoices`, `ValidateSettingsJson` |
12+
| **WtcliFuzzer** | `src/tools/wtcli/ft_fuzzer/` | `BuildSendEventJson`, `MatchesEventFilter` |
13+
| **ProtocolFuzzer** | `src/cascadia/TerminalProtocol/ft_fuzzer/` | `ClassifySendEvent`, `ParseSplitDirection`, `ClassifyPaneOutputSource` |
1414
| **OpenConsoleFuzzer** | `src/host/ft_fuzzer/` | `WriteCharsLegacy` (original host fuzzer) |
1515

1616
Each project contains:

src/tools/wtcli/wtcli_functions.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ namespace wtcli
7777
}
7878

7979
// Event JSON must be an object with a "params" object inside.
80+
// Reject structurally invalid events when filters are active —
81+
// missing fields can't match any filter.
8082
if (!ev.isObject() || !ev.isMember("params") || !ev["params"].isObject())
8183
{
82-
return true;
84+
return false;
8385
}
8486

8587
if (!sessionIdFilter.empty())

0 commit comments

Comments
 (0)