From e4d0dee4f758783a3fa308fd829d0c6904796ba5 Mon Sep 17 00:00:00 2001 From: FeTetra Date: Sun, 30 Aug 2026 12:55:25 -0400 Subject: [PATCH 1/3] Don't block duplicate slot uploads on republishes --- .../Controllers/Slots/PublishController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs index 642594891..6525e4673 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs @@ -74,8 +74,9 @@ await this.database.SendNotification(user.UserId, return this.BadRequest(); } + // Prevent duplicate slot uploads unless the original slot creator is the new creator if (!ServerConfiguration.Instance.UserGeneratedContentLimits.DuplicateSlotUploadingEnabled - && await this.database.Slots.AnyAsync(s => s.RootLevel == slot.RootLevel)) + && await this.database.Slots.AnyAsync(s => s.RootLevel == slot.RootLevel && s.CreatorId != slot.CreatorId)) { Logger.Warn("Rejecting level upload, rootlevel is duplicate", LogArea.Publish); await this.database.SendNotification(user.UserId, From e6ce24c410a25026485e92527a685e452c65e2e4 Mon Sep 17 00:00:00 2001 From: FeTetra Date: Mon, 31 Aug 2026 22:06:41 -0400 Subject: [PATCH 2/3] Change publisher check to use user id instead of slot creator id --- .../Controllers/Slots/PublishController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs index 6525e4673..3db1c275d 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs @@ -76,7 +76,7 @@ await this.database.SendNotification(user.UserId, // Prevent duplicate slot uploads unless the original slot creator is the new creator if (!ServerConfiguration.Instance.UserGeneratedContentLimits.DuplicateSlotUploadingEnabled - && await this.database.Slots.AnyAsync(s => s.RootLevel == slot.RootLevel && s.CreatorId != slot.CreatorId)) + && await this.database.Slots.AnyAsync(s => s.RootLevel == slot.RootLevel && s.CreatorId != user.UserId)) { Logger.Warn("Rejecting level upload, rootlevel is duplicate", LogArea.Publish); await this.database.SendNotification(user.UserId, From 66d4501d413e69e7b4292381aed3348cc54a2e32 Mon Sep 17 00:00:00 2001 From: FeTetra Date: Tue, 1 Sep 2026 20:58:28 -0400 Subject: [PATCH 3/3] Add check to /publish --- .../Controllers/Slots/PublishController.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs index 3db1c275d..fcd1bfc8b 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/PublishController.cs @@ -150,6 +150,16 @@ await this.database.SendNotification(user.UserId, $"{slot.Name} failed to publish. (LH-PUB-0003)"); return this.BadRequest(); } + + if (!ServerConfiguration.Instance.UserGeneratedContentLimits.DuplicateSlotUploadingEnabled + && await this.database.Slots.AnyAsync(s => s.RootLevel == slot.RootLevel && s.CreatorId != user.UserId)) + { + Logger.Warn("Rejecting level upload, rootlevel is duplicate", LogArea.Publish); + await this.database.SendNotification(user.UserId, + $"{slot.Name} failed to publish. (LH-PUB-0011)"); + return this.BadRequest(); + } + // Yes Rider, this isn't null Debug.Assert(slot.Resources != null, "slot.ResourceList != null");