Skip to content

Allow redirect from teams meetings app to work with SameSite=Lax cookie#3230

Open
weilai-irl wants to merge 1 commit into
wip-130956-m502from
wip-131950-m502
Open

Allow redirect from teams meetings app to work with SameSite=Lax cookie#3230
weilai-irl wants to merge 1 commit into
wip-130956-m502from
wip-131950-m502

Conversation

@weilai-irl

Copy link
Copy Markdown
Collaborator

No description provided.

@weilai-irl weilai-irl added this to the 2026-03 milestone Jun 12, 2026
@weilai-irl weilai-irl self-assigned this Jun 12, 2026
Copilot AI review requested due to automatic review settings June 12, 2026 15:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a “cross-site repost” handshake to the TinyMCE Teams Meeting result endpoint so that when the external Teams app POSTs back cross-site (and the browser omits a SameSite=Lax session cookie), the request is re-posted same-site to allow require_login() to succeed.

Changes:

  • Add a pre-require_login() repost flow which renders an auto-submit form when the user isn’t logged in.
  • Skip the repost flow on the second request using a repost POST flag.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +34 to +44
} elseif (!isloggedin()) {
$PAGE->set_context(context_system::instance());
$PAGE->set_pagelayout('popup');
header_remove('Set-Cookie');
$output = $PAGE->get_renderer('mod_lti');
$page = new \mod_lti\output\repost_crosssite_page($_SERVER['REQUEST_URI'], $_POST);
echo $output->header();
echo $output->render($page);
echo $output->footer();
exit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants