问答 / 0 / 1 / 创建于 5年前
本小节到最后:在评论框输入:
<script>alert('存在 XSS 安全威胁!')</script>
内容被过滤后,内容为空,同样可以写入数据库?这个问题你们是怎么解决的?
同样有此问题。 现加在RepliesController的store方法中, if($reply->content){ $reply->save(); return redirect()->to($reply->topic->link())->with('success', '评论创建成功!'); }else{ return redirect()->to($reply->topic->link())->with('danger', '评论创建失败!'); }
有没有办法写在ReplyObserver 中, 使之在验证content的长度之前。但怎么写呢?
我要举报该,理由是:
推荐文章: