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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
8de18d41
Commit
8de18d41
authored
Apr 19, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove XSS vulnerability in Label and Milestone dropdowns
parent
55380e69
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
app/assets/javascripts/labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+5
-5
app/assets/javascripts/milestone_select.js.coffee
app/assets/javascripts/milestone_select.js.coffee
+2
-2
No files found.
app/assets/javascripts/labels_select.js.coffee
View file @
8de18d41
...
@@ -33,13 +33,13 @@ class @LabelsSelect
...
@@ -33,13 +33,13 @@ class @LabelsSelect
if
issueUpdateURL
if
issueUpdateURL
labelHTMLTemplate
=
_
.
template
(
labelHTMLTemplate
=
_
.
template
(
'<% _.each(labels, function(label){ %>
'<% _.each(labels, function(label){ %>
<a href="<%= ["",issueURLSplit[1], issueURLSplit[2],""].join("/") %>issues?label_name=<%=
label.title
%>">
<a href="<%= ["",issueURLSplit[1], issueURLSplit[2],""].join("/") %>issues?label_name=<%=
_.escape(label.title)
%>">
<span class="label has-tooltip color-label" title="<%=
label.description
%>" style="background-color: <%= label.color %>;">
<span class="label has-tooltip color-label" title="<%=
_.escape(label.description)
%>" style="background-color: <%= label.color %>;">
<%=
label.title
%>
<%=
_.escape(label.title)
%>
</span>
</span>
</a>
</a>
<% }); %>'
<% }); %>'
)
;
)
labelNoneHTMLTemplate
=
_
.
template
(
'<div class="light">None</div>'
)
labelNoneHTMLTemplate
=
_
.
template
(
'<div class="light">None</div>'
)
if
newLabelField
.
length
and
$dropdown
.
hasClass
'js-extra-options'
if
newLabelField
.
length
and
$dropdown
.
hasClass
'js-extra-options'
...
@@ -211,7 +211,7 @@ class @LabelsSelect
...
@@ -211,7 +211,7 @@ class @LabelsSelect
"<li>
"<li>
<a href='#' class='
#{
selectedClass
}
'>
<a href='#' class='
#{
selectedClass
}
'>
#{
color
}
#{
color
}
#{
label
.
title
}
#{
_
.
escape
(
label
.
title
)
}
</a>
</a>
</li>"
</li>"
filterable
:
true
filterable
:
true
...
...
app/assets/javascripts/milestone_select.js.coffee
View file @
8de18d41
...
@@ -24,7 +24,7 @@ class @MilestoneSelect
...
@@ -24,7 +24,7 @@ class @MilestoneSelect
if
issueUpdateURL
if
issueUpdateURL
milestoneLinkTemplate
=
_
.
template
(
milestoneLinkTemplate
=
_
.
template
(
'<a href="/<%= namespace %>/<%= path %>/milestones/<%= iid %>"><%=
title
%></a>'
'<a href="/<%= namespace %>/<%= path %>/milestones/<%= iid %>"><%=
_.escape(title)
%></a>'
)
)
milestoneLinkNoneTemplate
=
'<div class="light">None</div>'
milestoneLinkNoneTemplate
=
'<div class="light">None</div>'
...
@@ -71,7 +71,7 @@ class @MilestoneSelect
...
@@ -71,7 +71,7 @@ class @MilestoneSelect
defaultLabel
defaultLabel
fieldName
:
$dropdown
.
data
(
'field-name'
)
fieldName
:
$dropdown
.
data
(
'field-name'
)
text
:
(
milestone
)
->
text
:
(
milestone
)
->
milestone
.
title
_
.
escape
(
milestone
.
title
)
id
:
(
milestone
)
->
id
:
(
milestone
)
->
if
!
useId
if
!
useId
milestone
.
name
milestone
.
name
...
...
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