Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 5019e6f

Browse files
authored
switching to contravariance for security of the plugin. resulting discovering a security issue in groups (#5836)
1 parent 1cae379 commit 5019e6f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugin-interface/src/main/scala/mesosphere/marathon/plugin/auth/AuthorizedAction.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import mesosphere.marathon.plugin.{ Group, RunSpec }
88
*
99
* @tparam R the type of the resource.
1010
*/
11-
sealed trait AuthorizedAction[+R]
11+
sealed trait AuthorizedAction[-R]
1212

1313
/**
1414
* The following objects will be passed to the Authorizer when an action affects an application, in order to identify

src/main/scala/mesosphere/marathon/api/v2/GroupsResource.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class GroupsResource @Inject() (
277277

278278
maybeExistingGroup match {
279279
case Some(existingGroup) => checkAuthorization(UpdateGroup, existingGroup)
280-
case None => checkAuthorization(CreateRunSpec, updatedGroup)
280+
case None => checkAuthorization(CreateGroup, updatedGroup)
281281
}
282282

283283
updatedGroup

0 commit comments

Comments
 (0)