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
2ac1cf8a
Commit
2ac1cf8a
authored
Jul 20, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
parent
d8bf49ba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
...es/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
+16
-19
No files found.
qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
View file @
2ac1cf8a
...
...
@@ -2,35 +2,32 @@
module
QA
RSpec
.
describe
'Plan'
,
:reliable
do
describe
'check xss occurence in @mentions in issues'
,
:requires_admin
do
it
'mentions a user in a comment'
do
QA
::
Runtime
::
Env
.
personal_access_token
=
QA
::
Runtime
::
Env
.
admin_personal_access_token
unless
QA
::
Runtime
::
Env
.
personal_access_token
Flow
::
Login
.
sign_in_as_admin
end
user
=
Resource
::
User
.
fabricate_via_api!
do
|
user
|
let!
(
:user
)
do
Resource
::
User
.
fabricate_via_api!
do
|
user
|
user
.
name
=
"eve <img src=x onerror=alert(2)<img src=x onerror=alert(1)>"
user
.
password
=
"test1234"
user
.
api_client
=
Runtime
::
API
::
Client
.
as_admin
end
end
QA
::
Runtime
::
Env
.
personal_access_token
=
nil
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
)
if
Page
::
Main
::
Menu
.
perform
{
|
p
|
p
.
has_personal_area?
(
wait:
0
)
}
Flow
::
Login
.
sign_in
project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
let!
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'xss-test-for-mentions-project'
end
end
describe
'check xss occurence in @mentions in issues'
,
:requires_admin
do
before
do
Flow
::
Login
.
sign_in
Flow
::
Project
.
add_member
(
project:
project
,
username:
user
.
username
)
Resource
::
Issue
.
fabricate_via_api!
do
|
issue
|
issue
.
project
=
project
end
.
visit!
end
it
'mentions a user in a comment'
do
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show
|
show
.
select_all_activities_filter
show
.
comment
(
"cc-ing you here @
#{
user
.
username
}
"
)
...
...
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