* Both web and desktop clients check for X.224 negotiation failure data
in RDCleanPath error responses before falling back to generic errors
* When X.224 Connection Confirm failure is found, convert to specific
NegotiationFailure error type instead of generic RDCleanPath error
* Enable clients to show meaningful error messages like "CredSSP
authentication required" instead of generic connection failures
* Maintain backward compatibility - existing proxies sending empty
x224_connection_pdu continue working as before
* Helper for proxies creating an RDCleanPath error with server response
This PR changes the session to not return an error on the connection
stage. The `iron-remote-desktop` raises `TERMINATED` instead of `ERROR`,
because `ERROR` is now handled as non-critical and does not close the
session.
When the system clipboard updates, we receive an `Updated` event. Then
we try to open it, but we can get `AccessDenied` error because the
clipboard may still be locked for another window (like _Notepad_). To
handle this, we have special logic that attempts to open the clipboard
in the event of such errors.
The problem is that nothing in the code actually sets the
`ClipboardAccessDenied` error to be able to run the retrieval logic.
This PR fixes it.
`mixed_read_write_in_expression` checks for a read and a write to the
same variable, where whether the read occurs before or after the write
depends on the evaluation order of sub-expressions.
This resolves an issue with Unicode input that happens under Chrome.
where entering `Alt` codes results in broken modifier state and broken
input in general.
This happens because of how _Chrome_ handles `KeyboardEvent` key and
code in this particular case. For example, holding `Alt`, pressing 1, 2,
3 on a numpad, then releasing `Alt` will result in events with the
following key/code values being passed to `sendKeyboard`:
`{ "key": "Alt", "code": "AltLeft" ,"type": "keydown" }`
`{ "key": "1", "code": "Numpad1" ,"type": "keydown" }`
`{ "key": "1", "code": "Numpad1" ,"type": "keyup" }`
`{ "key": "2", "code": "Numpad2" ,"type": "keydown" }`
`{ "key": "2", "code": "Numpad2" ,"type": "keyup" }`
`{ "key": "3", "code": "Numpad3" ,"type": "keydown" }`
`{ "key": "3", "code": "Numpad3" ,"type": "keyup" }`
`{ "key": "{", "code": "AltLeft" ,"type": "keyup" }`
Without this fix, this will send Unicode `{` instead of plain `Alt` to
the RDP server, messing up the `Alt` code sequence and leaving `Al` in
pressed state.
For comparison, in _Firefox_ last event looks like this: `{ "key":
"Alt", "code": "AltLeft","type": "keyup" }`