From 653868f55368095c02123bbd9dd0fb272f6061ef Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Wed, 28 Aug 2024 15:10:43 +0200 Subject: [PATCH 1/2] Removed unused `using` directives --- Duplicati/WebserverCore/Endpoints/V1/Backup/BackupGet.cs | 1 - Duplicati/WebserverCore/Endpoints/V1/Backup/BackupPost.cs | 1 - Duplicati/WebserverCore/Endpoints/V1/Backup/BackupPutDelete.cs | 3 --- 3 files changed, 5 deletions(-) diff --git a/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupGet.cs b/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupGet.cs index b6ea20ce9..a9f121720 100644 --- a/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupGet.cs +++ b/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupGet.cs @@ -1,6 +1,5 @@ using System.Text.Json; using System.Text.Json.Serialization; -using Duplicati.Library.Encryption; using Duplicati.Library.Interface; using Duplicati.Library.RestAPI.Abstractions; using Duplicati.Server; diff --git a/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupPost.cs b/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupPost.cs index 1096798a6..9a87a10ba 100644 --- a/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupPost.cs +++ b/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupPost.cs @@ -1,4 +1,3 @@ -using System.Text.Json; using Duplicati.Library.RestAPI.Abstractions; using Duplicati.Server; using Duplicati.Server.Database; diff --git a/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupPutDelete.cs b/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupPutDelete.cs index fee95768a..64149f289 100644 --- a/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupPutDelete.cs +++ b/Duplicati/WebserverCore/Endpoints/V1/Backup/BackupPutDelete.cs @@ -1,7 +1,4 @@ using System.Text.Json; -using Duplicati.Library.Encryption; -using Duplicati.Library.IO; -using Duplicati.Library.RestAPI; using Duplicati.Library.RestAPI.Abstractions; using Duplicati.Server; using Duplicati.Server.Database; From 92c782ae38522f45086b764f3b654ed8933a852d Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Wed, 28 Aug 2024 15:11:34 +0200 Subject: [PATCH 2/2] Fixed sending values as strings. This fixes #5404 --- .../webroot/ngax/scripts/controllers/EditBackupController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js b/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js index e37d57b8f..7d56ba783 100644 --- a/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js +++ b/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js @@ -325,7 +325,7 @@ backupApp.controller('EditBackupController', function ($rootScope, $scope, $rout result.Backup.Settings.push({ Name: k, - Value: opts[k], + Value: opts[k]?.toString(), Filter: origfilter, Argument: origarg }); @@ -480,7 +480,7 @@ backupApp.controller('EditBackupController', function ($rootScope, $scope, $rout } else { function putDb() { - AppService.put('/backup/' + $routeParams.backupid, result, {'headers': {'Content-Type': 'application/json'}}).then(function() { + AppService.put('/backup/' + $routeParams.backupid, result).then(function() { $location.path('/'); }, AppUtils.connectionError); }