Skip to content

High performance self-hosted photo and video management solution.

fix(server): sanitize storagelabel when creating a user #3346 (#5717)

Jan7dd88c4114b6
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({