every id is now clear in url + in the hash of the securekey
This commit is contained in:
parent
7405725198
commit
df28491524
@ -241,8 +241,7 @@ class ConferenceOrBooth extends ActionComm
|
||||
|
||||
$result = parent::fetch($id, $ref, $ref_ext, $email_msgid);
|
||||
|
||||
$encodedid = dol_encode($id, $dolibarr_main_instance_unique_id);
|
||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$encodedid;
|
||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_subscription.php?id='.$id;
|
||||
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||
|
||||
@ -364,8 +364,7 @@ if ($projectid > 0) {
|
||||
|
||||
// Link to the vote/register page
|
||||
print '<tr><td>'.$langs->trans("RegisterPage").'</td><td>';
|
||||
$encodedid = dol_encode($project->id, $dolibarr_main_instance_unique_id);
|
||||
$linkregister = $dolibarr_main_url_root.'/public/project/index.php?id='.$encodedid;
|
||||
$linkregister = $dolibarr_main_url_root.'/public/project/index.php?id='.$project->id;
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 2);
|
||||
$linkregister .= '&securekey='.urlencode($encodedsecurekey);
|
||||
print '<a target="_blank" href="'.$linkregister.'">'.$linkregister.'</a>';
|
||||
|
||||
@ -85,8 +85,7 @@ $email = GETPOST("email");
|
||||
$societe = GETPOST("societe");
|
||||
|
||||
// Getting id from Post and decoding it
|
||||
$encodedid = GETPOST('id');
|
||||
$id = dol_decode($encodedid, $dolibarr_main_instance_unique_id);
|
||||
$id = GETPOST('id');
|
||||
|
||||
$conference = new ConferenceOrBooth($db);
|
||||
$resultconf = $conference->fetch($id);
|
||||
@ -248,9 +247,8 @@ if (empty($reshook) && $action == 'add') {
|
||||
|
||||
// If the attendee has already paid
|
||||
if ($confattendee->status == 1) {
|
||||
$encodedid = dol_encode($id, $dolibarr_main_instance_unique_id);
|
||||
$securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$encodedid.'&securekey='.$securekeyurl;
|
||||
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$id.'&securekey='.$securekeyurl;
|
||||
Header("Location: ".$redirection);
|
||||
exit;
|
||||
}
|
||||
@ -434,9 +432,8 @@ if (empty($reshook) && $action == 'add') {
|
||||
dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment');
|
||||
}
|
||||
|
||||
$encodedid = dol_encode($id, $dolibarr_main_instance_unique_id);
|
||||
$securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$encodedid.'&securekey='.$securekeyurl;
|
||||
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$id.'&securekey='.$securekeyurl;
|
||||
Header("Location: ".$redirection);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -65,8 +65,7 @@ $object = new stdClass(); // For triggers
|
||||
$error = 0;
|
||||
|
||||
// Security check
|
||||
$encodedid = GETPOST("id");
|
||||
$id = dol_decode($encodedid, $dolibarr_main_instance_unique_id);
|
||||
$id = GETPOST("id");
|
||||
$securekeyreceived = GETPOST("securekey");
|
||||
$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||
|
||||
|
||||
@ -78,8 +78,7 @@ $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors",
|
||||
// No check on module enabled. Done later according to $validpaymentmethod
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$encodedid = GETPOST('id');
|
||||
$id = dol_decode($encodedid, $dolibarr_main_instance_unique_id);
|
||||
$id = GETPOST('id');
|
||||
$securekeyreceived = GETPOST("securekey");
|
||||
$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user