From d05c2ac7cc7859b6999d71bee8d68f89cdcd0822 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Sat, 20 Jan 2018 10:56:18 +0800 Subject: [PATCH] MDL-61242 repository_equella: Add source key when sending the source. A thank you to Nelson Cheng for find this issue and suggesting a patch. --- repository/equella/callback.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/repository/equella/callback.php b/repository/equella/callback.php index 0772a859b50..ffd84354dac 100644 --- a/repository/equella/callback.php +++ b/repository/equella/callback.php @@ -60,6 +60,7 @@ if (isset($info->license)) { } $source = base64_encode(json_encode(array('url'=>$url,'filename'=>$filename))); +$sourcekey = sha1($source . repository::get_secret_key() . sesskey()); $js =<< @@ -70,6 +71,7 @@ $js =<<