只要您使用Prepare或Query,您都是安全的。
// this is safedb.Query("SELECt name FROM users WHERe age=?", req.FormValue("age"))// this allows sql injection.db.Query("SELECt name FROM users WHERe age=" + req.FormValue("age"))
欢迎分享,转载请注明来源:内存溢出
只要您使用Prepare或Query,您都是安全的。
// this is safedb.Query("SELECt name FROM users WHERe age=?", req.FormValue("age"))// this allows sql injection.db.Query("SELECt name FROM users WHERe age=" + req.FormValue("age"))
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)