Skip to content

Commit

Permalink
Remove the check for new_secret
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Nov 10, 2016
1 parent 03491e8 commit f7a6261
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions lti/tp_commit.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}

$row = $PDOX->rowDie(
"SELECT secret, new_secret
"SELECT secret
FROM {$CFG->dbprefix}lti_key
WHERE ack = :ACK AND key_sha256 = :SHA LIMIT 1",
array(":SHA" => $key_sha256, ":ACK" => $commit)
Expand All @@ -45,15 +45,11 @@
error_log('LTIX::curPageUrl()='.LTIX::curPageUrl());
$retval = LTI::verifyKeyAndSecret($oauth_consumer_key, $row['secret'],LTIX::curPageUrl());
if ( $retval !== true ) {
error_log("Checking new_secret");
$retval = LTI::verifyKeyAndSecret($oauth_consumer_key, $row['new_secret'], LTIX::curPageUrl());
if ( $retval !== true ) {
if (function_exists('http_response_code')) {
http_response_code(404);
}
error_log("LTI Failure:".$retval[0]."\n".$retval[1]);
die("LTI Failure:".$retval[0]."\n".$retval[1]);
if (function_exists('http_response_code')) {
http_response_code(404);
}
error_log("LTI Failure:".$retval[0]."\n".$retval[1]);
die("LTI Failure:".$retval[0]."\n".$retval[1]);
}

if ( $method == "PUT" ) {
Expand Down

0 comments on commit f7a6261

Please sign in to comment.