diff --git a/components/ILIAS/LTIConsumer/LTIConsumer.php b/components/ILIAS/LTIConsumer/LTIConsumer.php index 2412756a3280..6ca02b278533 100644 --- a/components/ILIAS/LTIConsumer/LTIConsumer.php +++ b/components/ILIAS/LTIConsumer/LTIConsumer.php @@ -36,5 +36,19 @@ public function init( new \ilLTIConsumerSetupAgent( $pull[\ILIAS\Refinery\Factory::class] ); + $contribute[Component\Resource\PublicAsset::class] = fn() => + new Component\Resource\Endpoint($this, "ltiauth.php"); + $contribute[Component\Resource\PublicAsset::class] = fn() => + new Component\Resource\Endpoint($this, "ltitoken.php"); + $contribute[Component\Resource\PublicAsset::class] = fn() => + new Component\Resource\Endpoint($this, "lticerts.php"); + $contribute[Component\Resource\PublicAsset::class] = fn() => + new Component\Resource\Endpoint($this, "ltiregistration.php"); + $contribute[Component\Resource\PublicAsset::class] = fn() => + new Component\Resource\Endpoint($this, "ltiregend.php"); + $contribute[Component\Resource\PublicAsset::class] = fn() => + new Component\Resource\Endpoint($this, "ltiregstart.php"); + $contribute[Component\Resource\PublicAsset::class] = fn() => + new Component\Resource\Endpoint($this, "lticonfig.php"); } } diff --git a/components/ILIAS/LTIConsumer/classes/Certificate/class.ilCertificateSettingsLTIConsumerFormRepository.php b/components/ILIAS/LTIConsumer/classes/Certificate/class.ilCertificateSettingsLTIConsumerFormRepository.php index 2345b5ba8f1f..59fd235650e2 100755 --- a/components/ILIAS/LTIConsumer/classes/Certificate/class.ilCertificateSettingsLTIConsumerFormRepository.php +++ b/components/ILIAS/LTIConsumer/classes/Certificate/class.ilCertificateSettingsLTIConsumerFormRepository.php @@ -1,7 +1,5 @@ setVariable('LTI_TOOL_REG_URL', $toolRegUrl); $template->setVariable('LTI_DYN_REG_URL', $regUrl); + $template->setVariable('LTI_DYN_REG_URL_BY_POST', $toolRegUrl); $template->setVariable('LTI_REG_END_URL', ilObjLTIConsumer::getRegistrationEndUrl()); $template->setVariable('LTI_SHOW_TOOL_CONFIG_URL', $showToolConfigUrl); $template->setVariable('LTI_REG_ERROR_URL', $regErrorUrl); diff --git a/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumeProviderIcon.php b/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumeProviderIcon.php index e70117d33539..a3455ff5f6f7 100755 --- a/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumeProviderIcon.php +++ b/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumeProviderIcon.php @@ -1,7 +1,5 @@ scoreGiven = null; } } - $result = (float)$score->scoreGiven / (float)$score->scoreMaximum; + $result = (float) $score->scoreGiven / (float) $score->scoreMaximum; ilObjLTIConsumer::getLogger()->debug("result: " . $result); $ltiObjRes = new ilLTIConsumerResultService(); diff --git a/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerLP.php b/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerLP.php index 3a96624e27ad..9dd56ecc9eaa 100755 --- a/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerLP.php +++ b/components/ILIAS/LTIConsumer/classes/class.ilLTIConsumerLP.php @@ -1,7 +1,5 @@ has('url')) { $url = $params->retrieve('url', $DIC->refinery()->kindlyTo()->string()); + + if (empty($_POST["url"]) || $_POST["url"] != $url) { + ilObjLTIConsumer::sendResponseError(400, "url parameter in request does not match url parameter in post"); + } } else { ilObjLTIConsumer::sendResponseError(400, "missing required url parameter in request"); } diff --git a/components/ILIAS/LTIConsumer/ltitoken.php b/components/ILIAS/LTIConsumer/resources/ltitoken.php old mode 100755 new mode 100644 similarity index 98% rename from components/ILIAS/LTIConsumer/ltitoken.php rename to components/ILIAS/LTIConsumer/resources/ltitoken.php index b9f49bbcc16f..c85125ae7d81 --- a/components/ILIAS/LTIConsumer/ltitoken.php +++ b/components/ILIAS/LTIConsumer/resources/ltitoken.php @@ -1,7 +1,5 @@ + +
\ No newline at end of file diff --git a/components/ILIAS/LTIConsumer/tests/bootstrap.php b/components/ILIAS/LTIConsumer/tests/bootstrap.php index f83ad2055384..8502d9fbcea2 100755 --- a/components/ILIAS/LTIConsumer/tests/bootstrap.php +++ b/components/ILIAS/LTIConsumer/tests/bootstrap.php @@ -1,7 +1,5 @@