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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
09ce4671
Commit
09ce4671
authored
Mar 27, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test to make sure there's no XSS for hook logs
parent
3adbc579
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
spec/features/projects/hook_logs/user_reads_log_spec.rb
spec/features/projects/hook_logs/user_reads_log_spec.rb
+21
-0
No files found.
spec/features/projects/hook_logs/user_reads_log_spec.rb
0 → 100644
View file @
09ce4671
require
'spec_helper'
feature
'Hook logs'
do
given
(
:web_hook_log
)
{
create
(
:web_hook_log
,
response_body:
'<script>'
)
}
given
(
:project
)
{
web_hook_log
.
web_hook
.
project
}
given
(
:user
)
{
create
(
:user
)
}
before
do
project
.
add_master
(
user
)
sign_in
(
user
)
end
scenario
'user reads log without getting XSS'
do
visit
(
project_hook_hook_log_path
(
project
,
web_hook_log
.
web_hook
,
web_hook_log
))
expect
(
page
).
to
have_content
(
'<script>'
)
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