Things were working, suddenly regressed

This commit is contained in:
gamer147
2026-05-23 18:14:42 -04:00
parent 56d3cf0ec8
commit 66184b3685
31 changed files with 1493 additions and 97 deletions

View File

@@ -104,7 +104,7 @@ public class ShadowverseTranslationMiddleware : IMiddleware
Data = responseData,
DataHeaders = new DataHeaders
{
Servertime = DateTime.UtcNow.Ticks,
Servertime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(),
// SID intentionally empty. See docs/api-spec/common/envelope.md §"SID
// rotation" — the client's SessionId is a hash-on-read property, so echoing
// the request's SID poisons its backing field and the next request hashes
@@ -115,8 +115,13 @@ public class ShadowverseTranslationMiddleware : IMiddleware
Sid = "",
// TODO error handling
ResultCode = 1,
ShortUdid = viewer.ShortUdid,
ViewerId = viewer.Id
// Anonymous endpoints (e.g. /check/special_title with [AllowAnonymous]) reach this
// middleware without an authenticated viewer — the auth handler either declined or
// failed to find a Steam-linked viewer. The wire still needs short_udid / viewer_id
// populated (prod sends real numbers for the title check too, but 0 / 0 satisfies
// the client's BaseTask.Parse which only reads result_code + servertime here).
ShortUdid = viewer?.ShortUdid ?? 0,
ViewerId = viewer?.Id ?? 0
}
};