Fix AISLE-2026-0340-0086 Authorization bypass in clonetasks: private

destination project check is inverted - reported by Pavel Kohout
This commit is contained in:
Laurent Destailleur 2026-08-14 16:25:46 +02:00
parent 340a08734b
commit 1730aa5667

View file

@ -1946,7 +1946,7 @@ if (!$error && ($massaction == 'clonetasks' || ($action == 'clonetasks' && $conf
if (empty($newproject->public)) {
$tmps = $newproject->getProjectsAuthorizedForUser($user, 0, 1, 0, '(fk_statut:=:1)'); // We check only open project (cloning on closed is not allowed)
$tmparray = explode(',', $tmps);
if (!in_array($newproject->id, $tmparray)) {
if (in_array($newproject->id, $tmparray)) {
$iscontactofnewproject = 1;
}
}