cli: the help key is not a name - hostname ?, dns zone ? and vlan <id> name ? refuse it (#1685) #1686
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1686
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/1116-1606"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1685.
Three commands take free text, and in all three the console's own help key was stored as the text:
hostname ??dns zone ?DNS zone ? ready?createdvlan 42 name ?VLAN 42 created (name: ?)?Every typed position already refuses the key by quoting it (
% Invalid VLAN id "?"); a name takes any string, so the key became the name. The fix is one helper,_helpKeyRefusal(), at three call sites: the value is refused by name, with the syntax that wanted one, before anything is created.Unchanged and pinned: a bare
hostnameis still% Incomplete command(#1497), and a question mark inside a longer name (hostname edge?1) is still part of the name - only the whole value is the key.Evidence
test/help-key-is-not-a-value.test.jsis the reproduction: 17 of its assertions failed before the change (the three mutations and the receipts that announced them), and it keeps all 23 after it.hostname ?,dns zone ?andvlan <id> name ?refuse it (#1685)?in a free-text position is stored as the name:hostname ?renames the box to "?" #16856141938a68ec62046824