diff --git a/ProjectLighthouse/Controllers/LoginController.cs b/ProjectLighthouse/Controllers/LoginController.cs index c6f9b1e6..5b137aa4 100644 --- a/ProjectLighthouse/Controllers/LoginController.cs +++ b/ProjectLighthouse/Controllers/LoginController.cs @@ -12,7 +12,6 @@ namespace ProjectLighthouse.Controllers { [Route("LITTLEBIGPLANETPS3_XML/login")] [Produces("text/xml")] public class LoginController : ControllerBase { - [HttpGet] [HttpPost] public async Task Login() { if(!this.Request.Query.TryGetValue("titleID", out StringValues _)) diff --git a/ProjectLighthouse/Types/LoginData.cs b/ProjectLighthouse/Types/LoginData.cs index eca52562..2c215933 100644 --- a/ProjectLighthouse/Types/LoginData.cs +++ b/ProjectLighthouse/Types/LoginData.cs @@ -21,9 +21,9 @@ namespace ProjectLighthouse.Types { public static LoginData CreateFromString(string str) { do { - str = str.Replace("\b", ""); + str = str.Replace("\b", string.Empty); // Trim backspace characters } while(str.Contains('\b')); - + using MemoryStream ms = new(Encoding.ASCII.GetBytes(str)); using BinaryReader reader = new(ms); @@ -34,7 +34,7 @@ namespace ProjectLighthouse.Types { // byte[] endBytes = reader.ReadBytes((int)(ms.Length - reader.BaseStream.Position)); // string end = Encoding.ASCII.GetString(endBytes); - loginData.Username = BinaryHelper.ReadString(reader); + loginData.Username = BinaryHelper.ReadString(reader).Replace("\0", string.Empty); return loginData; }