Skip to content
This repository was archived by the owner on Aug 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request #249 from haliphax/profile-timeout-bounds-check
Browse files Browse the repository at this point in the history
graceful failure for invalid timeout_val
  • Loading branch information
jquast committed Feb 15, 2015
2 parents bcd3edc + 11e281c commit fb1af68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
2.0.6
- bugfix: invalid values for idle timeout in profile.py would cause an error
- bugfix: ASCII colly diz with extended chars was causing an error
- deprecation: the "extras" subfolder of default script has been
moved to https://github.com/x84-extras
Expand Down
5 changes: 4 additions & 1 deletion x84/default/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,10 @@ def do_command(term, session, inp, fields, tgt_user, point):
if field_name == 'timeout':
# coerce to integer, set, and if tgt_user is our current
# user, then send new value for as engine event
timeout_val = int(inp)
try:
timeout_val = int(inp)
except ValueError:
return True
if tgt_user.handle != 'anonymous':
tgt_user[field_name] = timeout_val
if tgt_user.handle == session.user.handle:
Expand Down

0 comments on commit fb1af68

Please sign in to comment.