microsoft / microsoft/terminal

Actions without keys should be rejected

Open
#10,944 0 comments 0 reactions 0 assignees View on GitHub
Area-Settings Issue-Bug Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

Extracted from #10933.

# Steps to reproduce

Add this to your "actions":
```json
{
"command": "unbound",
"keys": ""
}
```

# Expected behavior

The application should ignore/reject such actions and optionally remove or warn about them.

# Actual behavior

`ActionMap` is being filled with such actions without validation.
Additionally the bug reporter (@Rosefield) mentioned that they can't remember adding such an action by themselves. It might thus be necessary to add further `assert()`s to find further causes elsewhere.

Contributor guide

Open the contributing guide

Research direction

Start by tracing where ActionMap is filled and where actions from the configuration are validated. Reproduce the empty-keys action, then verify that it is rejected or ignored and that any resulting warning or assertion behavior is covered by the relevant existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.