sql Injection 처리
특정 문자를 검색하여 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..
더보기
web 에서 DB 입력 특수문자 처리
Web 에서 DB로 insert 할때 특수 문자 오류가 발생하는 경우가 많다. 그래서 기본적인 특수 문자는 변환하여 입력한다. Function ConvertChar(strValue) strValue = trim(strValue) strValue = Replace(strValue, "&", "&") strValue = Replace(strValue, "", ">") strValue = Replace(strValue, "'", "'") strValue = Replace(strValue, """", """) strValue = Replace(strValue, "|", "|") strValue = Replace(strValue, vbCrLf, " ") ConvertChar = strValue End Functi..
더보기