Michael Jumper commented on GUACAMOLE-681:

The session is not hanging - the terminal emulator is waiting for the 
incomplete OSC sequence to be completed. From the "console_codes" man page:

... These are a few of the OSC control  sequences recognized by xterm(1):

       ESC ] 0 ; txt ST        Set icon name and window title to txt.
       ESC ] 1 ; txt ST        Set icon name to txt.
       ESC ] 2 ; txt ST        Set window title to txt.
       ESC ] 4 ; num; txt ST   Set ANSI color num to txt.

That last sequence there, {{ESC ] 4 ; ...}} is what is sent by the "1b5d343b" 
part of that hex sequence. The final 0x0A in the sequence noted above would be 
interpreted as the palette number. In the case of Guacamole's terminal 
emulator, that non-numeric character would just be ignored and the terminal 
emulator would continue to wait for the rest of the sequence. It looks like 
other terminal emulators may just bail out at that non-numeric character. I'm 
not sure whether either behavior is actually defined/standardized.

> Color palette OSC sequence crashing SSH
> ---------------------------------------
>                 Key: GUACAMOLE-681
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-681
>             Project: Guacamole
>          Issue Type: Bug
>          Components: SSH
>    Affects Versions: 0.9.14
>         Environment: Newest docker versions of guacd and guacamole, running 
> on Unraid. Client is connecting from Chromium on Arch Linux.
>            Reporter: Patrick Collins
>            Priority: Critical
> Based on 
> [this|https://issues.apache.org/jira/projects/GUACAMOLE/issues/GUACAMOLE-277] 
> issue, it seems Guacamole is supposed to work with Linux console codes.
> I'm getting reliable crashes when printing certain console codes in a 
> Guacamole SSH session; notably ones printed by .bashrc in [some 
> configurations|https://github.com/dylanaraps/pywal].
> When printed directly on the device, (whether on a tty or a terminal 
> emulator,) the codes work.
> When printed in Guacamole, they immediately crash the session; prompting 
> reconnection.
> This command is enough to crash the session:
> {code:java}
> echo 1b5d343b0a | xxd -r -p{code}
> (It converts some hex to 'ESC []4;' and prints it.)
> Apologies if the priority of this issue is inappropriate; I based it off the 
> "crashes" criterion; but I'm not certain to what extent the program has to 
> crash to qualify.

This message was sent by Atlassian JIRA

Reply via email to