Skip to content

Commit 305d48f

Browse files
sKarki999fwolf-ilias
authored andcommitted
Fix(Soap): Add RBAC 'read' permission check to getSCORMCompletionStatus and hasSCORMCertificate to prevent unauthorized data access.
Signed-off-by: Releasemanager <webmaster@ilias.de>
1 parent f23e5db commit 305d48f

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

components/ILIAS/soap/classes/class.ilSoapSCORMAdministration.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@ public function hasSCORMCertificate(string $sid, int $ref_id, int $usr_id)
132132
return $this->raiseError("Parent with ID $ref_id has been deleted.", 'Client');
133133
}
134134

135+
if (!$rbacsystem->checkAccess('read', $ref_id)) {
136+
return $this->raiseError(
137+
'No permission to read the object with id: ' . $ref_id,
138+
'Server'
139+
);
140+
}
141+
135142
$certValidator = new ilCertificateUserCertificateAccessValidator();
136143

137144
return $certValidator->validate($usr_id, $obj_id);
@@ -153,6 +160,16 @@ public function getSCORMCompletionStatus(string $sid, int $a_usr_id, int $a_ref_
153160
return $this->raiseError('No ref_id given. Aborting!', 'Client');
154161
}
155162

163+
global $DIC;
164+
$rbacsystem = $DIC['rbacsystem'];
165+
166+
if (!$rbacsystem->checkAccess('read', $a_ref_id)) {
167+
return $this->raiseError(
168+
'No permission to read the object with id: ' . $a_ref_id,
169+
'Server'
170+
);
171+
}
172+
156173
ilInitialisation::initILIAS();
157174

158175
if (!$obj_id = ilObject::_lookupObjectId($a_ref_id)) {

0 commit comments

Comments
 (0)