diff options
author | diSabler <dissy@ya.ru> | 2017-02-24 15:53:27 +0300 |
---|---|---|
committer | diSabler <dissy@ya.ru> | 2017-02-24 15:53:27 +0300 |
commit | 4da72e91e519711b2f02638e8769ebe0b74a029b (patch) | |
tree | f0df08d4b94057bfa6c3cd16d56f33ce8673d6fb | |
parent | d7a5837cbdbddab34f3b6cdbface273234771bc9 (diff) |
fix: escape html in shell commands
-rw-r--r-- | kernel.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -650,7 +650,7 @@ def shell_execute(cmd): error_answ = os.system('%s > %s 2>&1' % (cmd.encode('utf-8'),tmp_file))
if not error_answ:
try:
- body = readfile(tmp_file)
+ body = html_escape_soft(readfile(tmp_file))
except:
body = '⚠️ Command execution error.'
if len(body):
@@ -661,7 +661,7 @@ def shell_execute(cmd): else:
result = '⚠️ Command execution error.'
try:
- result += '\n' + readfile(tmp_file)
+ result += '\n' + html_escape_soft(readfile(tmp_file))
except:
pass
except Exception, MSG:
|