Skip to content

Commit 5075997

Browse files
committed
Add bandaid fix to RemoteClient.Reset for SecAd GHSA-hvm9-wc8j-mgrc
1 parent 0b6bf9e commit 5075997

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

TShockAPI/TShock.cs

+8
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ public override void Initialize()
428428
Hooks.AccountHooks.AccountDelete += OnAccountDelete;
429429
Hooks.AccountHooks.AccountCreate += OnAccountCreate;
430430

431+
On.Terraria.RemoteClient.Reset += RemoteClient_Reset;
432+
431433
GetDataHandlers.InitGetDataHandler();
432434
Commands.InitCommands();
433435

@@ -496,6 +498,12 @@ void SafeError(string message)
496498
}
497499
}
498500

501+
private static void RemoteClient_Reset(On.Terraria.RemoteClient.orig_Reset orig, RemoteClient client)
502+
{
503+
client.ClientUUID = null;
504+
orig(client);
505+
}
506+
499507
private static void OnAchievementInitializerLoad(ILContext il)
500508
{
501509
// Modify AchievementInitializer.Load to remove the Main.netMode == 2 check (occupies the first 4 IL instructions)

TShockAPI/TShockAPI.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
Also, be sure to release on github with the exact assembly version tag as below
1919
so that the update manager works correctly (via the Github releases api and mimic)
2020
-->
21-
<Version>5.2.0</Version>
21+
<Version>5.2.1</Version>
2222
<AssemblyTitle>TShock for Terraria</AssemblyTitle>
2323
<Company>Pryaxis &amp; TShock Contributors</Company>
2424
<Product>TShockAPI</Product>

0 commit comments

Comments
 (0)