Repository navigation
Closed
Labels
Resolution-FixedThe issue is fixed.The issue is fixed.WG-Securitysecurity related areas such as JEAsecurity related areas such as JEA
Milestone
Description
Steps to reproduce
- Create new file catalog for one of the modules in your system (using New-FileCatlog)
- Run Test-FileCatlog on the catalog created in step 1.
New-FileCatalog -CatalogFilePath "C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\pester.cat" -Path "C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0"
Test-FileCatalog "C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\pester.cat"
Expected behavior
PS C:\DSC-tests\DSC\Tests\PullServerClient\BVT> Test-FileCatalog "C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\pester.cat" -Detailed
Status : Valid
HashAlgorithm : SHA1
CatalogItems : {[Functions\Coverage.ps1, F4022ABD45FE0FB2C3527A539F022E2AFDF16851], [Functions\Assertions\BeGreaterThan.ps1,
EEE62A89040021D1F3B2B86D8B6C4884AF7C8925], [bin\Pester.bat, E20AF79E7EC1B2DBA3DF7600C46E9CA613DF1A3C], [Functions\GlobalMock-A.Tests.ps1,
DF7F6F009A46AE9386C01A2350741C264FB4163D]...}
PathItems : {[Build.bat, B4FEDB2F7522EB6EEA68EEA73A095EBA8E441926], [build.psake.ps1, 70DA7E6DF0664C0E791C32C31E14924B779A6938], [CHANGELOG.md,
86F6D42CC7389E38952ED741BFACE73A2C755119], [chocolateyInstall.ps1, 013A7B468B830C37FA51518E56933ACE54889CCC]...}
Signature : System.Management.Automation.Signature
Actual behavior
PS C:\InGuestPolicyx64> Test-FileCatalog "C:\Program Files\WindowsPowerShell\Modules\Pester\3.4.0\pester.cat"
<NO OUTPUT>
Environment data
PS C:\InGuestPolicyx64> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-beta
PSEdition Core
GitCommitId v6.0.0-beta.6-dirty
OS Microsoft Windows 10.0.16250
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Metadata
Metadata
Assignees
Labels
Resolution-FixedThe issue is fixed.The issue is fixed.WG-Securitysecurity related areas such as JEAsecurity related areas such as JEA
Activity
markekraus commentedon Dec 1, 2017
Ilya (@iSazonov) This appears to be caused by #3074. Can you take a look? there appears to be no code path for when
-Pathis not supplied. In 5.1 supplying just-CatalogFilePath(position 0) would use the directory of the catalog file. This is performed inPerformAction()which is never reached becauseProcessRecord()doesn't have any code paths for null-Path.markekraus commentedon Dec 1, 2017
Berhe (@BerheAbrha) you can work around this by supplying the
-Pathand-CatalogFilePath:Example:
Also, judging from your PSVersiontable, you are not on the latest version of PS core. However, i was able to repro this for you on
SteveL-MSFT commentedon Dec 1, 2017
The problem appears to be line 117 was moved inside the
ifstatement when it should stay where it was outside of it. I'll submit a fix.iSazonov commentedon Dec 1, 2017
My bad 😕
SteveL-MSFT commentedon Dec 1, 2017
Ilya (@iSazonov) no worries, I'm just adding some tests and should have a PR soon
BerheAbrha commentedon Dec 1, 2017
Mark Kraus (@markekraus), It does work when the path is supplied to the cmdlet. But it is regression from WMF 5.1 where path is not required. This broke signature validation logic in DSC.
Remove unncessary check for Paths.count > 0 as there is code later to…
markekraus commentedon Dec 1, 2017
Berhe (@BerheAbrha) Yes it was a regression. i was letting you know the workaround while the issue was being addressed. #5596 has addressed the issue and this should be fixed in 6.0.0-GA 😃 , Thanks for reporting!
Remove unncessary check for Paths.count > 0 as there is code later to…
Remove unncessary check for Paths.count > 0 as there is code later to…
Remove unncessary check for Paths.count > 0 as there is code later to…
Remove unncessary check for Paths.count > 0 as there is code later to…