mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-19 03:31:29 +00:00
Merge pull request from GHSA-c8wx-65c7-q9r3
Co-authored-by: Slendy <josh@slendy.pw>
This commit is contained in:
parent
e593d5c957
commit
ef87606ba2
6 changed files with 41069 additions and 1 deletions
|
@ -5,6 +5,7 @@ using LBPUnion.ProjectLighthouse.Extensions;
|
|||
using LBPUnion.ProjectLighthouse.Files;
|
||||
using LBPUnion.ProjectLighthouse.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Logging;
|
||||
using LBPUnion.ProjectLighthouse.Servers.GameServer.Helpers;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Level;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
|
||||
using LBPUnion.ProjectLighthouse.Types.Entities.Token;
|
||||
|
@ -157,6 +158,14 @@ public class PublishController : ControllerBase
|
|||
return this.BadRequest();
|
||||
}
|
||||
|
||||
if (!GameResourceHelper.IsValidTexture(slot.IconHash))
|
||||
{
|
||||
Logger.Warn("Rejecting level upload, invalid icon resource", LogArea.Publish);
|
||||
await this.database.SendNotification(user.UserId,
|
||||
$"{slot.Name} failed to publish because your level icon is invalid. (LH-PUB-0010)");
|
||||
return this.BadRequest();
|
||||
}
|
||||
|
||||
if (slot.Resources.Any(resource => !FileHelper.ResourceExists(resource)))
|
||||
{
|
||||
Logger.Warn("Rejecting level upload, missing resource(s)", LogArea.Publish);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue