Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remoting host callbacks incompatible between PowerShell 5.1 and 6.0 #4615

Copy link
Copy link
@PaulHigin

Description

@PaulHigin
Issue body actions

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 Razzle

Actual behavior

Null reference exception in remote decoder when handling PromptForChoice callback.
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productOS-WindowsResolution-FixedThe issue is fixed.The issue is fixed.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.