Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/lti/LTI_Message_Launch.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ private function cache_launch_data() {

private function validate_state() {
// Check State for OIDC.
if ($this->cookie->get_cookie('lti1p3_' . $this->request['state']) !== $this->request['state']) {
// Error if state doesn't match
if (!isset($this->request['state']) || $this->cookie->get_cookie('lti1p3_' . $this->request['state']) !== $this->request['state']) {
// Error if state is not set, or doesn't match
throw new LTI_Exception("State not found", 1);
}
return $this;
Expand Down Expand Up @@ -369,4 +369,4 @@ private function validate_message() {

}
}
?>
?>