Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
99470398
Commit
99470398
authored
Feb 16, 2023
by
wyc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大小写比对
parent
0b5b8bf8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
performance/Performance.Api/Filters/AntiSqlInjectFilter.cs
+1
-1
performance/Performance.Api/appsettings.Localhost.json
+2
-2
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+5
-0
No files found.
performance/Performance.Api/Filters/AntiSqlInjectFilter.cs
View file @
99470398
...
@@ -105,7 +105,7 @@ public AntiSqlInjectFilter(IOptions<Application> options)
...
@@ -105,7 +105,7 @@ public AntiSqlInjectFilter(IOptions<Application> options)
if
(
_application
.
OpenAntiSqlInject
==
true
)
if
(
_application
.
OpenAntiSqlInject
==
true
)
{
{
var
routePath
=
context
.
HttpContext
.
Request
.
Path
.
ToString
();
var
routePath
=
context
.
HttpContext
.
Request
.
Path
.
ToString
();
if
(
_application
.
AntiSqlInjectRouteWhite
?.
Any
(
route
=>
route
.
Equals
(
routePath
))
!=
true
)
if
(
_application
.
AntiSqlInjectRouteWhite
?.
Any
(
route
=>
route
.
Equals
(
routePath
,
StringComparison
.
OrdinalIgnoreCase
))
!=
true
)
{
{
foreach
(
var
value
in
context
.
ActionArguments
.
Where
(
w
=>
w
.
Value
!=
null
).
Select
(
w
=>
w
.
Value
))
foreach
(
var
value
in
context
.
ActionArguments
.
Where
(
w
=>
w
.
Value
!=
null
).
Select
(
w
=>
w
.
Value
))
{
{
...
...
performance/Performance.Api/appsettings.Localhost.json
View file @
99470398
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
"OpenAntiSqlInject"
:
true
,
"OpenAntiSqlInject"
:
true
,
//
开启反SQL注入白名单地址
//
开启反SQL注入白名单地址
"AntiSqlInjectRouteWhite"
:
[
"AntiSqlInjectRouteWhite"
:
[
"
account/logins
"
,
"
/api/account/login
"
,
"account/quick/login"
"
/api/
account/quick/login"
],
],
//登录过期时间
//登录过期时间
"ExpirationMinutes"
:
"1200"
,
"ExpirationMinutes"
:
"1200"
,
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
99470398
...
@@ -54,6 +54,11 @@
...
@@ -54,6 +54,11 @@
是否开启反SQL注入 默认关闭 true 开启 false 关闭
是否开启反SQL注入 默认关闭 true 开启 false 关闭
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.AppSettings.Application.AntiSqlInjectRouteWhite"
>
<summary>
开启反SQL注入白名单地址
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AppSettings.RateLimitingConfig.Endpoints"
>
<member
name=
"P:Performance.DtoModels.AppSettings.RateLimitingConfig.Endpoints"
>
<summary>
<summary>
路径
路径
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment