add ATTACHMENT_SIZE_LIMIT, MAX_MESSAGE_SIZE, MAX_REACTION_SIZE & replace System.IO with custom Fs class
All checks were successful
Server Build / publish (push) Successful in 33s
Voice Build / publish (push) Successful in 24s

This commit is contained in:
olcxja 2026-07-18 15:05:38 +02:00
commit a17100910e
6 changed files with 99 additions and 48 deletions

View file

@ -885,7 +885,7 @@ public static async Task Auth(HttpContext context, Func<Task> next, IQueryCollec
return;
}
byte[] fileBytes = await LarpixServer.Utils.Utils.LoadBodyBytes(context.Request.Body, 50 * 1024 * 1024); // 50MB limit for attachments
byte[] fileBytes = await LoadBodyBytes(context.Request.Body, ATTACHMENT_SIZE_LIMIT); // attachment size limit
if (fileBytes == null || fileBytes.Length == 0)
{
await context.Response.WriteAsync(Encryption.Encryption.EncryptString("error:empty.body", password));