Skip to content

Commit

Permalink
restrict actionquery
Browse files Browse the repository at this point in the history
  • Loading branch information
area363 committed Sep 14, 2023
1 parent 407c21c commit df425ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion NineChronicles.Headless.Executable/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,19 @@
"Endpoint": "*:/graphql/stagetransaction",
"Period": "60s",
"Limit": 12
},
{
"Endpoint": "*:/graphql/actionquery",
"Period": "600s",
"Limit": 1
}
],
"QuotaExceededResponse": {
"Content": "{{ \"message\": \"Whoa! Calm down, cowboy!\", \"details\": \"Quota exceeded. Maximum allowed: {0} per {1}. Please try again in {2} second(s).\" }}",
"ContentType": "application/json",
"StatusCode": 429
},
"IpBanThresholdCount": 10,
"IpBanThresholdCount": 5,
"IpBanMinute" : 60,
"IpBanResponse": {
"Content": "{ \"message\": \"Your Ip has been banned.\" }",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public override async Task<ClientRequestIdentity> ResolveIdentityAsync(HttpConte
identity.Path = "/graphql/stagetransaction";
}

if (body.Contains("actionQuery{hackAndSlash"))
{
identity.Path = "/graphql/actionquery";
}

return identity;
}

Expand Down

0 comments on commit df425ea

Please sign in to comment.