-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
This is a remoting incompatibility introduced in PowerShell 6.0. Remoting supports host callbacks to the client and the callback information includes type information and values for passed parameter arguments. For example a PromptForChoice callback passes a ChoiceDescription type argument, which includes fields "label" and "message". But PowerShell 6.0 changed the field names to "_label" and "_message". When decoding the host callback message these fields names do not exist on the client and the argument decode fails with a null reference exception:(https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/engine/remoting/common/WireDataFormat/RemoteHostEncoder.cs#L95).
We need to go through all supported host callbacks and ensure all types have not modified field names. There are only a few callbacks supported so this shouldn't be too bad.
Steps to reproduce
PS [PowerShellCore 6.0] > Enter-PSSession -cn localhost -config microsoft.powershell
[localhost (PowerShell 5.1)]: C:\> Install-Module RazzleActual behavior
Null reference exception in remote decoder when handling PromptForChoice callback.