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
cb30eaf4
Commit
cb30eaf4
authored
Jun 25, 2018
by
Alessio Caiazza
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'dev/master'
parents
9bf26835
eaae2461
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
1 deletion
+65
-1
CHANGELOG-EE.md
CHANGELOG-EE.md
+12
-0
CHANGELOG.md
CHANGELOG.md
+38
-0
changelogs/unreleased/security-2682-fix-xss-for-markdown-toc.yml
...ogs/unreleased/security-2682-fix-xss-for-markdown-toc.yml
+5
-0
lib/banzai/filter/table_of_contents_filter.rb
lib/banzai/filter/table_of_contents_filter.rb
+1
-1
spec/lib/banzai/filter/table_of_contents_filter_spec.rb
spec/lib/banzai/filter/table_of_contents_filter_spec.rb
+9
-0
No files found.
CHANGELOG-EE.md
View file @
cb30eaf4
Please view this file on the master branch, on stable branches it's out of date.
Please view this file on the master branch, on stable branches it's out of date.
## 11.0.1 (2018-06-21)
-
No changes.
## 11.0.0 (2018-06-22)
## 11.0.0 (2018-06-22)
### Security (2 changes)
### Security (2 changes)
...
@@ -71,6 +75,10 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -71,6 +75,10 @@ Please view this file on the master branch, on stable branches it's out of date.
-
Allow viewing only one when multiple issue boards is not enabled.
-
Allow viewing only one when multiple issue boards is not enabled.
## 10.8.5 (2018-06-21)
-
No changes.
## 10.8.4 (2018-06-06)
## 10.8.4 (2018-06-06)
### Fixed (4 changes)
### Fixed (4 changes)
...
@@ -191,6 +199,10 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -191,6 +199,10 @@ Please view this file on the master branch, on stable branches it's out of date.
-
Remove
`features/group_active_tab.feature`
. !5554 (@blackst0ne)
-
Remove
`features/group_active_tab.feature`
. !5554 (@blackst0ne)
## 10.7.6 (2018-06-21)
-
No changes.
## 10.7.5 (2018-05-28)
## 10.7.5 (2018-05-28)
### Security (3 changes)
### Security (3 changes)
...
...
CHANGELOG.md
View file @
cb30eaf4
...
@@ -2,6 +2,17 @@
...
@@ -2,6 +2,17 @@
documentation
](
doc/development/changelog.md
)
for instructions on adding your own
documentation
](
doc/development/changelog.md
)
for instructions on adding your own
entry.
entry.
## 11.0.1 (2018-06-21)
### Security (5 changes)
-
Fix XSS vulnerability for table of content generation.
-
Update sanitize gem to 4.6.5 to fix HTML injection vulnerability.
-
HTML escape branch name in project graphs page.
-
HTML escape the name of the user in ProjectsHelper#link_to_member.
-
Don't show events from internal projects for anonymous users in public feed.
## 11.0.0 (2018-06-22)
## 11.0.0 (2018-06-22)
### Security (3 changes)
### Security (3 changes)
...
@@ -242,6 +253,17 @@ entry.
...
@@ -242,6 +253,17 @@ entry.
-
Workhorse to send raw diff and patch for commits.
-
Workhorse to send raw diff and patch for commits.
## 10.8.5 (2018-06-21)
### Security (5 changes)
-
Fix XSS vulnerability for table of content generation.
-
Update sanitize gem to 4.6.5 to fix HTML injection vulnerability.
-
HTML escape branch name in project graphs page.
-
HTML escape the name of the user in ProjectsHelper#link_to_member.
-
Don't show events from internal projects for anonymous users in public feed.
## 10.8.4 (2018-06-06)
## 10.8.4 (2018-06-06)
-
No changes.
-
No changes.
...
@@ -460,6 +482,22 @@ entry.
...
@@ -460,6 +482,22 @@ entry.
-
Gitaly handles repository forks by default.
-
Gitaly handles repository forks by default.
## 10.7.6 (2018-06-21)
### Security (6 changes)
-
Fix XSS vulnerability for table of content generation.
-
Update sanitize gem to 4.6.5 to fix HTML injection vulnerability.
-
HTML escape branch name in project graphs page.
-
HTML escape the name of the user in ProjectsHelper#link_to_member.
-
Don't show events from internal projects for anonymous users in public feed.
-
XSS fix to use safe_params instead of params in url_for helpers.
### Other (1 change)
-
Replacing gollum libraries for gitlab custom libs. !18343
## 10.7.5 (2018-05-28)
## 10.7.5 (2018-05-28)
### Security (3 changes)
### Security (3 changes)
...
...
changelogs/unreleased/security-2682-fix-xss-for-markdown-toc.yml
0 → 100644
View file @
cb30eaf4
---
title
:
Fix XSS vulnerability for table of content generation
merge_request
:
author
:
type
:
security
lib/banzai/filter/table_of_contents_filter.rb
View file @
cb30eaf4
...
@@ -92,7 +92,7 @@ module Banzai
...
@@ -92,7 +92,7 @@ module Banzai
def
text
def
text
return
''
unless
node
return
''
unless
node
@text
||=
node
.
text
@text
||=
EscapeUtils
.
escape_html
(
node
.
text
)
end
end
private
private
...
...
spec/lib/banzai/filter/table_of_contents_filter_spec.rb
View file @
cb30eaf4
...
@@ -139,5 +139,14 @@ describe Banzai::Filter::TableOfContentsFilter do
...
@@ -139,5 +139,14 @@ describe Banzai::Filter::TableOfContentsFilter do
expect
(
items
[
5
].
ancestors
).
to
include
(
items
[
4
])
expect
(
items
[
5
].
ancestors
).
to
include
(
items
[
4
])
end
end
end
end
context
'header text contains escaped content'
do
let
(
:content
)
{
'<img src="x" onerror="alert(42)">'
}
let
(
:results
)
{
result
(
header
(
1
,
content
))
}
it
'outputs escaped content'
do
expect
(
doc
.
inner_html
).
to
include
(
content
)
end
end
end
end
end
end
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