Skip to content

Fix accepted values for ControlMaster and StrictHostKeyChecking - #42

Closed
urda wants to merge 2 commits into
robballou:masterfrom
urda-forks:urda/fix/controlmaster-stricthostkey-values
Closed

urda wants to merge 2 commits into
robballou:masterfrom
urda-forks:urda/fix/controlmaster-stricthostkey-values

Conversation

@urda

@urda urda commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Both options were routed through parameter-with-boolean-values-plus-ask, which
only recognizes yes | no | ask and marks every other value
invalid.illegal.sshd_config. Per man ssh_config, ControlMaster also accepts
auto and autoask, and StrictHostKeyChecking also accepts accept-new and
off.

Changes

One commit per option; each moves the option out of the shared rule into its own
context, following the existing parameter-<option> naming pattern:

  • ControlMaster now accepts yes | no | ask | auto | autoask. Completions
    updated via src/options.yaml and regenerated with src/build.py.
  • StrictHostKeyChecking now accepts yes | no | ask | accept-new | off.
    off is scoped as a boolean false alongside no, matching the man page ("If
    this flag is set to no or off ..."). No completions change needed: they
    already listed both values, so autocomplete no longer inserts values the
    highlighter flags.
  • UpdateHostKeys and VerifyHostKeyDNS keep the shared rule unchanged.
  • Both rules keep the unscoped consume-while-typing matches and the
    invalid.illegal catch-all, so typos are still flagged.

Testing

  • New assertions in test/syntax_test_client.ssh_config cover the four newly
    accepted values, a mid-typing partial, and an invalid value per option.
  • Full suite run locally with the syntax_tests binary (build 4200): all test
    files pass, before and after each commit.

Before / After

Stock package:

Bug Report BEFORE fix

With this fix:

Bug Report AFTER fix

@michaelblyons

Copy link
Copy Markdown
Collaborator

Thanks for flagging, although I may just demote those options to the generic handling.

@urda

urda commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for flagging, although I may just demote those options to the generic handling.

Gonna be real this is my first major sublime syntax update so I was just trying to "fit in", happy to accept any review comments + directions.

@michaelblyons

michaelblyons commented Jul 20, 2026 •

Copy link
Copy Markdown
Collaborator

No worries! It's possible to fully allowlist all permitted values, but (as you've noticed) that can fall out of date.

The invalid flagging was meant to be an in-between measure to help with the boolean cases.

Feel free to submit more issues or PRs as you notice flaws!

@michaelblyons

Copy link
Copy Markdown
Collaborator

I yanked the ControlMaster snippet changes to a new commit in your name. In another commit, I dropped ControlMaster and the host key checking out of the strict yes/no/ask group and added some of the valid values to the generic value list.

@urda
urda deleted the urda/fix/controlmaster-stricthostkey-values branch July 21, 2026 00:29
@urda

urda commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

See also:

b73bbcf

6d85c3c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StrictHostKeyChecking: accept-new and off flagged as invalid ControlMaster: auto and autoask flagged as invalid

2 participants