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
c2320bd7
Commit
c2320bd7
authored
Jan 22, 2020
by
Juan Broullon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix XSS on custom project templates form
parent
594f2c81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
app/assets/javascripts/groups_select.js
app/assets/javascripts/groups_select.js
+5
-2
changelogs/unreleased/security-fix-xss-on-project-templates.yml
...logs/unreleased/security-fix-xss-on-project-templates.yml
+5
-0
No files found.
app/assets/javascripts/groups_select.js
View file @
c2320bd7
import
$
from
'
jquery
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
import
Api
from
'
./api
'
;
import
{
escape
}
from
'
lodash
'
;
import
{
normalizeHeaders
}
from
'
./lib/utils/common_utils
'
;
import
{
__
}
from
'
~/locale
'
;
...
...
@@ -75,10 +76,12 @@ const groupsSelect = () => {
}
},
formatResult
(
object
)
{
return
`<div class='group-result'> <div class='group-name'>
${
object
.
full_name
}
</div> <div class='group-path'>
${
object
.
full_path
}
</div> </div>`
;
return
`<div class='group-result'> <div class='group-name'>
${
escape
(
object
.
full_name
,
)}
</div> <div class='group-path'>
${
object
.
full_path
}
</div> </div>`
;
},
formatSelection
(
object
)
{
return
object
.
full_name
;
return
escape
(
object
.
full_name
)
;
},
dropdownCssClass
:
'
ajax-groups-dropdown select2-infinite
'
,
// we do not want to escape markup since we are displaying html in results
...
...
changelogs/unreleased/security-fix-xss-on-project-templates.yml
0 → 100644
View file @
c2320bd7
---
title
:
Fix XSS vulnerability on custom project templates form
merge_request
:
author
:
type
:
security
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