Make Login signature test more consistent

This commit is contained in:
Slendy 2023-01-19 21:40:20 -06:00
commit 87ceca9c63
No known key found for this signature in database
GPG key ID: 7288D68361B91428

View file

@ -68,7 +68,14 @@ public class LoginTests : LighthouseServerTest<GameServerTestStartup>
.SetUsername(username)
.SetUserId(userId)
.Build();
ticketData[^21] = 0;
// Create second ticket and replace the first tickets signature with the first.
byte[] ticketData2 = new TicketBuilder()
.SetUsername(username)
.SetUserId(userId)
.Build();
Array.Copy(ticketData2, ticketData2.Length - 0x38, ticketData, ticketData.Length - 0x38, 0x38);
HttpResponseMessage response = await this.Client.PostAsync("/LITTLEBIGPLANETPS3_XML/login", new ByteArrayContent(ticketData));
Assert.False(response.IsSuccessStatusCode);
Assert.True(response.StatusCode == HttpStatusCode.BadRequest);