fix(app/controller): 修复短信内容查询未添加用户权限验证

- 在 SmsController 中查询短信内容时,添加了用户 ID 的条件限制
- 这个修改确保了用户只能查询自己的短信内容,增强了系统安全性
This commit is contained in:
mao 2025-05-06 14:25:37 +08:00
parent b0feb70bcf
commit fa38561b19

View File

@ -23,7 +23,7 @@ class SmsController
$sms_app = SmsApp::where('user_id', session('user_id'))->get();
// 获取短信内容
$smsContent = SmsContent::select();
$smsContent = SmsContent::select()->where('user_id', session('user_id'));
// 根据应用名称获取短信内容
if (!empty($request->get('app_name'))) {