Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos
Commits
c2194135
Commit
c2194135
authored
Jun 17, 2014
by
Tristan Cavelier
Committed by
Cédric Le Ninivin
Jun 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: prevent html injection with cgi.escape
parent
0a2158e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
stack/monitor/webfile-directory/settings.cgi.in
stack/monitor/webfile-directory/settings.cgi.in
+4
-4
No files found.
stack/monitor/webfile-directory/settings.cgi.in
View file @
c2194135
...
@@ -44,8 +44,8 @@ print "<form action=\"/index.cgi\" method=\"post\" class=\"pure-form-aligned\">"
...
@@ -44,8 +44,8 @@ print "<form action=\"/index.cgi\" method=\"post\" class=\"pure-form-aligned\">"
print "
<input
type=
\"hidden\"
name=
\"posting-script\"
value=
\"{{
pwd
}}/{{
this_file
}}\"
>
"
print "
<input
type=
\"hidden\"
name=
\"posting-script\"
value=
\"{{
pwd
}}/{{
this_file
}}\"
>
"
for option in parser.options("public"):
for option in parser.options("public"):
print "
<div
class=
\"pure-control-group\"
>
"
print "
<div
class=
\"pure-control-group\"
>
"
print "
<label
for=
\"%s\"
>
%s
</label>
"
%(option, option
)
print "
<label
for=
\"%s\"
>
%s
</label>
"
% (cgi.escape(option, quote=True), cgi.escape(option)
)
print "
<input
type=
\"text\"
name=
\"%s\"
value=
\"%s\"
>
"
%(option, parser.get('public', option
))
print "
<input
type=
\"text\"
name=
\"%s\"
value=
\"%s\"
>
"
% (cgi.escape(option, quote=True), cgi.escape(parser.get('public', option), quote=True
))
print "
</div>
"
print "
</div>
"
print "
<div
class=
\"pure-controls\"
><button
type=
\"submit\"
class=
\"pure-button
\
print "
<div
class=
\"pure-controls\"
><button
type=
\"submit\"
class=
\"pure-button
\
pure-button-primary
\"
>
Save
</button></div></form>
"
pure-button-primary
\"
>
Save
</button></div></form>
"
...
@@ -56,8 +56,8 @@ for section in parser.sections():
...
@@ -56,8 +56,8 @@ for section in parser.sections():
if section != 'public':
if section != 'public':
for option in parser.options(section):
for option in parser.options(section):
print "
<div
class=
\"pure-control-group\"
>
"
print "
<div
class=
\"pure-control-group\"
>
"
print "
<label
for=
\"%s\"
>
%s
</label>
"
%(option, option
)
print "
<label
for=
\"%s\"
>
%s
</label>
"
% (cgi.escape(option, quote=True), cgi.escape(option)
)
print "
<input
type=
\"text\"
name=
\"%s\"
value=
\"%s\"
readonly
>
"
%(option, parser.get(section, option
))
print "
<input
type=
\"text\"
name=
\"%s\"
value=
\"%s\"
readonly
>
"
%(cgi.escape(option, quote=True), cgi.escape(parser.get(section, option), quote=True
))
print "
</div>
"
print "
</div>
"
print "
</form>
"
print "
</form>
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment