From 412557b76d4fead30517778f83d3c3ea31382592 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Tue, 14 Oct 2025 10:11:22 +0200 Subject: [PATCH] try workaround --- .../src/graphql/api/1_0/resolver/AuthenticationResolver.ts | 2 +- shared/src/helper/BinaryData.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts index 948a8dc28..930563e87 100644 --- a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts +++ b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts @@ -171,7 +171,7 @@ export class AuthenticationResolver { ) } methodLogger.debug('before loading auth community again from db') - const authComFresh = await getCommunityByPublicKeyOrFail(authComPublicKey) + const authComFresh = await getCommunityByPublicKeyOrFail(argsPublicKey) authComFresh.communityUuid = communityUuid.data authComFresh.authenticatedAt = new Date() methodLogger.debug('after loading auth community again from db') diff --git a/shared/src/helper/BinaryData.ts b/shared/src/helper/BinaryData.ts index 756d3ed3c..583dccd4e 100644 --- a/shared/src/helper/BinaryData.ts +++ b/shared/src/helper/BinaryData.ts @@ -27,6 +27,10 @@ export class BinaryData { } asBuffer(): Buffer { + if (!this.buf || !Buffer.isBuffer(this.buf)) { + logging.warn('BinaryData.buf is invalid, try to create fresh buffer from hex') + this.buf = Buffer.from(this.hex, 'hex') + } return this.buf }