usr/bin/byobu-config: prevent the user from changing the escape sequence

to / or \, both of which cause problems, LP: #581533
This commit is contained in:
Dustin Kirkland 2010-06-03 01:22:51 -05:00
commit a9e45c52df
2 changed files with 5 additions and 0 deletions

2
debian/changelog vendored
View file

@ -9,6 +9,8 @@ byobu (2.78) UNRELEASED; urgency=low
-UDR (which detached and logged out other connections on reattach); -UDR (which detached and logged out other connections on reattach);
feedback was negative on this one, numerous questions in IRC, LP: #589027 feedback was negative on this one, numerous questions in IRC, LP: #589027
* usr/bin/byobu-select-session: allow for default selection of session 1 * usr/bin/byobu-select-session: allow for default selection of session 1
* usr/bin/byobu-config: prevent the user from changing the escape sequence
to / or \, both of which cause problems, LP: #581533
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 01 Jun 2010 10:53:54 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 01 Jun 2010 10:53:54 -0500

View file

@ -483,6 +483,9 @@ def chgesc(screen, size):
val=esc.value() val=esc.value()
if len(val) > 1: if len(val) > 1:
esc.set(val[1]) esc.set(val[1])
# Ensure that escape sequence is not \ or /
if val == '/' or val == '\\':
esc.set(DEF_ESC)
# Ensure that the escape sequence is not set to a number # Ensure that the escape sequence is not set to a number
try: try:
dummy = int(esc.value()) dummy = int(esc.value())