Block getting help from network locations in restricted remoting session#20593
Conversation
…ions Cherry picked from !27698 # Conflicts: # src/System.Management.Automation/engine/Utils.cs # test/tools/Modules/HelpersCommon/HelpersCommon.psd1 # test/tools/Modules/HelpersCommon/HelpersCommon.psm1
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
| return false; | ||
| #else | ||
| return path.StartsWith(@"\\.\") || path.StartsWith(@"\\?\"); | ||
| // device paths can be network paths, we would need windows to parse it. |
There was a problem hiding this comment.
This had a merge conflict, I could not find a good reason why.
| 'Test-PSDefaultParameterValue' | ||
| 'Push-DefaultParameterValueStack' | ||
| 'Pop-DefaultParameterValueStack' | ||
| 'Get-HelpNetworkTestCases' |
There was a problem hiding this comment.
This had a merge conflict because this branch has new changes.
| return $false | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
This had a merge conflict because this branch has new changes.
…owCommand Fixes issue introduced in PowerShell#20593
PR Summary
Block getting help from network locations in restricted remoting session (JEA, exchange remoting, and similar custom remoting sessions)
PR Context
This was already released in the servicing releases.
This is mitigated if the restricted proxy is used for get-help or if the file system provider is hidden for the session, but not all customers implemented this way.
We have already documented that you should have these other protections in place to protect these scenarios:
https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/security/securing-restricted-sessions?view=powershell-7.3
Defense in depth security fix
Conflicts:
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).