fix(federation): batch A production readiness — normalization, logging, security
FED-001: normalize homeInstance in processCreateEvent member skip FED-002: normalize homeInstance in getFriendEventTargets FED-003: normalize homeInstance in handleSizeRejection FED-004: add warning log when queueOutboxEvent drops events (zero peer match) FED-012: remove unused challenge from peer handshake FED-013: reject non-HTTPS origins in validateOrigin (except localhost)
This commit is contained in:
@@ -421,7 +421,8 @@ function handleSizeRejection(
|
||||
.from(schema.users)
|
||||
.where(eq(schema.users.id, member.userId))
|
||||
.get();
|
||||
if (user && (!user.homeInstance || user.homeInstance === ourOrigin)) {
|
||||
const userHome = user?.homeInstance?.startsWith('http') ? user.homeInstance : user?.homeInstance ? `https://${user.homeInstance}` : null;
|
||||
if (user && (!user.homeInstance || userHome === ourOrigin)) {
|
||||
affectedUserIds.push(user.homeUserId || user.id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user