Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow usage of portable files that are not .exe (such as .jar).#3385

Open
seppeon wants to merge 1 commit intomicrosoft:master from
seppeon:Feature-SupportPortableWhenNotExe
Open

Allow usage of portable files that are not .exe (such as .jar). #3385
seppeon wants to merge 1 commit intomicrosoft:master from
seppeon:Feature-SupportPortableWhenNotExe

Conversation

@seppeon
Copy link

@seppeon seppeon commented Jun 28, 2023
edited
Loading


This is related to allowing support for this:
microsoft/winget-pkgs#110767

The issue for this is:
#3386

Microsoft Reviewers: codeflow:open?pullrequest=#3385

@seppeon seppeon requested a review from a team as a code owner June 28, 2023 09:52
Copy link
Author

seppeon commented Jun 28, 2023
edited
Loading

I believe I need to change in PortableFlow.cpp too/instead, will make that change then report results :)

Copy link
Contributor

We also need to add a supported JDK/JRE as Dependencies in the manifests, and also, the command will be java -jar <path-to-jar> <parameters-of-jar-by-user>, but java -jar should be configured internally so that users can run it like normal EXEs.

Copy link
Author

seppeon commented Jun 28, 2023
edited
Loading

That would also mean that documentation given by vendors like PlantUML would not match usage after installing a jar package.

For example, PlantUML tell users to run their application like this:
java -jar plantuml.jar sequenceDiagram.txt source

If this was wrapped, the doco from these authors may not match.

PS. Ignore branch close/open, I was pressing tab and pressed enter on the wrong button it seems (I think, not really positive lol).

Copy link
Contributor

Trenly commented Jun 28, 2023

I don’t think this should be merged, as it would allow things like .ps1 scripts to be injected as portable packages, which is something that should be disallowed.

Having any file extension be available as part of the portable flow is a bad idea in my opinion. If support for Jar files is needed, it should be added as an entirely separate installer type for jar

Copy link
Author

seppeon commented Jun 28, 2023
edited
Loading

Right, that's true. I don't mind adding .jar specifically. What are the concerns about ps1 scripts? An executable can presumably achieve the same thing as that script?

Copy link
Contributor

Trenly commented Jun 28, 2023

Right, that's true. I don't mind adding .jar specifically. What are the concerns about ps1 scripts? An executable can presumably achieve the same thing as that script?

Presumably, yes, but if an EXE is malicious, it is generally easier to detect than a .ps1 or .bat script executing arbitrary code

Copy link
Author

seppeon commented Jun 28, 2023

An installer can already package and install scripts which end up very similar to this outcome though?
Additionally, chocolatey, apt, pacman all allow scripts afaik.

Copy link
Contributor

Trenly commented Jun 28, 2023

An installer can already package and install scripts which end up very similar to this outcome though?

Yes, they could, but then it isn't arbitrary code execution - it is packed code execution.

Additionally, chocolatey, apt, pacman all allow scripts afaik.

Yes, but WinGet is not those. In fact, it is one of the core principles of WinGet not to allow scripts during install. You can read more about it in the Scripts discussion

yao-msft reacted with thumbs up emoji

Copy link
Collaborator

denelon commented Jun 28, 2023

The "Installation Notes" displayed after an install "could" help the user understand the special case for a Java Archive as a portable package.

@denelon denelon added the Blocking-Issue Blocking issue label Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Blocking-Issue Blocking issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /