Skip to content

Winget COM API - Allow lower trust registration #2714

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

Merged
merged 3 commits into from
Sep 14, 2024

Conversation

Schtenk
Copy link
Contributor

@Schtenk Schtenk commented Sep 8, 2024

  • I have read the [contributing guidelines] (https://github.com/marticliment/WingetUI/blob/main/CONTRIBUTING.md#coding), and I agree with the Code of Conduct.
  • Have you checked that there aren't other open pull requests for the same changes?
  • Have you tested that the committed code can be executed without errors?
  • This PR is not composed of garbage changes used to farm GitHub activity to enter potential Crypto AirDrops.
    Any user suspected of farming GitHub activity with crypto purposes will get banned. Submitting broken code wastes the contributors' time, who have to spend their free time reviewing, fixing, and testing code that does not even compile breaks other features, or does not introduce any useful changes. Thank you for your understanding.

Fixes winget class registration failing when running as admin by allowing lower trust registration.

Adds a toggle for allowing lower trust registration in winget section of UnigetUI settings.


Closes #XXXX

Relates to #XXXX

@Schtenk
Copy link
Contributor Author

Schtenk commented Sep 8, 2024

From my limited understanding of the windows registry, light research and personal testing it seems that winget COM API only registers as a lower than admin trust (or current user, i.e. not local machine wide), because of this allowing lower trust registration is needed when running as admin.

@marticliment
Copy link
Owner

Do you think enabling this setting by default is a security concern? I couldn't find any docs on microsoft learn, I'll continue my research though

@Schtenk
Copy link
Contributor Author

Schtenk commented Sep 9, 2024

I don't feel I can confidently say since I don't know all the ins and outs of the windows registry and user privileges in windows.
The documentation and mentions about the flag seems very scarce.

The first search result in google and the only usage I could find was in ComUtils.cs from the WingetCLI github repo.
Which is then used through LocalServerInstanceInitializer.cs
in the test in InstanceInitializersSource.cs all from said repo.

@marticliment marticliment changed the title Winget COM APO - Allow lower trust registration Winget COM API - Allow lower trust registration Sep 14, 2024
@marticliment marticliment merged commit b14906a into marticliment:main Sep 14, 2024
2 checks passed
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.

2 participants