From 7dd88c4114b68d285d9b19d9165e39a2f1460dde Mon Sep 17 00:00:00 2001 From: Jan <17313367+JW-CH@users.noreply.github.com> Date: Mon, 1 Jan 2024 21:37:39 +0100 Subject: [PATCH] fix(server): sanitize storagelabel when creating a user #3346 (#5717) * sanitize storagelabel when creating a user #3346 * code formatting --- server/src/domain/user/user.core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/domain/user/user.core.ts b/server/src/domain/user/user.core.ts index 240869b863..b19ee5e84f 100644 --- a/server/src/domain/user/user.core.ts +++ b/server/src/domain/user/user.core.ts @@ -97,7 +97,7 @@ export class UserCore { payload.password = await this.cryptoRepository.hashBcrypt(payload.password, SALT_ROUNDS); } if (payload.storageLabel) { - payload.storageLabel = sanitize(payload.storageLabel); + payload.storageLabel = sanitize(payload.storageLabel.replace(/\./g, '')); } const userEntity = await this.userRepository.create(payload); await this.libraryRepository.create({