作者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