Skip to content

Omnitruck Windows install.ps1 script breaks when no_proxy contains *.domain #330

@rlaveycal

Description

@rlaveycal

Version:

Omnitruck

Environment:

Windows

Scenario:

Running the omnitruck script fails if the $env:no_proxy environment variable contains wildcard domain entries like *.chef.io.

Steps to Reproduce:

The cause is the Get-WebContentOnFullNet helper function. It doesn't sanitise the setting of $proxy.BypassList which must be an array of regular expressions.

$proxy = New-Object -TypeName System.Net.WebProxy

$proxy.BypassList = @( "*.chef.io" ) # will fail

$proxy.BypassList = @( "\*.chef.io" ) # will work

$proxy.BypassList = @( " *.chef.io" ) # also works

Expected Result:

Chef is installed

Actual Result:

Exception thrown - Exception setting "BypassList": "parsing "*.chef.io" - Quantifier {x,y} following nothing."

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UntriagedAn issue that has yet to be triaged.Type: BugDoes not work as expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions