Skip to content

CmdShell does not escape asterisk arg value (SCM-763) #37

Description

@michael-o

This was found during SCM-763.

Consider your want to pass a password (on Windows) with asterisk: S8p3r*S3cr3t. The escaped outcome is S8p3r*S3cr3t. No change, but to pass an asterisk you need to quote the entire string otherwise the shell will expand the asterisk. Correct value would be: "S8p3r*S3cr3t"

Currently, this is impossible in Plexus Utils.

Activity

  1. belingueres commented on Feb 5, 2019

    @belingueres
    Contributor

    @michael-o is this still an issue? I see SCM-763 is fixed now.

  2. michael-o commented on Feb 5, 2019

    @michael-o
    MemberAuthor

    Yes, it is. The entire process execution suffers from one serious flaw that it executes a local shell rather than providing it to the system directory. The shell will do its own replacement which hasn't been espaced by this implementation.

  3. slachiewicz commented on Apr 14, 2025

    @slachiewicz
    Member

    Is it worth keeping the issue open? Any idea how this should be fixed?

  4. michael-o commented on Apr 16, 2025

    @michael-o
    MemberAuthor

    Is it worth keeping the issue open? Any idea how this should be fixed?

    Yes, because the shell invocation needs to be dropped altogether.

  5. slachiewicz commented on Apr 17, 2025

    @slachiewicz
    Member

    Should be fixed here or deprecated here CmdShell and fix it properly on SCM?

  6. michael-o commented on Apr 17, 2025

    @michael-o
    MemberAuthor

    Should be fixed here or deprecated here CmdShell and fix it properly on SCM?

    Completely here replace all shell impls with ProcessBuilder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions