From f44f80ec38727f665c583664bb844afc1a2358b8 Mon Sep 17 00:00:00 2001 From: AlanMoonbase Date: Thu, 13 Mar 2025 11:41:37 -0700 Subject: [PATCH] use different key format in ``GetRules`` if client version is one of the wojs lands --- src/Controllers/Common/AuthenticationController.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Controllers/Common/AuthenticationController.cs b/src/Controllers/Common/AuthenticationController.cs index 3fc5548..8e94a34 100644 --- a/src/Controllers/Common/AuthenticationController.cs +++ b/src/Controllers/Common/AuthenticationController.cs @@ -24,11 +24,14 @@ public class AuthenticationController : Controller { [Produces("application/xml")] [Route("v3/AuthenticationWebService.asmx/GetRules")] [EncryptResponse] - public IActionResult GetRules() { + public IActionResult GetRules([FromForm] string apiKey) { GetProductRulesResponse response = new GetProductRulesResponse { GlobalSecretKey = "11A0CC5A-C4DF-4A0E-931C-09A44C9966AE" }; + if (ClientVersion.GetVersion(apiKey) <= ClientVersion.WoJS_AdvLand) + response.GlobalSecretKey = "11A0CC5AC4DF4A0E931C09A44C9966AE"; // lands use different key format + return Ok(response); }