fix(auth): prevent cross-tenant IDOR in resource cloning (#8613)

This commit is contained in:
Andras Bacsai authored and GitHub committed 2026-02-25 11:21:52 +01:00
commit 24abd51238
5 files changed
+101 -19

No files matched your search

+4
View File
@@ -191,6 +191,10 @@ function clone_application(Application $source, $destination, array $overrides =
$uuid = $overrides['uuid'] ?? (string) new Cuid2;
$server = $destination->server;
if ($server->team_id !== currentTeam()->id) {
throw new \RuntimeException('Destination does not belong to the current team.');
}
// Prepare name and URL
$name = $overrides['name'] ?? 'clone-of-'.str($source->name)->limit(20).'-'.$uuid;
$applicationSettings = $source->settings;