mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-16 20:56:03 +00:00
Add E2EE messaging and VPS deployment
Add signed, encrypted messages and attachments with per-session device keys, conversation key discovery, and server-side validation. Extend CI to publish immutable container images and deploy to a VPS, with setup and protocol documentation.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Govor.API.Common.Extensions;
|
||||
using Govor.Application.E2ee;
|
||||
using Govor.Application.Infrastructure.Extensions;
|
||||
using Govor.Application.Medias;
|
||||
using Govor.Contracts.Requests;
|
||||
@@ -49,6 +50,10 @@ public class MediaController : Controller
|
||||
if (string.IsNullOrWhiteSpace(request.MimeType))
|
||||
return BadRequest("Missing MIME type");
|
||||
|
||||
if (request.OwnerType == MediaOwnerType.Message &&
|
||||
(request.MimeType != E2eeProtocol.EncryptedMimeType || !string.IsNullOrEmpty(request.EncryptedKey)))
|
||||
return BadRequest("Message attachments must be encrypted on the client. Do not upload decryption keys.");
|
||||
|
||||
try
|
||||
{
|
||||
byte[] fileBytes = await ReadFileAsync(request.FromFile);
|
||||
|
||||
Reference in New Issue
Block a user