ghantoos / lshell

lshell is a shell coded in Python, that lets you restrict a user's environment to limited sets of commands, choose to enable/disable any command over SSH (e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing restriction, and more.
GNU General Public License v3.0
435 stars 112 forks source link

Character width detection fails with user default shell #135

Open GieltjE opened 8 years ago

GieltjE commented 8 years ago

There appears to be a big difference when launching the shell from bash or configuring it as a default shell. When launched as default shell via putty it will ignore width updates and overwrite the current line when the text overflows.

Steps to reproduce: 1: Set lshell binary in /etc/passwd as shell 2: Open a ssh session via putty (windows) 3: Login 4: Maximize the window 5: Type a long command line (or just garbage text), when the orriginal shell width is exceeded it will start overwriting at the start of the command line (not on a new line)

ghantoos commented 8 years ago

Hello,

This looks like a Python readline issue. What version of Python are you running?

Here is a similar issue that was fixed after Python 2.7, 3.5 and 3.6: https://bugs.python.org/issue23735

GieltjE commented 8 years ago

Two versions are installed: python-2.7.9-2 python-3.4.2-2

ghantoos commented 8 years ago

This is definitely not a lshell module bug, but a bug from a module beneath. The issue I stated was corrected about a month ago, I am not sure that it has already been packaged in what seems to be a Debian based distro (from you versioning). I need to look into this more deeply.

GieltjE commented 8 years ago

Debian is correct, Jessie to be precise, if I can help debug something please let me know.

ghantoos commented 8 years ago

@GieltjE I have tried to reproduce it by launching putty via wine (I don't have access to any windows machine). Unfortunately, I was unable to reproduce the bug, the lines are correctly refreshed when a minimize/maximize my window.

There is a minor display bug that I am able to generate, but it is easily removed using ctrl-l to clear the terminal.

GieltjE commented 8 years ago

Unfortunately it is still present, what can I do to help debugging?