fix: 充值订单列表按当前登录资产过滤,修复越权查看其他资产数据的漏洞
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -32,7 +32,7 @@ func NewClientRechargeOrderHandler(
|
||||
return &ClientRechargeOrderHandler{
|
||||
rechargeOrderStore: rechargeOrderStore,
|
||||
paymentStore: paymentStore,
|
||||
logger: logger,
|
||||
logger: logger,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,10 @@ func (h *ClientRechargeOrderHandler) ListRechargeOrders(c *fiber.Ctx) error {
|
||||
PageSize: req.PageSize,
|
||||
UserID: &customerID,
|
||||
}
|
||||
if assetType, assetID, ok := middleware.GetCurrentAsset(c); ok {
|
||||
params.ResourceType = &assetType
|
||||
params.ResourceID = &assetID
|
||||
}
|
||||
if req.Status > 0 {
|
||||
params.Status = &req.Status
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user