~sircmpwn/hiprompt-gtk-py

d4e385531caac0e25176764ba3c87d06e6e3ec11 — Alexey Yerin 2 years ago 9c457a9
Fix handling of sys.stdin.readline() result

It includes the newline and not checking for it caused incorrect
password command to be interpreted as correct.
1 files changed, 1 insertions(+), 1 deletions(-)

M hiprompt_gtk/proto.py
M hiprompt_gtk/proto.py => hiprompt_gtk/proto.py +1 -1
@@ 49,7 49,7 @@ class Session:
        sys.stdout.flush()
        # TODO: Don't block
        line = sys.stdin.readline()
        if line == "incorrect-password":
        if line == "incorrect-password\n":
            return False
        else:
            return True