MDL-58374 lti: Log the error message of a failed message verification

Previously the exception message (which holds the actual explanation of
what went wrong) was thrown away so the user had no way to debug.
This commit is contained in:
David Mudrák 2017-03-23 13:10:53 +01:00
parent bd99cb9021
commit 2937aa56cb

View File

@ -250,6 +250,7 @@ function lti_verify_message($key, $sharedsecrets, $body, $headers = null) {
// TODO: Switch to core oauthlib once implemented - MDL-30149.
lti\handle_oauth_body_post($key, $secret, $body, $headers);
} catch (Exception $e) {
debugging('LTI message verification failed: '.$e->getMessage());
$signaturefailed = true;
}