Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5101d440
authored
Oct 03, 2014
by
Bach Dániel
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix xss in VmDisk*Form
💩
parent
68e1eb19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
circle/dashboard/forms.py
+3
-2
No files found.
circle/dashboard/forms.py
View file @
5101d440
...
@@ -39,6 +39,7 @@ from django.contrib.auth.forms import UserCreationForm as OrgUserCreationForm
...
@@ -39,6 +39,7 @@ from django.contrib.auth.forms import UserCreationForm as OrgUserCreationForm
from
django.forms.widgets
import
TextInput
,
HiddenInput
from
django.forms.widgets
import
TextInput
,
HiddenInput
from
django.template
import
Context
from
django.template
import
Context
from
django.template.loader
import
render_to_string
from
django.template.loader
import
render_to_string
from
django.utils.html
import
escape
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.utils.translation
import
ugettext_lazy
as
_
from
sizefield.widgets
import
FileSizeWidget
from
sizefield.widgets
import
FileSizeWidget
from
django.core.urlresolvers
import
reverse_lazy
from
django.core.urlresolvers
import
reverse_lazy
...
@@ -839,7 +840,7 @@ class VmDiskResizeForm(forms.Form):
...
@@ -839,7 +840,7 @@ class VmDiskResizeForm(forms.Form):
helper
.
form_tag
=
False
helper
.
form_tag
=
False
if
self
.
disk
:
if
self
.
disk
:
helper
.
layout
=
Layout
(
helper
.
layout
=
Layout
(
HTML
(
_
(
"<label>Disk:</label>
%
s"
)
%
self
.
disk
),
HTML
(
_
(
"<label>Disk:</label>
%
s"
)
%
escape
(
self
.
disk
)
),
Field
(
'disk'
),
Field
(
'size'
))
Field
(
'disk'
),
Field
(
'size'
))
return
helper
return
helper
...
@@ -865,7 +866,7 @@ class VmDiskRemoveForm(forms.Form):
...
@@ -865,7 +866,7 @@ class VmDiskRemoveForm(forms.Form):
helper
.
layout
=
Layout
(
helper
.
layout
=
Layout
(
AnyTag
(
AnyTag
(
"div"
,
"div"
,
HTML
(
_
(
"<label>Disk:</label>
%
s"
)
%
self
.
disk
),
HTML
(
_
(
"<label>Disk:</label>
%
s"
)
%
escape
(
self
.
disk
)
),
css_class
=
"form-group"
,
css_class
=
"form-group"
,
),
),
Field
(
"disk"
),
Field
(
"disk"
),
...
...
Kálmán Viktor
@kviktor
commented
Oct 03, 2014
Owner
🙈
:see_no_evil:
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