次のコードは aspcms システムから取得したものです。パラメータ値と SQL セキュリティ フィルタリング パラメータの取得には制限があります。コードは次のとおりです。 'パラメータ値の取得 Function getForm(element,ftype)Select case ftypecase getgetForm=trim(request) .QueryString (要素))case postgetForm=trim(request.Form(要素))case Bothif isNul(request.QueryString(要素)) then getForm=trim(request.Form(element)) else getForm=trim(request.QueryString(element))End SelectgetForm=replace(getForm,CHR(34),)getForm=replace(getForm,CHR(39),') End Function の主な機能は、パラメータ値を取得することです。これは、request(element) を直接使用するよりもはるかに安全です。 フィルタ パラメータ関数 filterPara(byVal)。 Para)filterPara=preventSqlin(Checkxss(Para))End FunctionFunctionPreventSqlin(content)dim sqlStr,sqlArray,i,speStrsqlStr=<|>|%|%27|'|''|;|*|and|exec|dbcc|alter|drop|insert|select|update|delete|count|master|truncate| char|declare|where|set|declare|mid|chrif isNul(content) then Exit FunctionsqlArray=split(sqlStr,|)for i=lbound(sqlArray) to ubound(sqlArray)if instr(lcase(content),sqlArray(i))<>0 thenselect case sqlArray(i)case <:speStr=<case >:speStr=>case ',:speStr ='ケース ;:speStr=; ケース else:speStr=; selectcontent=replace(content,sqlArray(i),speStr,1,-1,1)end ifnextpreventSqlin=contentEnd Function' 上記のパラメーター フィルター関数は、主に SQL インジェクションを防止し、保護を強化することを目的としています。