Skip to content

Commit

Permalink
Merge tag 'v7.1.3' into powercord
Browse files Browse the repository at this point in the history
[7.1.3] - 2021-03-11

*** Engine Updates and Fixes

- Remove the 32K character limit on the environment block for `Start-Process` (PowerShell#14111)
- Fix webcmdlets to properly construct URI from body when using `-NoProxy` (PowerShell#14673)

*** General Cmdlet Updates and Fixes

- Fix `PromptForCredential()` to add `targetName` as domain (PowerShell#14504)

*** Build and Packaging Improvements

<details>

<summary>

Bump .NET SDK to 5.0.4

</summary>

<ul>
<li>Bump .NET SDK to 5.0.4 (Internal 14775)</li>
<li>Disable running markdown link verification in release build CI (PowerShell#14971, PowerShell#14974, PowerShell#14975)</li>
<li>Use template that disables component governance for CI (PowerShell#14938)</li>
<li>Declare which variable group is used for checking the blob in the release build (PowerShell#14970)</li>
<li>Add suppress for nuget multi-feed warning (PowerShell#14893)</li>
<li>Disable code signing validation where the file type is not supported (PowerShell#14885)</li>
<li>Install wget on <code>CentOS</code> 7 docker image (PowerShell#14857)</li>
<li>Fix install-dotnet download (PowerShell#14856)</li>
<li>Make universal Deb package based on deb package spec (PowerShell#14681)</li>
<li>Fix release build to upload global tool packages to artifacts (PowerShell#14620)</li>
<li>Update <code>ini</code> component version in test <code>package.json</code> (PowerShell#14454)</li>
<li>Add manual release automation steps and improve changelog script (PowerShell#14445)</li>
<li>Update markdown test packages with security fixes (PowerShell#14145)</li>
<li>Fix a typo in the <code>Get-ChangeLog</code> function (PowerShell#14129)</li>
<li>Disable global tool copy to unblock release</li>
</ul>

</details>

[7.1.3]: PowerShell/PowerShell@v7.1.2...v7.1.3
  • Loading branch information
WamWooWam committed Mar 16, 2021
2 parents ccd7550 + ea5c8e3 commit 3cc3e1d
Show file tree
Hide file tree
Showing 40 changed files with 677 additions and 456 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM mcr.microsoft.com/dotnet/nightly/sdk:5.0.103
FROM mcr.microsoft.com/dotnet/nightly/sdk:5.0.104

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
2 changes: 2 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -1148,4 +1148,6 @@ InstallLocation
PkgES
Microsoft.PowerShell.Native
rtm.20526.5
ini
package.json
jcotton42
84 changes: 59 additions & 25 deletions .vsts-ci/misc-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,54 @@ pr:
- feature*

resources:
- repo: self
clean: true
repositories:
- repository: ComplianceRepo
type: github
endpoint: PowerShell
name: PowerShell/compliance
ref: master

variables:
- name: repoFolder
value: PowerShell

jobs:
- template: templates/credscan.yml
- job: CI_Compliance
displayName: CI Compliance

- job: Linux_CI
pool:
vmImage: windows-latest

variables:
- name: repoPath
value: $(Agent.BuildDirectory)\$(repoFolder)

steps:
- checkout: self
clean: true
path: $(repoFolder)

- checkout: ComplianceRepo

- template: ci-compliance.yml@ComplianceRepo

- job: Linux_CI
displayName: Markdown and Common Tests

pool:
name: Hosted Ubuntu 1604
vmImage: ubuntu-16.04

variables:
- name: repoPath
value: $(Agent.BuildDirectory)/$(repoFolder)

steps:
- checkout: self
clean: true
path: $(repoFolder)

- checkout: ComplianceRepo

- powershell: |
Get-ChildItem -Path env:
displayName: Capture Environment
Expand All @@ -48,28 +84,26 @@ jobs:
displayName: Install mdspell
condition: succeededOrFailed()
- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
displayName: Set Build Name for Non-PR
condition: ne(variables['Build.Reason'], 'PullRequest')

- bash: |
mdspell '**/*.md' '!**/Pester/**/*.md' --ignore-numbers --ignore-acronyms --report --en-us;
displayName: Test Spelling in Markdown
condition: succeededOrFailed()
workingDirectory: '$(repoPath)'
- powershell: |
Import-module ./build.psm1
$path = Join-Path -Path $pwd -ChildPath './commonTestResults.xml'
$results = invoke-pester -Script ./test/common -OutputFile $path -OutputFormat NUnitXml -PassThru
Write-Host "##vso[results.publish type=NUnit;mergeResults=true;runTitle=Common Tests;publishRunAttachments=true;resultFiles=$path;]"
if($results.TotalCount -eq 0 -or $results.FailedCount -gt 0)
{
throw "Markdown tests failed"
}
displayName: Run Common Tests
condition: succeededOrFailed()
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
inputs:
sourceScanPath: '$(Build.SourcesDirectory)'
snapshotForceEnabled: true
- ${{ if not(contains(variables['SYSTEM.COLLECTIONURI'],'mscodehub')) }}:
- pwsh: |
Import-module ./build.psm1
$path = Join-Path -Path $pwd -ChildPath './commonTestResults.xml'
$results = invoke-pester -Script ./test/common -OutputFile $path -OutputFormat NUnitXml -PassThru
Write-Host "##vso[results.publish type=NUnit;mergeResults=true;runTitle=Common Tests;publishRunAttachments=true;resultFiles=$path;]"
if($results.TotalCount -eq 0 -or $results.FailedCount -gt 0)
{
throw "Markdown tests failed"
}
displayName: Run Common Tests
condition: succeededOrFailed()
workingDirectory: '$(repoPath)'
- template: dailyBuildCompliance.yml@ComplianceRepo
parameters:
sourceScanPath: '$(repoPath)'
43 changes: 43 additions & 0 deletions CHANGELOG/7.1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# 7.1 Changelog

## [7.1.3] - 2021-03-11

### Engine Updates and Fixes

- Remove the 32K character limit on the environment block for `Start-Process` (#14111)
- Fix webcmdlets to properly construct URI from body when using `-NoProxy` (#14673)

### General Cmdlet Updates and Fixes

- Fix `PromptForCredential()` to add `targetName` as domain (#14504)

### Build and Packaging Improvements

<details>

<summary>

Bump .NET SDK to 5.0.4

</summary>

<ul>
<li>Bump .NET SDK to 5.0.4 (Internal 14775)</li>
<li>Disable running markdown link verification in release build CI (#14971, #14974, #14975)</li>
<li>Use template that disables component governance for CI (#14938)</li>
<li>Declare which variable group is used for checking the blob in the release build (#14970)</li>
<li>Add suppress for nuget multi-feed warning (#14893)</li>
<li>Disable code signing validation where the file type is not supported (#14885)</li>
<li>Install wget on <code>CentOS</code> 7 docker image (#14857)</li>
<li>Fix install-dotnet download (#14856)</li>
<li>Make universal Deb package based on deb package spec (#14681)</li>
<li>Fix release build to upload global tool packages to artifacts (#14620)</li>
<li>Update <code>ini</code> component version in test <code>package.json</code> (#14454)</li>
<li>Add manual release automation steps and improve changelog script (#14445)</li>
<li>Update markdown test packages with security fixes (#14145)</li>
<li>Fix a typo in the <code>Get-ChangeLog</code> function (#14129)</li>
<li>Disable global tool copy to unblock release</li>
</ul>

</details>

[7.1.3]: https://github.com/PowerShell/PowerShell/compare/v7.1.2...v7.1.3

## [7.1.2] - 2021-02-11

### Build and Packaging Improvements
Expand Down
4 changes: 2 additions & 2 deletions DotnetRuntimeMetadata.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"sdk": {
"channel": "latest",
"packageVersionPattern": "5.0.3",
"sdkImageVersion": "5.0.103",
"packageVersionPattern": "5.0.4",
"sdkImageVersion": "5.0.104",
"nextChannel": "net5/rc2"
}
}
12 changes: 4 additions & 8 deletions assets/files.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -1602,9 +1602,6 @@
<Component Id="cmpEA40E9164309426C88C4388FDCA9559D">
<File Id="fil205C9BE7027A408B985D96F5EEF11594" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Threading.Channels.dll" />
</Component>
<Component Id="cmp34649490F5B04041A08E73D7A86D5A5A">
<File Id="fil2DDAEABD470A475E950B94AC186DAB2E" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Text.Encodings.Web.dll" />
</Component>
<Component Id="cmpB3116053008E492C9B36C89BF682B8F7">
<File Id="fil0D09CC7B4B8A43369D0207AC861D8D21" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Runtime.CompilerServices.Unsafe.dll" />
</Component>
Expand Down Expand Up @@ -3057,12 +3054,12 @@
<Component Id="cmp1EBDE676D79B4B0DB859B3F601D78513">
<File Id="fil589A10D0D26C4D7F8479F40D11824D63" KeyPath="yes" Source="$(var.ProductSourcePath)\api-ms-win-core-console-l1-2-0.dll" />
</Component>
<Component Id="cmp350AE5AC0C2448B59A2C8405A392F0B4">
<File Id="fil664CD92644714AE381E158D952344378" KeyPath="yes" Source="$(var.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_5.0.321.7212.dll" />
</Component>
<Component Id="cmp1BE6E4D5997742FF974440017C5502EE">
<File Id="fil77AD293FB24E4B1893A18FBC186AC67F" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Diagnostics.EventLog.Messages.dll" />
</Component>
<Component Id="cmp340A7AAB36EA4610A1BBCB688CA4B329">
<File Id="filDED6D1E744684BFB92FC337FB2DB0224" KeyPath="yes" Source="$(var.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_5.0.421.11614.dll" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
Expand Down Expand Up @@ -3600,7 +3597,6 @@
<ComponentRef Id="cmp1719A38F3C30484BBA189D718AF00D3C" />
<ComponentRef Id="cmp770700CA06564FB187D1CD2A79AA3DA8" />
<ComponentRef Id="cmpEA40E9164309426C88C4388FDCA9559D" />
<ComponentRef Id="cmp34649490F5B04041A08E73D7A86D5A5A" />
<ComponentRef Id="cmpB3116053008E492C9B36C89BF682B8F7" />
<ComponentRef Id="cmp859A3876902946E7B5B4965F90664C5D" />
<ComponentRef Id="cmpF1B0E6DCC3BD4797B206C879EF270062" />
Expand Down Expand Up @@ -4048,8 +4044,8 @@
<ComponentRef Id="cmp0BD7D15E0377407FA4C43BFE89F0C12E" />
<ComponentRef Id="cmpC0FFB3F4FB30438082D2DC0F4E4BF12D" />
<ComponentRef Id="cmp1EBDE676D79B4B0DB859B3F601D78513" />
<ComponentRef Id="cmp350AE5AC0C2448B59A2C8405A392F0B4" />
<ComponentRef Id="cmp1BE6E4D5997742FF974440017C5502EE" />
<ComponentRef Id="cmp340A7AAB36EA4610A1BBCB688CA4B329" />
</ComponentGroup>
</Fragment>
</Wix>
11 changes: 8 additions & 3 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1673,7 +1673,7 @@ function Install-Dotnet {

# Install for Linux and OS X
if ($environment.IsLinux -or $environment.IsMacOS) {
$curl = Get-Command -Name curl -CommandType Application -TotalCount 1 -ErrorAction Stop
$wget = Get-Command -Name wget -CommandType Application -TotalCount 1 -ErrorAction Stop

# Uninstall all previous dotnet packages
$uninstallScript = if ($environment.IsLinux -and $environment.IsUbuntu) {
Expand All @@ -1684,7 +1684,7 @@ function Install-Dotnet {

if ($uninstallScript) {
Start-NativeExecution {
& $curl -sO $uninstallObtainUrl/uninstall/$uninstallScript
& $wget $uninstallObtainUrl/uninstall/$uninstallScript
Invoke-Expression "$sudo bash ./$uninstallScript"
}
} else {
Expand All @@ -1694,7 +1694,12 @@ function Install-Dotnet {
# Install new dotnet 1.1.0 preview packages
$installScript = "dotnet-install.sh"
Start-NativeExecution {
& $curl -sO $installObtainUrl/$installScript
Write-Verbose -Message "downloading install script from $installObtainUrl/$installScript ..." -Verbose
& $wget $installObtainUrl/$installScript

if ((Get-ChildItem "./$installScript").Length -eq 0) {
throw "./$installScript was 0 length"
}

$bashArgs = @("./$installScript", '-c', $Channel, '-v', $Version)

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "5.0.103"
"version": "5.0.104"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2341,10 +2341,6 @@ private static byte[] ConvertEnvVarsToByteArray(StringDictionary sd)

// Use Unicode encoding
bytes = Encoding.Unicode.GetBytes(builder.ToString());
if (bytes.Length > 0xffff)
{
throw new InvalidOperationException("EnvironmentBlockTooLong");
}

return bytes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.7.0" />
<PackageReference Include="System.Threading.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Drawing.Common" Version="5.0.0" />
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
<PackageReference Include="NJsonSchema" Version="10.2.2" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -818,12 +818,12 @@ private ErrorRecord GetValidationError(string msg, string errorId, params object

private bool IsStandardMethodSet()
{
return (ParameterSetName == "StandardMethod");
return (ParameterSetName == "StandardMethod" || ParameterSetName == "StandardMethodNoProxy");
}

private bool IsCustomMethodSet()
{
return (ParameterSetName == "CustomMethod");
return (ParameterSetName == "CustomMethod" || ParameterSetName == "CustomMethodNoProxy");
}

private string GetBasicAuthorizationHeader()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,26 @@ class ConsoleHostUserInterface : System.Management.Automation.Host.PSHostUserInt
passwordPrompt = StringUtil.Format(ConsoleHostUserInterfaceSecurityResources.PromptForCredential_Password, userName
);

//
// now, prompt for the password
//
WriteToConsole(passwordPrompt, true);
password = ReadLineAsSecureString();
if (password == null)
if (!InternalTestHooks.NoPromptForPassword)
{
return null;
WriteToConsole(passwordPrompt, transcribeResult: true);
password = ReadLineAsSecureString();
if (password == null)
{
return null;
}

WriteLineToConsole();
}
else
{
password = new SecureString();
}

WriteLineToConsole();
if (!string.IsNullOrEmpty(targetName))
{
userName = StringUtil.Format("{0}\\{1}", targetName, userName);
}

cred = new PSCredential(userName, password);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.Diagnostics.EventLog" Version="5.0.0" />
<PackageReference Include="System.Diagnostics.EventLog" Version="5.0.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
<PackageReference Include="System.IO.Packaging" Version="5.0.0" />
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="5.0.0" />
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.0" />
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.1" />
<!-- the following package(s) are from https://github.com/dotnet/wcf -->
<PackageReference Include="System.ServiceModel.Duplex" Version="4.7.0" />
<PackageReference Include="System.ServiceModel.Http" Version="4.7.0" />
Expand Down
2 changes: 2 additions & 0 deletions src/System.Management.Automation/engine/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2056,6 +2056,8 @@ public static class InternalTestHooks
internal static bool BypassAppLockerPolicyCaching;
internal static bool BypassOnlineHelpRetrieval;
internal static bool ForcePromptForChoiceDefaultOption;
internal static bool BypassOutputRedirectionCheck;
internal static bool NoPromptForPassword;

// Stop/Restart/Rename Computer tests
internal static bool TestStopComputer;
Expand Down
8 changes: 6 additions & 2 deletions test/common/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
"dependencies": {
"gulp": "^4.0.2",
"markdownlint": "^0.21.0",
"through2": "^4.0.2",
"yargs-parser": "13.1.2"
"through2": "^4.0.2"
},
"resolutions": {
"yargs-parser": "^13.1.2" ,
"y18n": "^5.0.5",
"ini": "^1.3.6"
},
"devDependencies": {
"gulp-concat": "^2.6.1",
Expand Down

0 comments on commit 3cc3e1d

Please sign in to comment.