From 54c6ac8163f8163a7a360303e7e186f290ed9f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Sun, 2 Jun 2024 15:57:47 +0200 Subject: [PATCH] fix: Created by on application-created adds the ip as created by (#7231) To avoid leaking potential PII information in the event log, this replaces the IP for the system user as the "created by" field --- src/lib/features/metrics/instance/instance-service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/features/metrics/instance/instance-service.ts b/src/lib/features/metrics/instance/instance-service.ts index 05b4c136c7..315d3a16e4 100644 --- a/src/lib/features/metrics/instance/instance-service.ts +++ b/src/lib/features/metrics/instance/instance-service.ts @@ -103,7 +103,7 @@ export default class ClientInstanceService { ): Promise { const value = await clientRegisterSchema.validateAsync(data); value.clientIp = clientIp; - value.createdBy = clientIp; + value.createdBy = SYSTEM_USER.username!; this.seenClients[this.clientKey(value)] = value; this.eventStore.emit(CLIENT_REGISTER, value); }