Skip to content

Commit 240b45e

Browse files
authored
Fix being unable to disable Patchwork verification (#810)
Closes #807.
2 parents 37ef98b + 9a9c179 commit 240b45e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Refresh.Interfaces.Game/Endpoints/Handshake/AuthenticationEndpoints.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,11 @@ public class AuthenticationEndpoints : EndpointGroup
178178
if (game == TokenGame.LittleBigPlanetVita && platform == TokenPlatform.PS3) platform = TokenPlatform.Vita;
179179
else if (game == TokenGame.LittleBigPlanetPSP && platform == TokenPlatform.PS3) platform = TokenPlatform.PSP;
180180

181-
// Check if client-side security patches are present.
181+
// Check if client-side security patches are present, if required.
182182
// PSP is invulnerable to most exploits as it does not support multiplayer nor scripting.
183-
if (game != TokenGame.LittleBigPlanetPSP && !context.IsPatchworkVersionValid(config.RequiredPatchworkMajorVersion, config.RequiredPatchworkMinorVersion))
183+
if (config.EnforcePatchwork &&
184+
game != TokenGame.LittleBigPlanetPSP &&
185+
!context.IsPatchworkVersionValid(config.RequiredPatchworkMajorVersion, config.RequiredPatchworkMinorVersion))
184186
{
185187
database.AddLoginFailNotification("The server detected you are not using the latest version of Patchwork. Please update or install it.", user);
186188
context.Logger.LogWarning(BunkumCategory.Authentication, $"{ticket.Username}'s Patchwork version is invalid: {context.RequestHeaders["User-Agent"]}");

0 commit comments

Comments
 (0)