feat: paste compression & verification enforcement settings; enforce 2fa on admins setting; increase paste validation; anonymous uploads

fix: minor styling issue on main elements; resolve lint issue
refactor: remove 2FA badge on user pages; enhance paste creation flow; body background color always neutral-950; improve paste creation paste info (lines, cchars etc) for mobile
This commit is contained in:
2026-01-08 15:25:42 -05:00
parent fabef95159
commit 9f55aa1b22
16 changed files with 186 additions and 75 deletions
@@ -6,5 +6,6 @@
public string CF_Turnstile_SecretKey { get; set; } = string.Empty;
public bool Registration_Enabled { get; set; } = true;
public bool First_User_Admin { get; set; } = true;
public bool Admins_Require_2FA { get; set; } = true;
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
{
public class JWTSettings
{
public string Secret { get; set; } = Utilities.GenerateRandomString(64);
public string Secret { get; set; } = string.Empty;
public string Issuer { get; set; } = "SharpbinApi";
public string Audience { get; set; } = "SharpbinClient";
}
@@ -5,5 +5,7 @@
public string[] ValidSyntaxLanguages { get; set; } = [];
public int MaxTitleLength { get; set; } = 500;
public int MaxPasteSizeInBytes { get; set; } = 1_048_576; // 1 MB
public bool EnablePasteCompression { get; set; } = true;
public bool RequiresVerfication { get; set; } = true;
}
}