-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Block getting help from network locations in restricted remoting session #20593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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) |
@@ -1256,7 +1256,8 @@ internal static bool PathIsDevicePath(string path) | |||
#if UNIX | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This had a merge conflict, I could not find a good reason why.
@@ -48,6 +48,7 @@ FunctionsToExport = @( | |||
'Test-PSDefaultParameterValue' | |||
'Push-DefaultParameterValueStack' | |||
'Pop-DefaultParameterValueStack' | |||
'Get-HelpNetworkTestCases' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This had a merge conflict because this branch has new changes.
@@ -533,3 +533,87 @@ function Pop-DefaultParameterValueStack { | |||
return $false | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).