1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

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

* sanitize storagelabel when creating a user #3346

* code formatting
This commit is contained in:
Jan 2024-01-01 21:37:39 +01:00 committed by GitHub
parent 523e7d4742
commit 7dd88c4114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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