Commit graph

1579 commits

Author SHA1 Message Date
Travis Plunk
18a181fc30
Fix CVE-2018-8415 (#8253)
If there is a null character in a scriptblock, translate it to a null replacement character before logging with scriptblock logging.
2018-11-13 11:30:48 -08:00
Travis Plunk
db60f0614a Revert "Ignoring backspace for empty lines on stdin/stdout mode (#8196)" (#8239)
This reverts commit b525b1f0bd.
2018-11-12 13:14:04 -08:00
bugale
b525b1f0bd Ignoring backspace for empty lines on stdin/stdout mode (#8196) 2018-11-10 18:55:28 +05:00
Paul Higinbotham
d4bf5c87bc Fix tests running in Azure DevOps (#8220) 2018-11-09 15:11:02 -08:00
kwkam
caad7ed471 Fix Rename-Item -Path with wildcard char (#7398) 2018-11-09 11:08:26 -08:00
Kevin Marquette
75fa6af9c0 Add test coverage for additional Get-Module parameters (#8137) 2018-11-07 17:16:53 +05:00
Paal Braathen
2e89efa1bc When using Start-Transcript and file exists, empty file rather than deleting (#8131) 2018-11-07 08:34:42 +05:00
Travis Plunk
5e47c73e27
Fix static secret in code (#8186) 2018-11-05 18:29:04 -08:00
Aditya Patwardhan
b5ab2ddd40 Load assembly from module base path before trying to load from GAC (#8073)
[Breaking Change]
When a binary module has the module assembly in GAC, we load the assembly from GAC before trying to load it from module base path.

This change attempts to load it from module base path before looking up in GAC.
2018-11-05 10:41:53 -08:00
Andrew Schwartzmeyer
54874180ce Remove build and doc references to Git submodules (#8177)
As of #7892, the PowerShell repository no longer uses Git submodules.
This is fantastic from a workflow standpoint, and so all the notes about
how to deal with submodules (and all the build steps explicitly
initializing and updating submodules) can be safely removed.
2018-11-05 10:39:29 -08:00
Robert Holt
5d06fba366 Refactor module version/GUID comparison logic (#7125) 2018-11-01 13:41:51 -07:00
Travis Plunk
c6910a12fa Fix conflict with Get-AdlStoreChildItem from az module in tab completion tests (#8167) 2018-11-01 12:03:03 -07:00
PRASOON KARUNAN V
f59353d5d9 Error message enhancement for clear-content cmdlet when targeting a directory (#8134) 2018-11-01 08:56:45 +05:00
Steve Lee
1eec123f48 Create $PROFILE if it does not exist for -WorkingDirectory processing test (#8152) 2018-10-30 22:06:19 -07:00
Paul Higinbotham
20f3a6a337 Experimental feature: Implicit remoting batching perf improvement (#8038) 2018-10-30 09:55:39 -07:00
Steve Lee
1aa5bb3576 Honor -OutputFormat if specified in noninteractive, redirected, encoded command used with pwsh (#8115)
[Breaking Change]

There is specific code that sets the `OutputFormat` to xml if pwsh is run non-interactive, with redirected output, and the command was encoded.  However, it ignored whether OutputFormat was specified.  Fix is to track whether `-OutputFormat` was used and respect that value rather than defaulting to xml.

Fix https://github.com/PowerShell/PowerShell/issues/5912
2018-10-29 17:51:21 -07:00
Steve Lee
b1e2745b53 move processing of -WorkingDirectory before processing of profiles (#8079) 2018-10-29 13:56:13 -07:00
dependabot[bot]
b3f315eb15 Bump xunit from 2.4.0 to 2.4.1 (#8140) 2018-10-29 13:28:02 -07:00
dependabot[bot]
cbfe2c8fe8 Bump xunit.runner.visualstudio from 2.4.0 to 2.4.1 (#8139) 2018-10-29 13:27:25 -07:00
Steve Lee
b27380dc51 Enable case-insensitive tab completion for files and folders on case-sensitive filesystem (#8128) 2018-10-28 09:48:49 +05:00
Steve Lee
9141b11c5e Enable Set-Location -LiteralPath to work with folders named "-" and "+" (#8089) 2018-10-24 09:37:59 +05:00
Steve Lee
082c3b0bae Enable Add-Content to share read access to other tools while writing content (#8091) 2018-10-23 16:27:53 -07:00
Patrick Meinecke
57bf508fec Fix static method invocation type inference (#8018)
Fixes type inference for static method invocations (e.g. [powershell]::Create()).
2018-10-23 16:58:31 +05:00
Steve Lee
3ceb1c17ef Fix logic to not rely on build number to determine whether to output formatdata (#8063) 2018-10-19 12:45:03 -07:00
Steve Lee
4e5e3900f6 Allow dynamic parameter to be returned even if path matches nothing (#7957) 2018-10-18 11:44:08 -07:00
Ilya
f1e2136a2b
Add -Name, -NoUserOverrides and -ListAvailable parameters to Get-Culture cmdlet (#7702)
Add new parameters in Get-Culture cmdlet:
-Name - to allow retrieving a specific culture
-NoUserOverrides - ignore user changes for current culture
-ListAvalable - to allow retrieving all cultures supported on the platform
2018-10-18 17:34:34 +05:00
Ilya
745e305ac5
Add new Offset and Count parameters to Format-Hex and refactor the cmdlet (#7877)
- Add new Offset and Count parameters.
- Modify ByteCollection class to support offsets up to UInt64.MaxValue size.
- Hide/obsolete Raw parameter because the behavior is by default.
- Optimize conversion to bytes to reduce allocations for large input data.
2018-10-18 10:03:59 +05:00
Joel Sallow
33f2f0faaf Add Type Inference for $_ / $PSItem in catch{ } blocks (#8020) 2018-10-18 09:42:16 +05:00
Aditya Patwardhan
d99afc46df Merged PR 5382: Add missing dependency
Add missing dependency
2018-10-16 21:28:42 +00:00
Aditya Patwardhan
1e31e707c8 Merged PR 5363: Version and doc changes
Version and doc changes
2018-10-15 20:24:00 +00:00
Steve Lee
8bca5a6017 Allow root node of format.ps1xml to have attributes that are ignored (#7987) 2018-10-12 11:31:21 -07:00
Steve Lee
b62e152f4d Improve error message on non-Windows when importing clixml with securestring (#7997) 2018-10-12 10:56:35 -07:00
Dongbo Wang
9b94f18ccf
Fix BeginInvoke/EndInvoke to return results when Stop or BeginStop/EndStop was called previously (#7917)
The root cause is that `OutputBuffer` is not cleaned up (set to `null`) in `Stop` and `BeginStop/EndStop` when the powershell instance owns the `OutputBuffer` object. Since the pipeline has been intentionally stopped by the caller, the `OutputBuffer` should be set to `null` as well when it's owned by the PowerShell instance, just like how it's cleaned up in `EndInvoke`.
2018-10-12 10:46:57 -07:00
Steve Lee
5b4e9a9881 Change API to match cmdlet which is more reliable in AzDevOpsPipelines Windows (#8003) 2018-10-11 15:52:12 -07:00
Steve Lee
5bc76bd912 Remove package tests as we have DependABot enabled to keep packages updated (#8001) 2018-10-11 14:03:41 -07:00
Ilya
17fd2e9392 Revert "Only display properties with values for MeasureInfo (#7104)" (#7754)
This reverts commit 87ccd0aa40 until
security review of the public api has been completed.
2018-10-11 12:48:46 -07:00
Patrick Meinecke
680ad9c835 Fix Property and ScriptBlock expressions in EntrySelectedBy tags within custom controls (#7913)
Send the current object when evaluating `EntrySelectedBy` in a custom control definition
2018-10-11 21:09:39 +05:00
Joel Sallow
e660e9623a Add support for Byte Literals (#7901)
- Adds y suffix that is used to specify a numeric literal as the sbyte data type. 
- Can be combined with the existing u suffix as uy to specify the byte data type.
2018-10-11 17:40:58 +05:00
Christoph Bergmeister [MVP]
fe731eda14 Use dotnet test since the dotnet xunit test runner has been deprecated (#7980) 2018-10-09 20:55:41 -07:00
Sergey Vasin
3b3160841e Standardize Pester syntax in 'ReplaceOperator.Tests.ps1' (#7963) 2018-10-08 23:15:53 -07:00
dependabot[bot]
6b6d5e3fd1 Bump Xunit.SkippableFact from 1.3.6 to 1.3.12 (#7972)
Bumps [Xunit.SkippableFact](https://github.com/AArnott/Xunit.SkippableFact) from 1.3.6 to 1.3.12.
- [Release notes](https://github.com/AArnott/Xunit.SkippableFact/releases)
- [Commits](https://github.com/AArnott/Xunit.SkippableFact/compare/v1.3.6...v1.3.12)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-10-08 11:07:54 -07:00
Topping
20b2e3df37 No longer skips a column without name if double quote delimiter is used in Import-Csv (#7899) 2018-10-05 09:15:56 +05:00
Ilya
371d25a74b Update to .NET Core 2.1.5 with SDK 2.1.403 (#7936) 2018-10-03 13:31:56 -07:00
Ilya
450d884668
Add test for $error[0] tab completion (#7924) 2018-10-03 12:34:21 +05:00
Ilya
d862d4075f
Add EscapeHandling parameter in ConvertTo-Json cmdlet (#7775)
Add EscapeHandling parameter in ConvertTo-Json cmdlet to allow escape the HTML (<, >, &, ', ") and control characters (e.g. newline).
2018-10-02 10:54:33 +05:00
Ilya
0727f96d97
Replace hang term (#7902) 2018-10-02 08:11:38 +05:00
Robert Holt
649d342a07 Replace test certificates with self-signed certificate generating command (#7875) 2018-10-01 14:40:48 -07:00
Benjamin P. McKenna
39252b4938 Add '%F' case to Get-Date -UFormat (#7630) 2018-10-01 08:39:14 +05:00
James Truher [MSFT]
98cf44cdec Test changes needed for running in a container (#7869) 2018-09-28 13:49:31 -07:00
Steve Lee
cc44781b5b Ensure NestedModules property gets populated by Test-ModuleManifest (#7859) 2018-09-28 13:28:08 -07:00