-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Allow winget configure from https location and extend winget configure validate for winget resource units #3833
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Is this related to: |
for (auto const& settingsPair : settings) | ||
{ | ||
auto settingsKey = Utility::ConvertToUTF8(settingsPair.Key()); | ||
if (Utility::CaseInsensitiveEquals("sources", settingsKey)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move string literals to statics.
struct WinGetSource | ||
{ | ||
std::string Name; | ||
std::string Type = "Microsoft.PreIndexed.Package"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why encode the default value here?
|
||
if (Utility::CaseInsensitiveEquals(UnitType_WinGetSources, unitType)) | ||
{ | ||
if (unitIntent == ConfigurationUnitIntent::Assert || unitIntent == ConfigurationUnitIntent::Apply) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel like the intent is necessarily relevant to ensuring that the properties are well formed.
if (isRemote) | ||
{ | ||
// TODO: Suggestions welcome on what values to pass in. | ||
result.Name(argPathWide); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have code that extracts the file name portion from a URL that we use when downloading installers. I would use that to set Name
similarly to what we set for the local filesystem paths.
For Origin
I think the remote URL is fine.
I agree that we should not set Path
.
} | ||
catch (...) {} | ||
|
||
if (pathAsUri && !pathAsUri.Suspicious()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should Suspicious
be handled under the "parsed as a URI portion"? Or do some local file paths end up with that flag?
We could probably have an appropriately handled interactive prompt for suspicious URIs to still allow them through if the user agrees. Or we can just flat out block them until there are complaints.
Yes, this pr implements the issue. I did not know this issue existed. I just linked it to the pr. Thanks. |
Microsoft Reviewers: Open in CodeFlow