Merge pull request from GHSA-c8wx-65c7-q9r3

Co-authored-by: Slendy <josh@slendy.pw>
This commit is contained in:
sudokoko 2023-12-23 00:49:59 -05:00 committed by GitHub
parent e593d5c957
commit ef87606ba2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41069 additions and 1 deletions

View file

@ -4,6 +4,7 @@ using LBPUnion.ProjectLighthouse.Database;
using LBPUnion.ProjectLighthouse.Extensions;
using LBPUnion.ProjectLighthouse.Files;
using LBPUnion.ProjectLighthouse.Logging;
using LBPUnion.ProjectLighthouse.Servers.GameServer.Helpers;
using LBPUnion.ProjectLighthouse.Servers.GameServer.Types.Users;
using LBPUnion.ProjectLighthouse.Types.Entities.Level;
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
@ -85,7 +86,9 @@ public class UserController : ControllerBase
{
if (string.IsNullOrWhiteSpace(resource)) continue;
if (!FileHelper.ResourceExists(resource)) return this.BadRequest();
if (!FileHelper.ResourceExists(resource) && !resource.StartsWith('g')) return this.BadRequest();
if (!GameResourceHelper.IsValidTexture(resource)) return this.BadRequest();
}
if (update.IconHash != null) user.IconHash = update.IconHash;