mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-23 01:39:03 +00:00
parent
8edc276767
commit
d8bb77e80b
2 changed files with 7 additions and 2 deletions
|
@ -3,6 +3,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using LBPUnion.ProjectLighthouse.Types.Files;
|
||||
using LBPUnion.ProjectLighthouse.Types.Settings;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Helpers
|
||||
{
|
||||
|
@ -14,6 +15,8 @@ namespace LBPUnion.ProjectLighthouse.Helpers
|
|||
|
||||
public static bool IsFileSafe(LbpFile file)
|
||||
{
|
||||
if (!ServerSettings.Instance.CheckForUnsafeFiles) return true;
|
||||
|
||||
if (file.FileType == LbpFileType.Unknown) file.FileType = DetermineFileType(file.Data);
|
||||
|
||||
return file.FileType switch
|
||||
|
|
|
@ -63,13 +63,13 @@ namespace LBPUnion.ProjectLighthouse.Types.Settings
|
|||
}
|
||||
}
|
||||
|
||||
public const int CurrentConfigVersion = 8; // MUST BE INCREMENTED FOR EVERY CONFIG CHANGE!
|
||||
|
||||
#region Meta
|
||||
|
||||
[NotNull]
|
||||
public static ServerSettings Instance;
|
||||
|
||||
public const int CurrentConfigVersion = 7;
|
||||
|
||||
[JsonPropertyName("ConfigVersionDoNotModifyOrYouWillBeSlapped")]
|
||||
public int ConfigVersion { get; set; } = CurrentConfigVersion;
|
||||
|
||||
|
@ -91,5 +91,7 @@ namespace LBPUnion.ProjectLighthouse.Types.Settings
|
|||
public string ExternalUrl { get; set; } = "http://localhost:10060";
|
||||
public string ServerDigestKey { get; set; }
|
||||
public bool UseExternalAuth { get; set; }
|
||||
|
||||
public bool CheckForUnsafeFiles { get; set; } = true;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue