From f66e6749ae7e8f32b84ddce324125a3fb2974dd6 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 28 May 2020 22:17:23 +0100 Subject: [PATCH] MDL-68860 mod_lti: Oracle support for retrieving shared secrets. Thanks to Mark van Hoek! --- mod/lti/locallib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/lti/locallib.php b/mod/lti/locallib.php index ff4340392ac..a5db3ec0585 100644 --- a/mod/lti/locallib.php +++ b/mod/lti/locallib.php @@ -2388,12 +2388,12 @@ function lti_get_shared_secrets_by_key($key) { // Look up the shared secret for the specified key in both the types_config table (for configured tools) // And in the lti resource table for ad-hoc tools. $lti13 = LTI_VERSION_1P3; - $query = "SELECT t2.value + $query = "SELECT " . $DB->sql_compare_text('t2.value', 256) . " AS value FROM {lti_types_config} t1 JOIN {lti_types_config} t2 ON t1.typeid = t2.typeid JOIN {lti_types} type ON t2.typeid = type.id WHERE t1.name = 'resourcekey' - AND t1.value = :key1 + AND " . $DB->sql_compare_text('t1.value', 256) . " = :key1 AND t2.name = 'password' AND type.state = :configured1 AND type.ltiversion <> :ltiversion