From 148a2bb3d204639220450ba4898128f3db3af885 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Sat, 3 Feb 2018 20:50:05 -0500 Subject: [PATCH] fixing sharing manager update bug --- backend/model/sql/SharingManager.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;