Update README and configuration to replace RSA with Ed25519 for federation security
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m30s
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m30s
This commit is contained in:
@@ -147,6 +147,12 @@ router.post('/receive', federationReceiveLimiter, async (req, res) => {
|
||||
return res.status(400).json({ error: 'Incomplete invitation payload' });
|
||||
}
|
||||
|
||||
// S4: validate field lengths from remote to prevent oversized DB entries
|
||||
if (invite_id.length > 100 || from_user.length > 200 || to_user.length > 200 ||
|
||||
room_name.length > 200 || join_url.length > 2000 || (message && message.length > 5000)) {
|
||||
return res.status(400).json({ error: 'Payload fields exceed maximum allowed length' });
|
||||
}
|
||||
|
||||
// Fetch the sender's public key dynamically
|
||||
const { domain: senderDomain } = parseAddress(from_user);
|
||||
if (!senderDomain) {
|
||||
@@ -159,7 +165,7 @@ router.post('/receive', federationReceiveLimiter, async (req, res) => {
|
||||
}
|
||||
|
||||
if (!verifyPayload(payload, signature, publicKey)) {
|
||||
return res.status(403).json({ error: 'Invalid federation RSA signature' });
|
||||
return res.status(403).json({ error: 'Invalid federation signature' });
|
||||
}
|
||||
|
||||
// Parse the target address and find local user
|
||||
|
||||
Reference in New Issue
Block a user