mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
In email processing, change sitesecret (non existant) to (already used) siteidentifier
This commit is contained in:
parent
915602ea79
commit
303d0af144
@ -44,7 +44,7 @@ $mod = substr($address,4,2);
|
||||
$modargs = substr($address,6,-16);
|
||||
$hash = substr($address,-16);
|
||||
|
||||
if (substr(md5($prefix.$mod.$modargs.$CFG->sitesecret),0,16) != $hash) {
|
||||
if (substr(md5($prefix.$mod.$modargs.$CFG->siteidentifier),0,16) != $hash) {
|
||||
die("HASH DIDN'T MATCH!\n");
|
||||
}
|
||||
list(,$modid) = unpack('C',base64_decode($mod.'=='));
|
||||
|
@ -2707,9 +2707,9 @@ function setup_and_print_groups($course, $groupmode, $urlroot) {
|
||||
|
||||
function generate_email_processing_address($modid,$modargs) {
|
||||
global $CFG;
|
||||
|
||||
if (empty($CFG->sitesecret)) {
|
||||
set_config('sitesecret',random_string(10));
|
||||
|
||||
if (empty($CFG->siteidentifier)) { // Unique site identification code
|
||||
set_config('siteidentifier', random_string(32));
|
||||
}
|
||||
|
||||
$header = $CFG->mailprefix . substr(base64_encode(pack('C',$modid)),0,2).$modargs;
|
||||
|
Loading…
x
Reference in New Issue
Block a user