https://bugzilla.mindrot.org/show_bug.cgi?id=2477

            Bug ID: 2477
           Summary: backspace in interactive session does not delete
                    multi-byte Unicode characters correctly
           Product: Portable OpenSSH
           Version: 7.1p1
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: sshd
          Assignee: unassigned-b...@mindrot.org
          Reporter: jje...@redhat.com

Created attachment 2723
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2723&action=edit
patch adding IUTF8 flag, if available

After report in our bugzilla [1] about utf8 support in remote terminals
I dived a bit into this topic and found that openssh doesn't count with
termios flag IUTF8 for handling utf8 characters interactively. This
flag exists for some time and is available in Linux kernel since
version 2.6. Really nice article [2] describes this issue (last
paragraph).

Minimal test case is also described in original bugzilla, but I will
copy it also here:

1. ssh to machine with openssh
2. $ cat > test
3. Use this as a input for cat command:
Á<press backspace once><press CTRL+D><press CTRL+D>
4. $ hexdump test

Actual results:
0000000 00c3                                   
0000001

Expected results:
The file "test" should be empty.

Solution is quite simple. Adding this this mode into ttymodes.h solves
this issue. Problematic is that this changes things on both sides to
apply.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1270248
[2] https://www.cl.cam.ac.uk/~mgk25/unicode.html#mod

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to