Skip to content

Commit 401febc

Browse files
committed
Update so auto works in an iframe for admin
1 parent b5e2859 commit 401febc

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

admin/gate.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
}
4747
$rest_path = \Tsugi\Util\U::rest_path();
4848
$redirect = U::reconstruct_query($rest_path->current);
49-
header("Location: ".$redirect);
49+
$redirect = U::addSession($redirect);
50+
51+
Output::doRedirect($redirect);
5052
$REDIRECTED = true;
5153
return;
5254
}

admin/key/auto.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
2-
if ( ! defined('COOKIE_SESSION') ) define('COOKIE_SESSION', true);
2+
# Do not use cookie session here. We might be in an iframe and unable to establish
3+
# a session - thanks trackers!. Make sure the auto endpoint has the .php or
4+
# route.php will do cookie session.
5+
36
require_once("../../config.php");
47
session_start();
58
require_once("../gate.php");

admin/key/key-detail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
$retval = CrudForm::updateForm($row, $fields, $current, $from_location, $allow_edit, $allow_delete,$extra_buttons,$titles);
108108
if ( is_string($retval) ) die($retval);
109109
echo("</p>\n");
110-
$autoConfigUrl = $CFG->wwwroot . "/admin/key/auto?tsugi_key=" . $row['key_id'];
110+
$autoConfigUrl = $CFG->wwwroot . "/admin/key/auto.php?tsugi_key=" . $row['key_id'];
111111

112112
?>
113113
<p>

settings/key/key-detail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
if ( is_string($retval) ) die($retval);
118118
echo("</p>\n");
119119

120-
$autoConfigUrl = $from_location . "/auto?tsugi_key=" . $row['key_id'];
120+
$autoConfigUrl = $from_location . "/auto.php?tsugi_key=" . $row['key_id'];
121121
?>
122122
<p>
123123
<b>LTI Advantage Auto Configuration URL:

0 commit comments

Comments
 (0)