作者TonyQ (骨头)
看板Database
标题[SQL ] SQL Injection
时间Fri Jul 21 21:43:20 2006
我想讨论的是就如同这篇文章所说的
http://www.microsoft.com/Taiwan/sql/SQL_Injection_G1.htm
在网页上有时候会碰到
要直接抓使用者的语句
比方说
Sql="select * from user where user='" + request.getParameter(XX) +"';"
这样的句子
我的处理法是都把request回来的内容 , 把'去掉,至少可以让句子不中断~
不过我看过有些处理法是透过ResultSet(JSP)或DataSet(ASP)去新增资料,
就没这个问题,但是又好像不是都能这麽用。
我修过ASP的课程,不过老师对於这点倒是没甚麽提及...
不知道板上有没有甚麽同好,对於这议题可以交流一下的。^^
--
String temp="relax"; | Life just like programing
while(buringlife) String.forgot(temp); | to be right or wrong
while(sleeping) brain.setMemoryOut(); | need not to say
stack.push(life.running); | the complier will
stack.push(scouting.buck()); | answer your life
stack.push(bowling.pratice()); | Bone
everything
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.138.240.58
1F:推 Adonisy:这我同事写的 07/21 22:52