mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-02 18:18:39 +00:00
Make Login signature test more consistent
This commit is contained in:
parent
c4765e81ae
commit
87ceca9c63
1 changed files with 8 additions and 1 deletions
|
@ -68,7 +68,14 @@ public class LoginTests : LighthouseServerTest<GameServerTestStartup>
|
||||||
.SetUsername(username)
|
.SetUsername(username)
|
||||||
.SetUserId(userId)
|
.SetUserId(userId)
|
||||||
.Build();
|
.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));
|
HttpResponseMessage response = await this.Client.PostAsync("/LITTLEBIGPLANETPS3_XML/login", new ByteArrayContent(ticketData));
|
||||||
Assert.False(response.IsSuccessStatusCode);
|
Assert.False(response.IsSuccessStatusCode);
|
||||||
Assert.True(response.StatusCode == HttpStatusCode.BadRequest);
|
Assert.True(response.StatusCode == HttpStatusCode.BadRequest);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue