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
c8b160cc
Commit
c8b160cc
authored
Oct 19, 2020
by
allison.browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use POST for runner pause and resume
Use the POST http verb to prevent CSRF
parent
5536f8eb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
app/views/admin/runners/_runner.html.haml
app/views/admin/runners/_runner.html.haml
+2
-2
changelogs/unreleased/security-runner-csrf-milestone-13-6.yml
...gelogs/unreleased/security-runner-csrf-milestone-13-6.yml
+5
-0
config/routes/admin.rb
config/routes/admin.rb
+2
-2
No files found.
app/views/admin/runners/_runner.html.haml
View file @
c8b160cc
...
...
@@ -69,10 +69,10 @@
=
sprite_icon
(
'pencil'
)
.btn-group
-
if
runner
.
active?
=
link_to
[
:pause
,
:admin
,
runner
],
method: :
ge
t
,
class:
'gl-button btn btn-default btn-svg has-tooltip'
,
title:
_
(
'Pause'
),
ref:
'tooltip'
,
aria:
{
label:
_
(
'Pause'
)
},
data:
{
placement:
'top'
,
container:
'body'
,
confirm:
_
(
'Are you sure?'
)
}
do
=
link_to
[
:pause
,
:admin
,
runner
],
method: :
pos
t
,
class:
'gl-button btn btn-default btn-svg has-tooltip'
,
title:
_
(
'Pause'
),
ref:
'tooltip'
,
aria:
{
label:
_
(
'Pause'
)
},
data:
{
placement:
'top'
,
container:
'body'
,
confirm:
_
(
'Are you sure?'
)
}
do
=
sprite_icon
(
'pause'
)
-
else
=
link_to
[
:resume
,
:admin
,
runner
],
method: :
ge
t
,
class:
'gl-button btn btn-default btn-svg has-tooltip gl-px-3'
,
title:
_
(
'Resume'
),
ref:
'tooltip'
,
aria:
{
label:
_
(
'Resume'
)
},
data:
{
placement:
'top'
,
container:
'body'
}
do
=
link_to
[
:resume
,
:admin
,
runner
],
method: :
pos
t
,
class:
'gl-button btn btn-default btn-svg has-tooltip gl-px-3'
,
title:
_
(
'Resume'
),
ref:
'tooltip'
,
aria:
{
label:
_
(
'Resume'
)
},
data:
{
placement:
'top'
,
container:
'body'
}
do
=
sprite_icon
(
'play'
)
.btn-group
=
link_to
[
:admin
,
runner
],
method: :delete
,
class:
'gl-button btn btn-danger has-tooltip'
,
title:
_
(
'Remove'
),
ref:
'tooltip'
,
aria:
{
label:
_
(
'Remove'
)
},
data:
{
placement:
'top'
,
container:
'body'
,
confirm:
_
(
'Are you sure?'
)
}
do
...
...
changelogs/unreleased/security-runner-csrf-milestone-13-6.yml
0 → 100644
View file @
c8b160cc
---
title
:
Add CSRF protection to runner pause and resume
merge_request
:
1021
author
:
type
:
security
config/routes/admin.rb
View file @
c8b160cc
...
...
@@ -148,8 +148,8 @@ namespace :admin do
resources
:runners
,
only:
[
:index
,
:show
,
:update
,
:destroy
]
do
member
do
ge
t
:resume
ge
t
:pause
pos
t
:resume
pos
t
:pause
end
collection
do
...
...
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