Fix #17743 - token was hashed with membersubscription
#Fix #17743 - token was hashed with membersubscription for retro-compatibility we must try to hash token wth both "membre" ans "membersubscription" to verify unique secure key d'or member
This commit is contained in:
parent
0147ffa737
commit
c94946b934
@ -281,6 +281,9 @@ if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||
if ($tmpsource && $REF) {
|
||||
$token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$tmpsource.$REF, 2); // Use the source in the hash to avoid duplicates if the references are identical
|
||||
if ($SECUREKEY != $token) {
|
||||
$token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$source.$REF, 2); // for retro-compatibility (token may have been hashed with membersubscription in external module)
|
||||
}
|
||||
} else {
|
||||
$token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user