-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
Adds Mask Input Parameter to Read-Host
#10908
Conversation
src/System.Management.Automation/engine/remoting/server/ServerRemoteHostUserInterface.cs
Show resolved
Hide resolved
src/Microsoft.PowerShell.Commands.Utility/commands/utility/ReadConsoleCmdlet.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/remoting/server/ServerRemoteHostUserInterface.cs
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs
Show resolved
Hide resolved
My concern would be that this, https://github.com/PowerShell/PowerShell/pull/10908/files#diff-fff8012934f59c558d7de1adeca99bf1R208, is used in some existing remoting scenario.
|
@PowerShell/powershell-committee reviewed this and is ok with the proposed switch name and functionality. |
@davinci26 can you resolve the merge conflict? |
@PoshChan please retry windows and static |
@davinci26, you are not authorized to request a rebuild |
@SteveL-MSFT FYI I have fixed all merge conflicts. |
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
@TravisEz13 It seems the PR ready to merge. |
Read-Host
@davinci26 Thanks for your contribution! |
🎉 Handy links: |
PR Summary
Issue
Adds #10847
Implementation
PSHostUserInterface
class with avirtual
methodReadLineMaskedAsString
. This method is in betweenReadLine
andReadLineAsSecureString
.InternalHostUserInterface.cs
Check at runtime if the user has provided bothUse parameter sets to make-MaskInput
and-AsSecureString
and if so throw an exception.-MaskInput
and-AsSecureString
mutually exclusive (this is another application for Parameters Should Support Mutual Exclusion Natively #5175)Happy Hacktoberfest!
PR Context
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.