특정 문자를 검색하여 SQL에 치명적인 오류를 발생하는 문자일 경우
사용을 금지한다.
function checkSqlInjection(strData)
dim CheckArray
dim Checkdata
CheckArray = Array("'or", "' or", "or'", "or '", "like'", "like '", "union ", " from ", "delete ", "insert ", "update ", "select ", "xp_cmdshell", "exec ", "master")
checkSqlInjection="Y"
for i=0 to ubound(CheckArray )
Checkdata=0
Checkdata=instr(strData, CheckArray(i))
if CheckData>0 then
checkSqlInjection = "N"
exit function
end if
next
end function
'먹고 사는 일 > Web' 카테고리의 다른 글
프로세스 강제 종료 (0) | 2010.02.17 |
---|---|
web 에서 DB 입력 특수문자 처리 (0) | 2010.02.12 |
parent 에 데이터 전송 (0) | 2010.02.12 |
include (0) | 2010.02.12 |
iframe 사용하기 (0) | 2010.02.12 |