Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1966775f
Commit
1966775f
authored
Jul 20, 2020
by
Donald Cook
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Escape html in iteration description
parent
a6e27643
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
ee/app/assets/javascripts/iterations/components/iteration_report.vue
...ts/javascripts/iterations/components/iteration_report.vue
+1
-1
ee/spec/frontend/iterations/components/iteration_report_spec.js
...c/frontend/iterations/components/iteration_report_spec.js
+17
-0
No files found.
ee/app/assets/javascripts/iterations/components/iteration_report.vue
View file @
1966775f
...
...
@@ -157,7 +157,7 @@ export default {
</gl-new-dropdown>
</div>
<h3
ref=
"title"
class=
"page-title"
>
{{ iteration.title }}
</h3>
<div
ref=
"description"
v-
html
=
"iteration.description"
></div>
<div
ref=
"description"
v-
text
=
"iteration.description"
></div>
<iteration-report-summary
:group-path=
"groupPath"
:iteration-id=
"iteration.id"
/>
<iteration-report-tabs
:group-path=
"groupPath"
:iteration-id=
"iteration.id"
/>
</template>
...
...
ee/spec/frontend/iterations/components/iteration_report_spec.js
View file @
1966775f
...
...
@@ -91,5 +91,22 @@ describe('Iterations tabs', () => {
expect
(
findTitle
().
text
()).
toContain
(
iteration
.
title
);
expect
(
findDescription
().
text
()).
toContain
(
iteration
.
description
);
});
it
(
'
escapes html in description
'
,
async
()
=>
{
wrapper
.
setData
({
group
:
{
iteration
:
{
...
iteration
,
description
:
`<img src=x onerror=alert(document.domain)>`
,
},
},
});
await
wrapper
.
vm
.
$nextTick
();
expect
(
findDescription
().
html
()).
toEqual
(
'
<div><img src=x onerror=alert(document.domain)></div>
'
,
);
});
});
});
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