PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | admin/controllers/acl.php +20 -3 1.6.9 → 1.8.16 View file →
@@ -44,12 +44,29 @@
44 44 {
45 45 $return = '';
46 46 }
47 47
48 + /**
49 + * Added token validation.
50 + *
51 + * @since 1.7.3
52 + */
53 + if (!JSession::checkToken())
54 + {
55 + // back to main list, missing CSRF-proof token
56 + $app->enqueueMessage(JText::translate('JINVALID_TOKEN'), 'error');
57 + $this->cancel();
58 +
59 + return false;
60 + }
61 +
48 62 // make sure the user is authorised to change ACL
49 63 if (!JFactory::getUser()->authorise('core.admin', 'com_vikbooking'))
50 64 {
51 - $app->redirect($return);
65 + $app->enqueueMessage(JText::translate('JERROR_ALERTNOAUTHOR'), 'error');
66 + $this->cancel();
67 +
68 + return false;
52 69 }
53 70
54 71 $data = $input->get('acl', array(), 'array');
55 72
@@ -66,9 +83,9 @@
66 83 {
67 84 $return = 'admin.php?option=com_vikbooking&view=acl&activerole=' . $active . '&return=' . $encoded;
68 85 }
69 86
70 - $app->redirect($return);
87 + $this->setRedirect($return);
71 88 }
72 89
73 90 public function cancel()
74 91 {
@@ -80,7 +97,7 @@
80 97 {
81 98 $return = base64_decode($return);
82 99 }
83 100
84 - $app->redirect($return);
101 + $this->setRedirect($return);
85 102 }
86 103 }