mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-10-04 15:19:43 +00:00
Merge branch 'main' into recent-activity
# Conflicts: # .config/dotnet-tools.json # ProjectLighthouse.Servers.Website/Pages/Partials/ReviewPartial.cshtml
This commit is contained in:
commit
8f91875f7c
54 changed files with 459 additions and 48 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Text.Json;
|
||||
using LBPUnion.ProjectLighthouse.Configuration;
|
||||
using LBPUnion.ProjectLighthouse.Database;
|
||||
using LBPUnion.ProjectLighthouse.Extensions;
|
||||
using LBPUnion.ProjectLighthouse.Files;
|
||||
|
@ -73,6 +74,9 @@ public class UserController : ControllerBase
|
|||
|
||||
if (update.Biography != null)
|
||||
{
|
||||
// Deny request if in read-only mode
|
||||
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.BadRequest();
|
||||
|
||||
if (update.Biography.Length > 512) return this.BadRequest();
|
||||
|
||||
user.Biography = update.Biography;
|
||||
|
@ -85,6 +89,9 @@ public class UserController : ControllerBase
|
|||
{
|
||||
if (string.IsNullOrWhiteSpace(resource)) continue;
|
||||
|
||||
// Deny request if in read-only mode
|
||||
if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode) return this.BadRequest();
|
||||
|
||||
if (!FileHelper.ResourceExists(resource) && !resource.StartsWith('g')) return this.BadRequest();
|
||||
|
||||
if (!GameResourceHelper.IsValidTexture(resource)) return this.BadRequest();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue