From 2937aa56cb9cac5c650f59443375a355ab047f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Thu, 23 Mar 2017 13:10:53 +0100 Subject: [PATCH] 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. --- mod/lti/servicelib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/mod/lti/servicelib.php b/mod/lti/servicelib.php index 88ebdb1c49a..0dae3d0c6f6 100644 --- a/mod/lti/servicelib.php +++ b/mod/lti/servicelib.php @@ -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; }