diff --git a/webapp/controller/MarketController.class.php b/webapp/controller/MarketController.class.php index 31b35e96..be34d1c2 100644 --- a/webapp/controller/MarketController.class.php +++ b/webapp/controller/MarketController.class.php @@ -491,6 +491,10 @@ class MarketController extends BaseAuthedController $this->_rspErr(1, 's_price not found'); return; } + if (!is_numeric($s_price)) { + $this->_rspErr(1, 's_price must be number'); + return; + } if ($s_price <= 0) { $this->_rspErr(1, 's_price must > 0'); return; @@ -501,6 +505,10 @@ class MarketController extends BaseAuthedController $this->_rspErr(1, 'amount not found'); return; } + if (!is_numeric($amount)) { + $this->_rspErr(1, 'amount must be number'); + return; + } if ($amount <= 0) { $this->_rspErr(1, 'amount must > 0'); return; @@ -641,7 +649,15 @@ class MarketController extends BaseAuthedController { $idx = getReqVal('idx', ''); $s_price = getReqVal('s_price', ''); - + if (empty($s_price)) { + $this->_rspErr(1, 's_price not found'); + return; + } + if (!is_numeric($s_price)) { + $this->_rspErr(1, 's_price must be number'); + return; + } + $address = $this->_getAddress(); if (!$address) { $this->_rspErr(1, 'address not found'); @@ -689,6 +705,14 @@ class MarketController extends BaseAuthedController $idx = getReqVal('idx', ''); $s_price = getReqVal('s_price', ''); + if (empty($s_price)) { + $this->_rspErr(1, 's_price not found'); + return; + } + if (!is_numeric($s_price)) { + $this->_rspErr(1, 's_price not number'); + return; + } $goods = $this->getGoodsByIdx($idx); if (!$goods) { diff --git a/webapp/services/callback/MarketSellOrderOk.php b/webapp/services/callback/MarketSellOrderOk.php index f201a45f..4d67c7c0 100644 --- a/webapp/services/callback/MarketSellOrderOk.php +++ b/webapp/services/callback/MarketSellOrderOk.php @@ -66,6 +66,7 @@ class MarketSellOrderOk extends MarketCallbackBase 't_market_store', array( 'token_id' => $tokenId, + 'order_id' => 0, 'o_link' => $orderId, 'nft_token' => $nftToken, 'status' => 0,