mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-03-17 21:12:22 +01:00
Always strip metadata of image uploads
This commit is contained in:
parent
a92e7d46fc
commit
7a41651ec5
@ -67,8 +67,9 @@ namespace VoidCat.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
var stripMetadata = Request.Headers.GetHeader("V-Strip-Metadata")
|
||||
?.Equals("true", StringComparison.InvariantCultureIgnoreCase) ?? false;
|
||||
var mime = Request.Headers.GetHeader("V-Content-Type");
|
||||
var stripMetadata = (mime?.StartsWith("image/") ?? false) || (Request.Headers.GetHeader("V-Strip-Metadata")
|
||||
?.Equals("true", StringComparison.InvariantCultureIgnoreCase) ?? false);
|
||||
|
||||
if (_settings.MaintenanceMode && !stripMetadata)
|
||||
{
|
||||
@ -89,7 +90,6 @@ namespace VoidCat.Controllers
|
||||
uid = nostrUser.Id;
|
||||
}
|
||||
|
||||
var mime = Request.Headers.GetHeader("V-Content-Type");
|
||||
var filename = Request.Headers.GetHeader("V-Filename");
|
||||
|
||||
if (string.IsNullOrEmpty(mime) && !string.IsNullOrEmpty(filename))
|
||||
|
Loading…
x
Reference in New Issue
Block a user