Internal add hash to login form for all logins, fix registration patch

This commit is contained in:
2025-09-21 17:42:06 -04:00
parent 584f19b016
commit 10e8797ba2
4 changed files with 48 additions and 13 deletions

View File

@@ -0,0 +1,30 @@
using BestHTTP.Forms;
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using undead_universal_patch_il2cpp.Core;
namespace undead_universal_patch_il2cpp.Patches.Internals;
[HarmonyPatch]
public class LoginHelperFieldsPatch
{
static PatchTypesResult typesResult = Util.PreparePatchTypes(
"Add patch hash to the login form",
"RecNet.Login",
"LoginHelper"
);
static MethodBase TargetMethod() => typesResult.Method;
static bool Prepare() => typesResult.Success;
static void Prefix(ref HTTPUrlEncodedForm loginParams)
{
loginParams.AddField("x-patch-plugin-hash", PluginHash.GetHash());
Util.ConditionalDebug("Added hash to login form");
}
}