Debug v21

This commit is contained in:
Laurent Destailleur (aka Eldy) 2025-01-14 12:02:52 +01:00
parent f35c232530
commit 84940c6f84
6 changed files with 12 additions and 12 deletions

View File

@ -291,7 +291,7 @@ class ConferenceOrBooth extends ActionComm
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_new.php?id='.urlencode((string) ($id)).'&type=conf';
$encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.$id, '2');
$encodedsecurekey = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.((int) $id), 'md5');
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
/*$this->fields['pubregister'] = array('type'=>'url', 'label'=>$langs->trans("PublicAttendeeSubscriptionPage"), 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>1);

View File

@ -362,7 +362,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
// If the registration has already been paid for this attendee
if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
$securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, 'master');
$securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5');
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl);
$mesg = $langs->trans("RegistrationAndPaymentWereAlreadyRecorded", $email);
@ -698,7 +698,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment');
}
$securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, '2');
$securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5');
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl);
header("Location: ".$redirection);

View File

@ -81,7 +81,7 @@ $error = 0;
// Security check
$id = GETPOSTINT("id");
$securekeyreceived = GETPOST("securekey");
$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, '2');
$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5');
if ($securekeyreceived != $securekeytocompare) {
print $langs->trans('MissingOrBadSecureKey');

View File

@ -94,7 +94,7 @@ if ($resultproject < 0) {
// Security check
$securekeyreceived = GETPOST('securekey', 'alpha');
$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, 'md5');
$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5');
if ($securekeytocompare != $securekeyreceived) {
print $langs->trans('MissingOrBadSecureKey');
@ -550,7 +550,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he
dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment');
}
$securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, '2');
$securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5');
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$id.'&securekey='.$securekeyurl;
header("Location: ".$redirection);
exit;

View File

@ -94,7 +94,7 @@ if ($resultproject < 0) {
// Security check
$securekeyreceived = GETPOST('securekey', 'alpha');
$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, 'md5');
$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5');
if ($securekeytocompare != $securekeyreceived) {
print $langs->trans('MissingOrBadSecureKey');
@ -486,7 +486,7 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he
if (!$error) {
$db->commit();
$securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, '2');
$securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5');
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl);
header("Location: ".$redirection);
exit;

View File

@ -81,7 +81,7 @@ $error = 0;
$action = GETPOST('action', 'aZ09');
$id = GETPOST('id');
$securekeyreceived = GETPOST("securekey");
$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, 'md5');
$securekeytocompare = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.((int) $id), 'md5');
if ($securekeytocompare != $securekeyreceived) {
print $langs->trans('MissingOrBadSecureKey');
@ -173,10 +173,10 @@ while ($i < $db->num_rows($result)) {
*/
// Get vote result
$idvote = GETPOST("vote");
$hashedvote = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'vote'.$idvote);
$idvote = GETPOSTINT("vote");
$hashedvote = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'vote'.$idvote);
if (strlen($idvote)) {
if ($idvote > 0) {
if (in_array($hashedvote, $listofvotes)) {
// Has already voted
$votestatus = 'ko';