Skip to content

Commit

Permalink
Add bandaid fix to RemoteClient.Reset for SecAd GHSA-hvm9-wc8j-mgrc
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiCM committed Dec 16, 2024
1 parent 0b6bf9e commit 5075997
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions TShockAPI/TShock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,8 @@ public override void Initialize()
Hooks.AccountHooks.AccountDelete += OnAccountDelete;
Hooks.AccountHooks.AccountCreate += OnAccountCreate;

On.Terraria.RemoteClient.Reset += RemoteClient_Reset;

GetDataHandlers.InitGetDataHandler();
Commands.InitCommands();

Expand Down Expand Up @@ -496,6 +498,12 @@ void SafeError(string message)
}
}

private static void RemoteClient_Reset(On.Terraria.RemoteClient.orig_Reset orig, RemoteClient client)
{
client.ClientUUID = null;
orig(client);
}

private static void OnAchievementInitializerLoad(ILContext il)
{
// Modify AchievementInitializer.Load to remove the Main.netMode == 2 check (occupies the first 4 IL instructions)
Expand Down
2 changes: 1 addition & 1 deletion TShockAPI/TShockAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Also, be sure to release on github with the exact assembly version tag as below
so that the update manager works correctly (via the Github releases api and mimic)
-->
<Version>5.2.0</Version>
<Version>5.2.1</Version>
<AssemblyTitle>TShock for Terraria</AssemblyTitle>
<Company>Pryaxis &amp; TShock Contributors</Company>
<Product>TShockAPI</Product>
Expand Down

0 comments on commit 5075997

Please sign in to comment.