From 36cd42399dc9890aa52b95ee293aa22533ab3cfb Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 1 Jul 2022 03:00:14 -0500 Subject: [PATCH] Fix icon updating for default game assets (#338) --- .../Controllers/UserController.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/UserController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/UserController.cs index d068b1da..5f3defaa 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/UserController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/UserController.cs @@ -104,12 +104,9 @@ public class UserController : ControllerBase user.Biography = update.Biography; } - foreach (string? resource in new[] - { - update.IconHash, update.YayHash, update.MehHash, update.BooHash, update.PlanetHash, - }) + foreach (string? resource in new[]{update.IconHash, update.YayHash, update.MehHash, update.BooHash, update.PlanetHash,}) { - if (resource != null && !FileHelper.ResourceExists(resource)) return this.BadRequest(); + if (resource != null && !resource.StartsWith('g') && !FileHelper.ResourceExists(resource)) return this.BadRequest(); } if (update.IconHash != null) user.IconHash = update.IconHash;