msknathan / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

Window title report is a fake #303

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. echo -e "\e[21t"

What is the expected output? What do you see instead?
Expected: current window title (embedded in control sequence)
Received: "l" (embedded in control sequence)
(As long as the proper title is not reported, it would be better to respond 
nothing.)

Please use labels and text to provide additional information.
termout.c:do_winop sends the dummy
winmain.c:win_copy_title seems to retrieve the desired information already, 
would just need to be converted from wchar

Original issue reported on code.google.com by towom...@googlemail.com on 17 Nov 2011 at 12:23

GoogleCodeExporter commented 9 years ago
The xterm documentation says that the reply to that sequence shall be 'OSC l 
label ST'. Hence mintty is responding with an empty title. This is inherited 
from PuTTY and is done for security reasons: setting and then querying the 
title allows to send arbitrary text as if typed at the keyboard.

On the other hand, xterm addresses the security concern by just ignoring the 
sequence completely unless it's enabled via resources. Hence, as suggested, 
I've dropped the empty response in r1234.

Original comment by andy.koppe on 18 Nov 2011 at 5:45

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 18 Nov 2011 at 5:45

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 19 Nov 2011 at 8:08

GoogleCodeExporter commented 9 years ago
Thanks Andy; I hadn't noticed the "l" is part of the embedding sequence here.
In that case, actually it could have stayed as it was (so a requesting 
application won't have to timeout) but that doesn't matter.

Apparently due to this security concern, xterm had introduced (in 251) the 
title (and icon title) push/pop sequences, CSI [ 22/23 t, which work also when 
allowWindowOps is disabled.
So adding that feature would be the better solution.

Original comment by towom...@googlemail.com on 21 Nov 2011 at 3:18

GoogleCodeExporter commented 9 years ago
Thanks for pointing out xterm's title stack feature. I've entered issue 304 for 
that.

Original comment by andy.koppe on 21 Nov 2011 at 8:31