!1124 【修复】修复会员取消售后接口中未校验用户ID的漏洞

Merge pull request !1124 from 杨宇庆/N/A
This commit is contained in:
芋道源码 2024-11-09 07:29:00 +00:00 committed by Gitee
commit b93199bd0a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -399,7 +399,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
@AfterSaleLog(operateType = AfterSaleOperateTypeEnum.MEMBER_CANCEL)
public void cancelAfterSale(Long userId, Long id) {
// 校验售后单的状态并状态待退款
AfterSaleDO afterSale = tradeAfterSaleMapper.selectById(id);
AfterSaleDO afterSale = tradeAfterSaleMapper.selectByIdAndUserId(id, userId);
if (afterSale == null) {
throw exception(AFTER_SALE_NOT_FOUND);
}