mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-18 07:32:27 +00:00
Add unimplemented LBP3 login field (#495)
* Add unsupported LBP3 features * Add GameApiExternal config url * Add more exempt urls to digest check * Make exemptPathList static
This commit is contained in:
parent
3ad211e5c8
commit
ded7628085
6 changed files with 28 additions and 7 deletions
|
@ -14,6 +14,18 @@ public class DigestMiddleware : Middleware
|
|||
this.computeDigests = computeDigests;
|
||||
}
|
||||
|
||||
private static readonly HashSet<string> exemptPathList = new()
|
||||
{
|
||||
"/login",
|
||||
"/eula",
|
||||
"/announce",
|
||||
"/status",
|
||||
"/farc_hashes",
|
||||
"/t_conf",
|
||||
"/network_settings.nws",
|
||||
"/ChallengeConfig.xml",
|
||||
};
|
||||
|
||||
public override async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
// Client digest check.
|
||||
|
@ -72,8 +84,7 @@ public class DigestMiddleware : Middleware
|
|||
#if !DEBUG
|
||||
// The game doesn't start sending digests until after the announcement so if it's not one of those requests
|
||||
// and it doesn't include a digest we need to reject the request
|
||||
else if (!ServerStatics.IsUnitTesting && !strippedPath.Equals("/login") && !strippedPath.Equals("/eula")
|
||||
&& !strippedPath.Equals("/announce") && !strippedPath.Equals("/status") && !strippedPath.Equals("/farc_hashes"))
|
||||
else if (!ServerStatics.IsUnitTesting && !exemptPathList.Contains(strippedPath))
|
||||
{
|
||||
context.Response.StatusCode = 403;
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue