diff --git a/backend/model/sql/SharingManager.ts b/backend/model/sql/SharingManager.ts index 7c87e0c3..c2bbb967 100644 --- a/backend/model/sql/SharingManager.ts +++ b/backend/model/sql/SharingManager.ts @@ -44,7 +44,11 @@ export class SharingManager implements ISharingManager { if (sharing.timeStamp < Date.now() - Config.Server.sharing.updateTimeout) { throw "Sharing is locked, can't update anymore" } - sharing.password = PasswordHelper.cryptPassword(inSharing.password); + if (inSharing.password == null) { + sharing.password = null; + } else { + sharing.password = PasswordHelper.cryptPassword(inSharing.password); + } sharing.includeSubfolders = inSharing.includeSubfolders; sharing.expires = inSharing.expires;