Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LTI_Message_Launch.php #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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() {

}
}
?>
?>