Skip to content

Commit

Permalink
Catch another Chris F detected bug
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Mar 25, 2024
1 parent 18358f4 commit 4dd2af7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions lti/oidc_launch.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@
LTIX::abort_with_error_log("target_link_uri cannot be the same as oidc_launch - ".$launch_url);
}

if ( ! U::startsWith($launch_url, $CFG->apphome) ) {
LTIX::abort_with_error_log("Launch_url must start with ".$CFG->apphome);
if ( U::startsWith($launch_url, $CFG->apphome) || U::startsWith($launch_url, $CFG->wwwroot) ) {
// Good news...
} else {
LTIX::abort_with_error_log("Launch_url must start with wwwroot (". $CFG->wwwroot . ") or apphome (".$CFG->apphome.")");
}

// Check if we are already verified
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '26a6332d1e804f383f27d08fd2b37eb48c17491a',
'reference' => '18358f4dd49424399750c57ab84328478fb330ee',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '26a6332d1e804f383f27d08fd2b37eb48c17491a',
'reference' => '18358f4dd49424399750c57ab84328478fb330ee',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
10 changes: 5 additions & 5 deletions vendor/tsugi/lib/src/Core/LTIX.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,6 @@ public static function setupSession($needed=self::ALL, $session_object=null, $re
self::abort_with_error_log('Found issuer, but did not find corresponding deployment: '.htmlentities(U::get($post,'deployment_id')));
}

// Copy the deployment_id into run=time data for later
if ( $LTI13 && U::get($post,'deployment_id') ) {
$row['deployment_id'] = $post['deployment_id'];
}

if ( ! $row || ! U::get($row, 'key_id') ) {
if ( U::get($post,'key') ) { // LTI 1.1
self::abort_with_error_log('Launch could not find key: '.htmlentities(U::get($post,'key')));
Expand All @@ -495,6 +490,11 @@ public static function setupSession($needed=self::ALL, $session_object=null, $re
}
}

// Copy the deployment_id into run=time data for later
if ( $LTI13 && U::get($post,'deployment_id') ) {
$row['deployment_id'] = $post['deployment_id'];
}

$delta = 0;
if ( isset($request_data['oauth_timestamp']) ) {
$server_time = $request_data['oauth_timestamp']+0;
Expand Down

0 comments on commit 4dd2af7

Please sign in to comment.