fixed issue 1808:HTML Injection on Terminal(shell) online

This commit is contained in:
mdipierro committed 2013-12-07 18:36:37 -06:00
1 parent 1715b0c378
commit 86a19c25a8
3 files changed
+5 -3

No files matched your search

+1 -1
View File
@@ -1 +1 @@
Version 2.8.2-stable+timestamp.2013.12.07.10.19.34 Version 2.8.2-stable+timestamp.2013.12.07.18.35.39
+2 -1
View File
@@ -3,6 +3,7 @@ import cStringIO
import gluon.contrib.shell import gluon.contrib.shell
import code import code
import thread import thread
import cgi
from gluon.shell import env from gluon.shell import env
if DEMO_MODE or MULTI_USER_MODE: if DEMO_MODE or MULTI_USER_MODE:
@@ -40,7 +41,7 @@ def callback():
k = len(session['commands:' + app]) - 1 k = len(session['commands:' + app]) - 1
#output = PRE(output) #output = PRE(output)
#return TABLE(TR('In[%i]:'%k,PRE(command)),TR('Out[%i]:'%k,output)) #return TABLE(TR('In[%i]:'%k,PRE(command)),TR('Out[%i]:'%k,output))
return 'In [%i] : %s%s\n' % (k + 1, command, output) return cgi.escape('In [%i] : %s%s\n' % (k + 1, command, output))
def reset(): def reset():
+2 -1
View File
@@ -4,7 +4,8 @@
<div id="wrapper"> <div id="wrapper">
<div class="row-fluid"> <div class="row-fluid">
<div class="output-wrapper span8"> <div class="output-wrapper span8">
<textarea id="output" readonly="readonly">web2py Shell {{=request.env.web2py_version}}</textarea> <textarea id="output" readonly="readonly">web2py Shell {{=request.env.web2py_version}}
</textarea>
</div> </div>
</div> </div>