From a16cbf72b17730209669d485e8ceda817824652e Mon Sep 17 00:00:00 2001 From: Pwntus Date: Fri, 27 May 2016 00:25:52 +0200 Subject: [PATCH] Prevent re-purchase of item if page is reloaded after POST --- shop.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/shop.php b/shop.php index 402f803..6b0f8f7 100644 --- a/shop.php +++ b/shop.php @@ -10,7 +10,7 @@ if (isset($_GET['callback']) && $_GET['callback'] === 'processing') { $shop = $config['shop']; $shop_list = $config['shop_offers']; -if (!empty($_POST['buy'])) { +if (!empty($_POST['buy']) && $_SESSION['shop_session'] == $_POST['session']) { $time = time(); $player_points = (int)$user_znote_data['points']; $cid = (int)$user_data['id']; @@ -73,7 +73,7 @@ if ($shop['enabled']) {

Shop Offers

= $buy['points']) { ?>You have points. (Buy points).
+
Buy Points system disabled.

Sorry, this functionality is disabled.

'; include 'layout/overall/footer.php'; ?>