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
4e75c713
Commit
4e75c713
authored
Jul 04, 2019
by
Ramya Authappan
Committed by
Mark Lapierre
Jul 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E Test to check XSS issue in @mentions autocomplete
parent
19dc1105
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
0 deletions
+54
-0
qa/qa/page/project/show.rb
qa/qa/page/project/show.rb
+1
-0
qa/qa/page/project/sub_menus/ci_cd.rb
qa/qa/page/project/sub_menus/ci_cd.rb
+2
-0
qa/qa/page/project/sub_menus/issues.rb
qa/qa/page/project/sub_menus/issues.rb
+2
-0
qa/qa/page/project/sub_menus/operations.rb
qa/qa/page/project/sub_menus/operations.rb
+2
-0
qa/qa/page/project/sub_menus/repository.rb
qa/qa/page/project/sub_menus/repository.rb
+2
-0
qa/qa/page/project/sub_menus/settings.rb
qa/qa/page/project/sub_menus/settings.rb
+2
-0
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
+43
-0
No files found.
qa/qa/page/project/show.rb
View file @
4e75c713
...
@@ -5,6 +5,7 @@ module QA
...
@@ -5,6 +5,7 @@ module QA
module
Project
module
Project
class
Show
<
Page
::
Base
class
Show
<
Page
::
Base
include
Page
::
Component
::
ClonePanel
include
Page
::
Component
::
ClonePanel
include
Page
::
Project
::
SubMenus
::
Settings
view
'app/views/layouts/header/_new_dropdown.haml'
do
view
'app/views/layouts/header/_new_dropdown.haml'
do
element
:new_menu_toggle
element
:new_menu_toggle
...
...
qa/qa/page/project/sub_menus/ci_cd.rb
View file @
4e75c713
...
@@ -5,6 +5,8 @@ module QA
...
@@ -5,6 +5,8 @@ module QA
module
Project
module
Project
module
SubMenus
module
SubMenus
module
CiCd
module
CiCd
include
Page
::
Project
::
SubMenus
::
Common
def
self
.
included
(
base
)
def
self
.
included
(
base
)
base
.
class_eval
do
base
.
class_eval
do
view
'app/views/layouts/nav/sidebar/_project.html.haml'
do
view
'app/views/layouts/nav/sidebar/_project.html.haml'
do
...
...
qa/qa/page/project/sub_menus/issues.rb
View file @
4e75c713
...
@@ -5,6 +5,8 @@ module QA
...
@@ -5,6 +5,8 @@ module QA
module
Project
module
Project
module
SubMenus
module
SubMenus
module
Issues
module
Issues
include
Page
::
Project
::
SubMenus
::
Common
def
self
.
included
(
base
)
def
self
.
included
(
base
)
base
.
class_eval
do
base
.
class_eval
do
view
'app/views/layouts/nav/sidebar/_project.html.haml'
do
view
'app/views/layouts/nav/sidebar/_project.html.haml'
do
...
...
qa/qa/page/project/sub_menus/operations.rb
View file @
4e75c713
...
@@ -5,6 +5,8 @@ module QA
...
@@ -5,6 +5,8 @@ module QA
module
Project
module
Project
module
SubMenus
module
SubMenus
module
Operations
module
Operations
include
Page
::
Project
::
SubMenus
::
Common
def
self
.
included
(
base
)
def
self
.
included
(
base
)
base
.
class_eval
do
base
.
class_eval
do
view
'app/views/layouts/nav/sidebar/_project.html.haml'
do
view
'app/views/layouts/nav/sidebar/_project.html.haml'
do
...
...
qa/qa/page/project/sub_menus/repository.rb
View file @
4e75c713
...
@@ -5,6 +5,8 @@ module QA
...
@@ -5,6 +5,8 @@ module QA
module
Project
module
Project
module
SubMenus
module
SubMenus
module
Repository
module
Repository
include
Page
::
Project
::
SubMenus
::
Common
def
self
.
included
(
base
)
def
self
.
included
(
base
)
base
.
class_eval
do
base
.
class_eval
do
view
'app/views/layouts/nav/sidebar/_project.html.haml'
do
view
'app/views/layouts/nav/sidebar/_project.html.haml'
do
...
...
qa/qa/page/project/sub_menus/settings.rb
View file @
4e75c713
...
@@ -5,6 +5,8 @@ module QA
...
@@ -5,6 +5,8 @@ module QA
module
Project
module
Project
module
SubMenus
module
SubMenus
module
Settings
module
Settings
include
Page
::
Project
::
SubMenus
::
Common
def
self
.
included
(
base
)
def
self
.
included
(
base
)
base
.
class_eval
do
base
.
class_eval
do
view
'app/views/layouts/nav/sidebar/_project.html.haml'
do
view
'app/views/layouts/nav/sidebar/_project.html.haml'
do
...
...
qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
0 → 100644
View file @
4e75c713
# frozen_string_literal: true
module
QA
context
'Plan'
do
describe
'check xss occurence in @mentions in issues'
do
let
(
:issue_title
)
{
'issue title'
}
it
'user mentions a user in comment'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
user
=
Resource
::
User
.
fabricate!
do
|
user
|
user
.
name
=
"eve <img src=x onerror=alert(2)<img src=x onerror=alert(1)>"
user
.
password
=
"test1234"
end
project
=
Resource
::
Project
.
fabricate!
do
|
resource
|
resource
.
name
=
'xss-test-for-mentions-project'
end
project
.
visit!
Page
::
Project
::
Show
.
perform
(
&
:go_to_members_settings
)
Page
::
Project
::
Settings
::
Members
.
perform
do
|
page
|
page
.
add_member
(
user
.
username
)
end
Resource
::
Issue
.
fabricate_via_browser_ui!
do
|
issue
|
issue
.
title
=
issue_title
issue
.
project
=
project
end
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show_page
|
show_page
.
select_all_activities_filter
show_page
.
comment
(
'cc-ing you here @eve'
)
expect
do
expect
(
show_page
).
to
have_content
(
"cc-ing you here"
)
end
.
not_to
raise_error
# Selenium::WebDriver::Error::UnhandledAlertError
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