fixed 解决安全问题访问附件,id改为uuid,id查询修改

This commit is contained in:
2023-12-13 09:26:49 +08:00
parent 60c8b25075
commit b29e500645
3 changed files with 3 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ class IdentityVerification < ApplicationRecord
belongs_to :user
enum state: { "待审核": 0, "已通过": 1, "已拒绝": 2}
after_create do
Attachment.where(id:[card_front,card_back,hold_card_front,hold_card_back]).update_all(is_public:0)
Attachment.where(uuid:[card_front,card_back,hold_card_front,hold_card_back]).update_all(is_public:0)
end
after_save do