转:防止SQL注入性字符的判断函数
摘要:
CREATE FUNCTION [dbo].[fn_CheckSQLInjection] ( @Col nvarchar(4000) ) RETURNS BIT --如果存在可能的注入字符返回true,反之返回falseAS BEGIN DECLARE @result bit; IF UPPER(@Col) LIKE UPPER(N'%0x%') OR UPPER(@Col) LIKE UPPER(N'%;%') OR UPPER(@Col) LIKE UPPER(N'%''%') OR UPPER(@Col) LIKE UPPE 阅读全文
posted @ 2011-12-01 11:56
玄德
阅读(185)
评论(0)
推荐(0)
浙公网安备 33010602011771号