Skip to content

PUT /api/v1/devices/:deviceId accepts a target snapshot from another application in the team #8815

Description

@andypalmi

The route only checks that the snapshot belongs to the device's team. Device groups check that the snapshot belongs to the same application, because granular RBAC can give a user access to one application and not another in the same team.

Steps to reproduce

  1. A user has device:edit on application A and no access to application B in the same team.
  2. They set a snapshot of an instance in application B as the target of a device in application A.

The route accepts it, and the device deploys the other application's flows.

Expected

The route rejects a snapshot from a different application, the same way updateDeviceGroup does.

Reference

forge/routes/api/device.js:743-747, forge/ee/db/controllers/DeviceGroup.js:107-122.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:apiWork on the platform APItype:bugSomething isn't working

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions