Pārlūkot izejas kodu

sql安全注入

clq1010 8 gadi atpakaļ
vecāks
revīzija
b4e9ef40f5

+ 1 - 1
代码/鹤壁市长热线_20160725/Code/HBSMayorHotline/Web/WebSite/PeopleCondition.aspx.cs

22
         string[] _operations = GetSearchItems(searchItems);
22
         string[] _operations = GetSearchItems(searchItems);
23
         foreach (string s in _operations)
23
         foreach (string s in _operations)
24
         {
24
         {
25
-            if (SZRX.Common.ValidateUtil.isSafeSqlCode(s))
25
+            if (!SZRX.Common.ValidateUtil.isSafeSqlCode(s))
26
             {
26
             {
27
                 return "参数不符合规范";
27
                 return "参数不符合规范";
28
             }
28
             }

+ 1 - 1
代码/鹤壁市长热线_20160725/Code/HBSMayorHotline/Web/WebSite/WorkSearch.aspx.cs

50
         string[] _operations = GetSearchItems(searchItems);
50
         string[] _operations = GetSearchItems(searchItems);
51
         foreach (string s in _operations)
51
         foreach (string s in _operations)
52
         {
52
         {
53
-            if (SZRX.Common.ValidateUtil.isSafeSqlCode(s))
53
+            if (!SZRX.Common.ValidateUtil.isSafeSqlCode(s))
54
             {
54
             {
55
                 return "参数不符合规范";
55
                 return "参数不符合规范";
56
             }
56
             }