FIX the online signature feature
This commit is contained in:
parent
326686794a
commit
a0d56b6db7
@ -91,7 +91,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1)
|
|||||||
if ($mode == 1) {
|
if ($mode == 1) {
|
||||||
$out .= "hash('".$securekeyseed."' + '".$type."' + proposal_ref)";
|
$out .= "hash('".$securekeyseed."' + '".$type."' + proposal_ref)";
|
||||||
} else {
|
} else {
|
||||||
$out .= '&securekey='.dol_hash($securekeyseed.$type.$ref.$object->entity, '0');
|
$out .= '&securekey='.dol_hash($securekeyseed.$type.$ref, '0');
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if ($mode == 1) {
|
if ($mode == 1) {
|
||||||
|
|||||||
@ -139,7 +139,7 @@ if ($source == 'proposal') {
|
|||||||
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
|
$securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dol_verifyHash($securekeyseed.$type.$ref.$object->entity, $SECUREKEY, '0')) {
|
if (!dol_verifyHash($securekeyseed.$type.$ref, $SECUREKEY, '0')) {
|
||||||
http_response_code(403);
|
http_response_code(403);
|
||||||
print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
|
print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user