Commit Graph
1731 Commits
Author SHA1 Message Date
Aditya Patwardhan bd1e9815b3 Merged PR 9088: Update runtime framework and SDK version for test 2019-07-09 20:02:28 +00:00
Paul Higinbotham 9804aba7e1 Merged PR 8969: Disable Enter-PSHostProcess cmdlet when system in lock down mode
This is based on an issue, where Enter-PSHostProcess on a locked down (WDAC enforced) machine allows any admin to connect to any another local hosted PowerShell process and execute commands as that user.  This amounts to privilege escalation on the policy locked down machine and something we want to prevent.

Fix is to check for system lock down and disable Enter-PSHostProcess cmdlet with an error message.
2019-07-08 19:12:11 +00:00
Travis Plunk 604224f2e3 Merged PR 8529: Make Hashtable case insensitivity test use current culture rather than shell to set culture 2019-07-08 11:35:49 -07:00
dependabot-preview[bot] 2b007a9d58 Build(deps): Bump Microsoft.ApplicationInsights from 2.9.1 to 2.10.0 (#9757) 2019-07-08 10:45:58 -07:00
Travis Plunk a7af714d3f Merged PR 8428: Disable debugger in System Lock down mode
disable debugger in System Lock down mode
2019-05-16 20:17:31 +00:00
Aditya Patwardhan 2d1fc730c7 Merged PR 8394: Port release automation changes into 6.2.1 2019-05-15 00:12:12 +00:00
Aditya Patwardhan 52cd7c95b2 Merged PR 8375: Update package version in hosting test
Update package version in hosting test
2019-05-14 21:02:06 +00:00
Travis Plunk de5e1aa8c4 Partially revert "Fix the failed test and update 'Publish-TestResults' to make AzDO fail the task when any tests failed (#9457)"
This reverts commit 3fc464d84b.
2019-05-14 12:51:04 -07:00
Travis Plunk 93b24b71df Bump to dotnet 2.1.11 release 2019-05-14 11:18:48 -07:00
Dongbo Wang 3fc464d84b Fix the failed test and update 'Publish-TestResults' to make AzDO fail the task when any tests failed (#9457)
# Conflicts:
#	test/powershell/Modules/Microsoft.PowerShell.Management/Set-Location.Tests.ps1
2019-05-13 14:51:32 -07:00
Tyler James Leonhardt b27217d1f6 Add wildcard back to end of tab completion command lookup (#9383)
Re-add wildcard when searching AST + Missed test case.

## PR Context

In #8109, we removed the line that added a wildcard to the end of the command that was used to match commands in the script AST. This readds that line closer to where it is used.
2019-05-13 14:51:32 -07:00
dependabot[bot] ae6b9743f2 Build(deps): Bump gulp from 4.0.1 to 4.0.2 in /test/common/markdown (#9545) 2019-05-13 14:04:25 -07:00
dependabot[bot] 20970af898 Build(deps): Bump gulp from 4.0.0 to 4.0.1 in /test/common/markdown (#9443) 2019-04-25 16:28:42 -07:00
Steve LeeandTravis Plunk 9a2ed974fd Fix skipping of tests in RemoteSession.Basic.Tests.ps1 (#9304)
Moved check if able to write to $PSHome as way to skip test to `BeforeAll` which already contained a check if running on Windows.

## PR Context

As part https://github.com/PowerShell/PowerShell/pull/9279, tests were updated to be skipped if the test requires writing to `$PSHome` but is not able to.  However, these tests already had a skip mechanism in place so the additional check caused the test to run when it should have skipped.

Co-authored-by: Travis Plunk <github@ez13.net>
2019-04-15 14:29:52 -07:00
Steve LeeandTravis Plunk efe9f99f1a Update tests to account for when $PSHOME is readonly (#9279)
Co-Authored-By: SteveL-MSFT <slee@microsoft.com>


Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
2019-04-15 14:29:42 -07:00
Travis Plunk 5f53274ba7 Mark tests in macOS CI which use applescript as pending/inconclusive (#9352)
Mark tests in macOS CI which use applescript as pending/inconclusive

# Conflicts:
#	build.psm1
2019-04-15 13:21:49 -07:00
Steve LeeandTravis Plunk 9e608ac55f Enable SecureString cmdlets for non-Windows (#9199)
On Unix systems, fallback to plaintext manipulation instead of using the DPAPI which is not available.

## PR Context

Currently, existing scripts that use SecureString cmdlets fail with an error complaining about crypt32.dll not being available.  This change allows these cmdlets to be used, but there is no encryption of the string.
.Net already [states](https://docs.microsoft.com/en-us/dotnet/api/system.security.securestring?view=netcore-2.1#remarks) that the contents of a SecureString are not encrypted on .Net Core.

Fix https://github.com/PowerShell/PowerShell/issues/1654

Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
2019-03-25 10:01:11 -07:00
Travis Plunk f581ea657d Add Obsolete message to Send-MailMessage (#9178)
Add Obsolete message to Send-MailMessage

## PR Context

See https://github.com/PowerShell/PowerShell-RFC/pull/160

Co-authored-by: Steve Lee <slee@microsoft.com>
Co-authored-by: Ilya <darpa@yandex.ru>
# Conflicts:
#	test/powershell/Modules/Microsoft.PowerShell.Utility/Send-MailMessage.Tests.ps1
2019-03-25 10:00:42 -07:00
Travis Plunk e0d5dfd828 Fix Enter-PSHostProcess tests flakiness (#9007) 2019-03-21 14:28:49 -07:00
Staffan Gustafsson cb49c77591 Adding CmdletsToExport and AliasesToExport to test module manifests. (#9108) 2019-03-21 14:22:36 -07:00
Travis Plunk 289ac4f551 Add tests for command globbing (#9180)
Add tests for command globbing
  - Also, add `-noprofile` to places where `pwsh` is launched so they don't fail locally.
2019-03-21 14:18:23 -07:00
Dongbo Wang 775a2ebbdf Make 'Start-Job' throw terminating error when PowerShell is being hosted (#9128) 2019-03-21 14:14:23 -07:00
Joel Sallow (/u/ta11ow) ea4bf50623 Fix -NoEnumerate behaviour in Write-Output (#9069)
Fix is to preserve input collection type in output.
The regression was caused by #2038
2019-03-13 13:32:51 -07:00
James Truher [MSFT] f80a0053e7 Fix tab completion test to handle multiple matches (#8891) 2019-03-13 13:20:50 -07:00
Dongbo Wang fefe5638e7 Update the task-based async APIs added to PowerShell to return a Task object directly (#9079)
Update the task-based async APIs added to PowerShell to not use the `aysnc/await` keywords, but to return a `Task` object directly.
There is nothing to continue on after the `Task.Factory.FromAsync` call in those methods, so there is not need to use `aysnc` and `await` keywords, which turns the method into a state machine class unnecessarily.
2019-03-13 13:13:11 -07:00
Kirk Munro 7482cbf5aa Add 5 'InvokeAsync' overloads and 'StopAsync' to the 'PowerShell' type (#8056) 2019-03-13 13:09:25 -07:00
Reece Dunham a4517c015b Added RequireSudoOnUnix tags to PowerShellGet tests and unmark as pending (#8954) 2019-03-13 13:03:46 -07:00
dependabot[bot] 9b39b1bc4f Build(deps): Bump SelfSignedCertificate in /test/tools/Modules (#9055) 2019-03-13 13:02:58 -07:00
Aditya Patwardhan 7747ed67d2 Update version for PowerShell.Native and hosting tests (#8983) 2019-03-13 13:02:07 -07:00
Ilya 6912a91d0f Pending NamedPipeConnectionInfo test (#9003)
Related #8971. Pending the test until we fix a root case of failure.
2019-03-13 12:55:43 -07:00
mjanko5 477ad564b6 Add test for -WhatIf for New-FileCatalog (#8966) 2019-03-13 12:55:29 -07:00
Dongbo Wang 5d54f1aa38 Make xUnit tests run sequentially to avoid race conditions caused by manipulating 'powershell.config.json' in tests (#8945) 2019-02-22 11:57:10 -08:00
Tyler James Leonhardt 23eccfd641 [feature] Add -CustomPipeName to pwsh and Enter-PSHostProcess (#8889)
This allows a user to start PowerShell up with the name of the named pipe that is used for cross process communication (I.e. Enter-PSHostProcess).
2019-02-22 23:40:03 +05:00
Andrea Spadaccini af86157855 Fix typo: aganist ➜ against (#8943) 2019-02-22 18:46:31 +05:00
Ilya 778920bbc4 Use verbatim string literals for paths (#8937) 2019-02-22 11:35:32 +05:00
Travis Plunk 57aeca428e Port Security bypass fixes from 6.1.3 (#8915) 2019-02-21 13:44:08 -08:00
Travis Plunk 2c488fb4e5 Fix Markdown lint issues (#8929)
#8896 Broke the static analysis CI.  Fixing so CI passes
2019-02-20 13:24:26 -08:00
Steve Lee b06ad6aa61 Enable discovering modules that have names same as a culture (e.g. Az) (#8777)
Here are the major changes:
- Add logic to skip checking for possible resource directories for the first set of sub directories from the top level.
- There was an additional skip if the folder is hidden, rather than doing an explicit attribute check, change the `EnumerationOption` to skip hidden folders.
- Since the `IsPossibleModuleDirectory()` helper now only checks to see if the name matches a culture, renamed to `IsPossibleResourceDirectory()`
- When getting the default modules, we don't search recursively into individual module folders, so removed additional check for possible resource directory.
2019-02-20 12:23:27 -08:00
Reece Dunham 4de3a72142 Fix code-of-conduct linting (#8896) 2019-02-20 11:57:31 +05:00
Adam Gauthier caf8ac6a6a Add configurable maximum depth in ConvertFrom-Json with -Depth (#8199)
Adds an optional -Depth parameter to the cmdlet which lets the user to specify a maximum depth allowed for deserialization, which will overwrite the default maximum of 1024.
2019-02-20 10:37:37 +05:00
Mathias R. Jessen 0a570211df Flatten interface hierarchy when generating properties that implement interface properties (#8382)
`TypeBuilder.GetInterfaces()` returns only the interfaces that was explicitly passed to its constructor, so we need to flatten the interface hierarchy in order to properly support inherited interfaces.
2019-02-19 15:02:34 -08:00
Reece Dunham c14d5dd67f Remove some of the last AppVeyor references (#8867)
This removes some of the last mentions of the AppVeyor name.  Don't change the title, we don't want the word to appear in the CLs
Also problem: the last references are in the changelogs but I don't want to modify them without committee approval.  

## PR Context  

it was removed, #8686
2019-02-19 12:44:00 -08:00
Travis Plunk 60ab54d737 Port DotNet fixes from 6.1.3 (#8914)
Addresses CVE-2019-0657
2019-02-19 10:45:40 -08:00
Reece Dunham 6cab2b474d Remove yet another appveyor reference (#8854) 2019-02-11 10:28:41 -08:00
Reece Dunham 3ab7e2ec4d Remove extra AppVeyor environment check (#8709)
Removes a check for AppVeyor env

## PR Context  
AppVeyor removed (#8686  extension)
2019-02-08 10:57:41 -08:00
Steve Lee 26a58670c1 Enable creating relative symlinks on Windows with New-Item (#8783) 2019-02-07 11:44:23 -08:00
Bruce Payette 6bc6257a55 Allow .exe files to be used as IL binary modules (#7281)
Fix for #6741 Allow .exe files to be used as binary modules. Basically anywhere a .dll could be used with modules, you can now use a .exe file. Also did a little clean up, replacing constant strings with the StringLiteral values instead.
2019-02-07 11:24:06 -08:00
Joel Sallow (/u/ta11ow) 130298bfae Parse numeric strings as numbers again during conversions (#8681) 2019-02-04 12:22:05 -08:00
Travis Plunk 003a141f31 Remove directory causing static analysis failure (#8812)
Remove directory causing static analysis failure
2019-02-01 18:03:12 -08:00
Steve Lee 313c8c06a1 Enable Write-Information to accept $null (#8774) 2019-01-31 13:16:34 -08:00