LibSSH-ESP32 icon indicating copy to clipboard operation
LibSSH-ESP32 copied to clipboard

encoding problems

Open h-enes-simsek opened this issue 3 years ago • 1 comments

Hello, firstly thanks for your effort. I noticed a very little problem in samplesshd-kbdint.ino file.

There is line like that (in 471) if(*buf == '' || *buf == '')

I checked these unprintable chars and found \x3 and \x4. Compiled code flow is perfect, when i send \x3 or \x4 via ssh, server shutdown itself as it should be.

However, having these chars as "square" or "question mark" seems buggy. And not all text editor supports these unprintable chars. (eg chrome search bar)

It is very easy to fix it. We can use following line instead: if(*buf == '\x3' || *buf == '\x4')

I did not make pull request because of boring contributing rules for this simple change. I hope someone will fix it if they find rational. Thanks for nice lib again.

h-enes-simsek avatar Feb 13 '22 19:02 h-enes-simsek

I can confirm this is from the upstream example from libssh. If/when it is changed upstream then I can re-port the example.

ewpa avatar Feb 14 '22 23:02 ewpa