Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block elevated process from overriding hash mismatch #482

Merged
merged 2 commits into from
Jul 8, 2020

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Jul 7, 2020

Change

To prevent the user from running a package whose hash does not match in an elevated context, this change explicitly blocks the scenario. In addition, the inline prompt to proceed when the hash does not match is replaced with usage of the --force option.

While executing on this change, I also took on a fair amount of additional localization work that has yet to be completed. This included transitioning many existing strings to resources, and removal of the prompt functionality altogether. This is partly due to localizing it being a headache, and partly because it prevents easy scripting.

Validation

Existing regression tests.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner July 7, 2020 00:57
Argument::ForType(Args::Type::Log),
Argument::ForType(Args::Type::Override),
Argument::ForType(Args::Type::InstallLocation),
Argument{ "force", Argument::NoAlias, Args::Type::Force, Resource::String::InstallForceArgumentDescription, ArgumentType::Flag },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argument [](start = 12, length = 8)

Curious why is this one not added to ForType?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It uses different help text for each case. Honestly, now that we have the resource strings that whole function could be done away with.


In reply to: 451283891 [](ancestors = 451283891)

Copy link
Contributor

@yao-msft yao-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Contributor

@msftrubengu msftrubengu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@JohnMcPMS JohnMcPMS merged commit a363d7d into microsoft:master Jul 8, 2020
@JohnMcPMS JohnMcPMS deleted the adminhashblock2 branch July 8, 2020 17:53
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.

3 participants