In email processing, change sitesecret (non existant) to (already used) siteidentifier

This commit is contained in:
mjollnir_ 2005-02-10 07:53:52 +00:00
parent 915602ea79
commit 303d0af144
2 changed files with 4 additions and 4 deletions

View File

@ -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.'=='));

View File

@ -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;