Repository navigation
install: refuse an access route without its own helper - #162
Merged
Merged
Conversation
`install --access` mapped every route other than dopamine and checkra1n
to palera1n. Only the three names its argument list holds can reach that
mapping today, so nothing runs the wrong route yet, but a name added to
the list without its helper would have run as palera1n.
The list is now one constant, each name maps to its own helper, and a
name without one is refused ("this version does not run the X access
route"). A test checks every listed route runs as itself and that
amethyst, which install does not run, is refused.
Assisted-by: LLM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes for people
Nothing they can see today. A typed access route now always runs as itself, or is refused with "this version does not run the X access route". It can never quietly run as palera1n.
Why
orchard install --accessmapped every name other than dopamine and checkra1n to palera1n. Today only the three names in its argument list can reach that mapping:install --access amethystwhen the command line is read;resizerefuses names it doesn't run.So nobody has run the wrong route. But a name added to the list without its helper would have gone to palera1n without a word. That came up while adding the amethyst route (#160).
Change
ACCESS_ROUTESis one constant that feeds both the argument list andaccess_helper, which maps each name to its own helper.flow_optionsreturns an error for a name without a helper, andinstallstops with it.amethyst(whichinstalldoesn't run) is refused, both by the argument parser and byflow_options.Testing
cargo test --workspace: all pass.Assisted-by: LLM