Commit 7b99ff81 by ryun

Merge branch 'feature/SQL注入拦截' into release/v23.2.19高县版

parents b6e145d4 af814b5a
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
using Microsoft.AspNetCore.Mvc;
......@@ -105,7 +106,7 @@ public AntiSqlInjectFilter(IOptions<Application> options)
if (_application.OpenAntiSqlInject == true)
{
var routePath = context.HttpContext.Request.Path.ToString();
if (_application.AntiSqlInjectRouteWhite?.Any(route => route.Equals(routePath,StringComparison.OrdinalIgnoreCase)) != true)
if (_application.AntiSqlInjectRouteWhite?.Any(route => Regex.IsMatch(routePath, route, RegexOptions.IgnoreCase)) != true)
{
foreach (var value in context.ActionArguments.Where(w => w.Value != null).Select(w => w.Value))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment