diff --git a/Duplicati/CommandLine/Program.cs b/Duplicati/CommandLine/Program.cs index 0801c7cc0..943397cac 100644 --- a/Duplicati/CommandLine/Program.cs +++ b/Duplicati/CommandLine/Program.cs @@ -91,6 +91,10 @@ namespace Duplicati.CommandLine if (!string.IsNullOrEmpty(System.Environment.GetEnvironmentVariable("FTP_PASSWORD"))) options["ftp-password"] = System.Environment.GetEnvironmentVariable("FTP_PASSWORD"); + if (!options.ContainsKey("ftp-username")) + if (!string.IsNullOrEmpty(System.Environment.GetEnvironmentVariable("FTP_USERNAME"))) + options["ftp-username"] = System.Environment.GetEnvironmentVariable("FTP_USERNAME"); + if (source.Trim().ToLower() == "list") Console.WriteLine(string.Join("\r\n", Duplicati.Library.Main.Interface.List(target, options))); else if (source.Trim().ToLower() == "list-current-files") diff --git a/Duplicati/GUI/Datamodel/Backends/FTP.cs b/Duplicati/GUI/Datamodel/Backends/FTP.cs index e369606ad..744ed449b 100644 --- a/Duplicati/GUI/Datamodel/Backends/FTP.cs +++ b/Duplicati/GUI/Datamodel/Backends/FTP.cs @@ -85,11 +85,12 @@ namespace Duplicati.Datamodel.Backends public string GetDestinationPath() { - return "ftp://" + this.Username + "@" + this.Host + ":" + this.Port + "/" + this.Folder; + return "ftp://" + this.Host + ":" + this.Port + "/" + this.Folder; } public void GetOptions(Dictionary options) { + options["ftp-username"] = this.Username; options["ftp-password"] = this.Password; if (this.Passive) options["ftp-passive"] = ""; diff --git a/Duplicati/GUI/Datamodel/Backends/File.cs b/Duplicati/GUI/Datamodel/Backends/File.cs index 7f59102de..02beeacbc 100644 --- a/Duplicati/GUI/Datamodel/Backends/File.cs +++ b/Duplicati/GUI/Datamodel/Backends/File.cs @@ -61,14 +61,13 @@ namespace Duplicati.Datamodel.Backends public string GetDestinationPath() { - if (!string.IsNullOrEmpty(this.Username)) - return "file://" + this.Username + "@" + this.DestinationFolder; - else - return "file://" + this.DestinationFolder; + return "file://" + this.DestinationFolder; } public void GetOptions(Dictionary options) { + if (!string.IsNullOrEmpty(this.Username)) + options["ftp-username"] = this.Username; if (!string.IsNullOrEmpty(this.Password)) options["ftp-password"] = this.Password; } diff --git a/Duplicati/GUI/Datamodel/Backends/SSH.cs b/Duplicati/GUI/Datamodel/Backends/SSH.cs index 13e4f3878..5c1d37d4c 100644 --- a/Duplicati/GUI/Datamodel/Backends/SSH.cs +++ b/Duplicati/GUI/Datamodel/Backends/SSH.cs @@ -95,11 +95,14 @@ namespace Duplicati.Datamodel.Backends public string GetDestinationPath() { - return "ssh://" + this.Username + "@" + this.Host + "/" + this.Folder; + return "ssh://" + this.Host + "/" + this.Folder; } public void GetOptions(Dictionary options) { + if (!string.IsNullOrEmpty(this.Username)) + options["ftp-username"] = this.Username; + if (!this.Passwordless) options["ftp-password"] = this.Password; diff --git a/Duplicati/GUI/Datamodel/Backends/WEBDAV.cs b/Duplicati/GUI/Datamodel/Backends/WEBDAV.cs index ab5da85d9..f33075624 100644 --- a/Duplicati/GUI/Datamodel/Backends/WEBDAV.cs +++ b/Duplicati/GUI/Datamodel/Backends/WEBDAV.cs @@ -92,14 +92,14 @@ namespace Duplicati.Datamodel.Backends public string GetDestinationPath() { - if (string.IsNullOrEmpty(this.Username)) - return "webdav://" + this.Host + ":" + this.Port + "/" + this.Folder; - else - return "webdav://" + this.Username + "@" + this.Host + ":" + this.Port + "/" + this.Folder; + return "webdav://" + this.Host + ":" + this.Port + "/" + this.Folder; } public void GetOptions(Dictionary options) { + if (!string.IsNullOrEmpty(this.Username)) + options["ftp-username"] = this.Username; + options["ftp-password"] = this.Password; if (IntegratedAuthentication) options["integrated-authentication"] = ""; diff --git a/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs b/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs index 9bf93805e..45e0506db 100644 --- a/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs +++ b/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs @@ -60,6 +60,11 @@ namespace Duplicati.Library.Backend } else { + if (options.ContainsKey("ftp-username")) + m_username = options["ftp-username"]; + if (options.ContainsKey("ftp-password")) + m_password = options["ftp-password"]; + if (options.ContainsKey("cloudfiles_username")) m_username = options["cloudfiles_username"]; if (options.ContainsKey("cloudfiles_accesskey")) @@ -163,6 +168,7 @@ namespace Duplicati.Library.Backend { return new List(new ICommandLineArgument[] { new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.CloudFiles.DescriptionFTPPasswordShort, Strings.CloudFiles.DescriptionFTPPasswordLong), + new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.CloudFiles.DescriptionFTPUsernameShort, Strings.CloudFiles.DescriptionFTPUsernameLong), new CommandLineArgument("cloudfiles_username", CommandLineArgument.ArgumentType.String, Strings.CloudFiles.DescriptionUsernameShort, Strings.CloudFiles.DescriptionUsernameLong), new CommandLineArgument("cloudfiles_accesskey", CommandLineArgument.ArgumentType.String, Strings.CloudFiles.DescriptionPasswordShort, Strings.CloudFiles.DescriptionPasswordLong), }); diff --git a/Duplicati/Library/Backend/CloudFiles/Strings/CloudFiles.Designer.cs b/Duplicati/Library/Backend/CloudFiles/Strings/CloudFiles.Designer.cs index 494738110..18f703b81 100644 --- a/Duplicati/Library/Backend/CloudFiles/Strings/CloudFiles.Designer.cs +++ b/Duplicati/Library/Backend/CloudFiles/Strings/CloudFiles.Designer.cs @@ -87,6 +87,24 @@ namespace Duplicati.Library.Backend.Strings { } } + /// + /// Looks up a localized string similar to The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME".. + /// + internal static string DescriptionFTPUsernameLong { + get { + return ResourceManager.GetString("DescriptionFTPUsernameLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Supplies the username used to connect to the server. + /// + internal static string DescriptionFTPUsernameShort { + get { + return ResourceManager.GetString("DescriptionFTPUsernameShort", resourceCulture); + } + } + /// /// Looks up a localized string similar to Supplies the API Access Key used to authenticate with CloudFiles.. /// diff --git a/Duplicati/Library/Backend/CloudFiles/Strings/CloudFiles.resx b/Duplicati/Library/Backend/CloudFiles/Strings/CloudFiles.resx index 02090b413..ccd7446e7 100644 --- a/Duplicati/Library/Backend/CloudFiles/Strings/CloudFiles.resx +++ b/Duplicati/Library/Backend/CloudFiles/Strings/CloudFiles.resx @@ -126,6 +126,12 @@ Supplies the password used to connect to the server + + The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME". + + + Supplies the username used to connect to the server + Supplies the API Access Key used to authenticate with CloudFiles. diff --git a/Duplicati/Library/Backend/FTP/FTPBackend.cs b/Duplicati/Library/Backend/FTP/FTPBackend.cs index e078a4c77..9d643301f 100644 --- a/Duplicati/Library/Backend/FTP/FTPBackend.cs +++ b/Duplicati/Library/Backend/FTP/FTPBackend.cs @@ -53,6 +53,16 @@ namespace Duplicati.Library.Backend m_userInfo.Password = options["ftp-password"]; } } + else + { + if (options.ContainsKey("ftp-username")) + { + m_userInfo = new System.Net.NetworkCredential(); + m_userInfo.UserName = options["ftp-username"]; + if (options.ContainsKey("ftp-password")) + m_userInfo.Password = options["ftp-password"]; + } + } m_options = options; m_url = url; @@ -195,6 +205,7 @@ namespace Duplicati.Library.Backend new CommandLineArgument("ftp-passive", CommandLineArgument.ArgumentType.Boolean, Strings.FTPBackend.DescriptionFTPPassiveShort, Strings.FTPBackend.DescriptionFTPPassiveLong, "false"), new CommandLineArgument("ftp-regular", CommandLineArgument.ArgumentType.Boolean, Strings.FTPBackend.DescriptionFTPActiveShort, Strings.FTPBackend.DescriptionFTPActiveLong, "true"), new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.FTPBackend.DescriptionFTPPasswordShort, Strings.FTPBackend.DescriptionFTPPasswordLong), + new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.FTPBackend.DescriptionFTPUsernameShort, Strings.FTPBackend.DescriptionFTPUsernameLong), new CommandLineArgument("integrated-authentication", CommandLineArgument.ArgumentType.Boolean, Strings.FTPBackend.DescriptionIntegratedAuthenticationShort, Strings.FTPBackend.DescriptionIntegratedAuthenticationLong), }); } diff --git a/Duplicati/Library/Backend/FTP/Strings/FTPBackend.Designer.cs b/Duplicati/Library/Backend/FTP/Strings/FTPBackend.Designer.cs index 375b3cda0..2bf082c1e 100644 --- a/Duplicati/Library/Backend/FTP/Strings/FTPBackend.Designer.cs +++ b/Duplicati/Library/Backend/FTP/Strings/FTPBackend.Designer.cs @@ -123,6 +123,24 @@ namespace Duplicati.Library.Backend.Strings { } } + /// + /// Looks up a localized string similar to The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME".. + /// + internal static string DescriptionFTPUsernameLong { + get { + return ResourceManager.GetString("DescriptionFTPUsernameLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Supplies the username used to connect to the server. + /// + internal static string DescriptionFTPUsernameShort { + get { + return ResourceManager.GetString("DescriptionFTPUsernameShort", resourceCulture); + } + } + /// /// Looks up a localized string similar to If the server and client both supports integrated authentication, this option enables that authentication method. This is likely only avalible with windows servers and clients.. /// diff --git a/Duplicati/Library/Backend/FTP/Strings/FTPBackend.resx b/Duplicati/Library/Backend/FTP/Strings/FTPBackend.resx index c8e7aa8d1..f144e4eef 100644 --- a/Duplicati/Library/Backend/FTP/Strings/FTPBackend.resx +++ b/Duplicati/Library/Backend/FTP/Strings/FTPBackend.resx @@ -138,6 +138,12 @@ Supplies the password used to connect to the server + + The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME". + + + Supplies the username used to connect to the server + If the server and client both supports integrated authentication, this option enables that authentication method. This is likely only avalible with windows servers and clients. diff --git a/Duplicati/Library/Backend/File/FileBackend.cs b/Duplicati/Library/Backend/File/FileBackend.cs index 78e324454..9e4b2b611 100644 --- a/Duplicati/Library/Backend/File/FileBackend.cs +++ b/Duplicati/Library/Backend/File/FileBackend.cs @@ -55,6 +55,13 @@ namespace Duplicati.Library.Backend m_password = options["ftp-password"]; } } + else + { + if (options.ContainsKey("ftp-username")) + m_username = options["ftp-username"]; + if (options.ContainsKey("ftp-password")) + m_password = options["ftp-password"]; + } if (!System.IO.Path.IsPathRooted(url)) m_path = System.IO.Path.GetFullPath(m_path); @@ -141,7 +148,8 @@ namespace Duplicati.Library.Backend get { return new List(new ICommandLineArgument[] { - new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.FileBackend.DescriptionFTPPasswordShort, Strings.FileBackend.DescriptionFTPPasswordLong) + new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.FileBackend.DescriptionFTPPasswordShort, Strings.FileBackend.DescriptionFTPPasswordLong), + new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.FileBackend.DescriptionFTPUsernameShort, Strings.FileBackend.DescriptionFTPUsernameLong) }); } diff --git a/Duplicati/Library/Backend/File/Strings/FileBackend.Designer.cs b/Duplicati/Library/Backend/File/Strings/FileBackend.Designer.cs index 78806f124..994423496 100644 --- a/Duplicati/Library/Backend/File/Strings/FileBackend.Designer.cs +++ b/Duplicati/Library/Backend/File/Strings/FileBackend.Designer.cs @@ -87,6 +87,24 @@ namespace Duplicati.Library.Backend.Strings { } } + /// + /// Looks up a localized string similar to The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME".. + /// + internal static string DescriptionFTPUsernameLong { + get { + return ResourceManager.GetString("DescriptionFTPUsernameLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Supplies the username used to connect to the server. + /// + internal static string DescriptionFTPUsernameShort { + get { + return ResourceManager.GetString("DescriptionFTPUsernameShort", resourceCulture); + } + } + /// /// Looks up a localized string similar to File based. /// diff --git a/Duplicati/Library/Backend/File/Strings/FileBackend.resx b/Duplicati/Library/Backend/File/Strings/FileBackend.resx index 74cc9ec24..eac6bc1bc 100644 --- a/Duplicati/Library/Backend/File/Strings/FileBackend.resx +++ b/Duplicati/Library/Backend/File/Strings/FileBackend.resx @@ -126,6 +126,12 @@ Supplies the password used to connect to the server + + The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME". + + + Supplies the username used to connect to the server + File based diff --git a/Duplicati/Library/Backend/S3/S3Backend.cs b/Duplicati/Library/Backend/S3/S3Backend.cs index 37ad434ff..4dd323b01 100644 --- a/Duplicati/Library/Backend/S3/S3Backend.cs +++ b/Duplicati/Library/Backend/S3/S3Backend.cs @@ -63,6 +63,11 @@ namespace Duplicati.Library.Backend } else { + if (options.ContainsKey("ftp-username")) + m_awsID = options["ftp-username"]; + if (options.ContainsKey("ftp-password")) + m_awsKey = options["ftp-password"]; + if (options.ContainsKey("aws_access_key_id")) m_awsID = options["aws_access_key_id"]; if (options.ContainsKey("aws_secret_access_key")) @@ -259,10 +264,11 @@ namespace Duplicati.Library.Backend { return new List(new ICommandLineArgument[] { new CommandLineArgument("aws_secret_access_key", CommandLineArgument.ArgumentType.Path, Strings.S3Backend.AMZKeyDescriptionShort, Strings.S3Backend.AMZKeyDescriptionLong, null, new string[] {"ftp-password"}, null), - new CommandLineArgument("aws_access_key_id", CommandLineArgument.ArgumentType.Path, Strings.S3Backend.AMZUserIDDescriptionShort, Strings.S3Backend.AMZUserIDDescriptionLong), + new CommandLineArgument("aws_access_key_id", CommandLineArgument.ArgumentType.Path, Strings.S3Backend.AMZUserIDDescriptionShort, Strings.S3Backend.AMZUserIDDescriptionLong, null, new string[] {"ftp-username"}, null), new CommandLineArgument("s3-use-new-style", CommandLineArgument.ArgumentType.Boolean, Strings.S3Backend.S3NewStyleDescriptionShort, Strings.S3Backend.S3NewStyleDescriptionLong, "true"), new CommandLineArgument("s3-european-buckets", CommandLineArgument.ArgumentType.Boolean, Strings.S3Backend.S3EurobucketDescriptionShort, Strings.S3Backend.S3EurobucketDescriptionLong, "false"), new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.S3Backend.FTPPasswordDescriptionShort, Strings.S3Backend.FTPPasswordDescriptionLong), + new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.S3Backend.DescriptionFTPUsernameShort, Strings.S3Backend.DescriptionFTPUsernameLong) }); } diff --git a/Duplicati/Library/Backend/S3/Strings/S3Backend.Designer.cs b/Duplicati/Library/Backend/S3/Strings/S3Backend.Designer.cs index ce532ac3c..08f0f8dfe 100644 --- a/Duplicati/Library/Backend/S3/Strings/S3Backend.Designer.cs +++ b/Duplicati/Library/Backend/S3/Strings/S3Backend.Designer.cs @@ -79,7 +79,7 @@ namespace Duplicati.Library.Backend.Strings { } /// - /// Looks up a localized string similar to The AWS "Access Key ID" can be obtained after logging into your AWS account.. + /// Looks up a localized string similar to The AWS "Access Key ID" can be obtained after logging into your AWS account, this can also be supplied through the "ftp-username" property. /// internal static string AMZUserIDDescriptionLong { get { @@ -105,6 +105,24 @@ namespace Duplicati.Library.Backend.Strings { } } + /// + /// Looks up a localized string similar to The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME".. + /// + internal static string DescriptionFTPUsernameLong { + get { + return ResourceManager.GetString("DescriptionFTPUsernameLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Supplies the username used to connect to the server. + /// + internal static string DescriptionFTPUsernameShort { + get { + return ResourceManager.GetString("DescriptionFTPUsernameShort", resourceCulture); + } + } + /// /// Looks up a localized string similar to Amazon S3 based. /// diff --git a/Duplicati/Library/Backend/S3/Strings/S3Backend.resx b/Duplicati/Library/Backend/S3/Strings/S3Backend.resx index 74ecb1c74..9b9abe025 100644 --- a/Duplicati/Library/Backend/S3/Strings/S3Backend.resx +++ b/Duplicati/Library/Backend/S3/Strings/S3Backend.resx @@ -124,7 +124,7 @@ The AWS "Secret Access Key" - The AWS "Access Key ID" can be obtained after logging into your AWS account. + The AWS "Access Key ID" can be obtained after logging into your AWS account, this can also be supplied through the "ftp-username" property The AWS "Access Key ID" @@ -141,6 +141,12 @@ Supplies the password used to connect to the server + + The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME". + + + Supplies the username used to connect to the server + No Amazon S3 secret key given diff --git a/Duplicati/Library/Backend/SSH/SSHBackend.cs b/Duplicati/Library/Backend/SSH/SSHBackend.cs index 24764a927..e1530aae3 100644 --- a/Duplicati/Library/Backend/SSH/SSHBackend.cs +++ b/Duplicati/Library/Backend/SSH/SSHBackend.cs @@ -71,6 +71,13 @@ namespace Duplicati.Library.Backend m_password = options["ftp-password"]; } } + else + { + if (options.ContainsKey("ftp-username")) + m_username = options["ftp-username"]; + if (options.ContainsKey("ftp-password")) + m_password = options["ftp-password"]; + } m_path = u.AbsolutePath; @@ -259,6 +266,7 @@ namespace Duplicati.Library.Backend new CommandLineArgument("sftp-command", CommandLineArgument.ArgumentType.Path, Strings.SSHBackend.DescriptionSFTPCommandShort, Strings.SSHBackend.DescriptionSFTPCommandLong, (System.Environment.OSVersion.Platform == PlatformID.Unix || System.Environment.OSVersion.Platform == PlatformID.MacOSX) ? "sftp" : "psftp.exe"), new CommandLineArgument("ssh-options", CommandLineArgument.ArgumentType.String, Strings.SSHBackend.DescriptionSSHOptionsShort, Strings.SSHBackend.DescriptionSSHOptionsLong, "-C"), new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.SSHBackend.DescriptionFTPPasswordShort, Strings.SSHBackend.DescriptionFTPPasswordLong), + new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.SSHBackend.DescriptionFTPUsernameShort, Strings.SSHBackend.DescriptionFTPUsernameLong), new CommandLineArgument("debug-to-console", CommandLineArgument.ArgumentType.Boolean, Strings.SSHBackend.DescriptionDebugToConsoleShort, Strings.SSHBackend.DescriptionDebugToConsoleLong), new CommandLineArgument("transfer-timeout", CommandLineArgument.ArgumentType.Timespan, Strings.SSHBackend.DescriptionTransferTimeoutShort, Strings.SSHBackend.DescriptionTransferTimeoutLong, "10m"), }); diff --git a/Duplicati/Library/Backend/SSH/Strings/SSHBackend.Designer.cs b/Duplicati/Library/Backend/SSH/Strings/SSHBackend.Designer.cs index 525bc5a4d..ab0fc2c8e 100644 --- a/Duplicati/Library/Backend/SSH/Strings/SSHBackend.Designer.cs +++ b/Duplicati/Library/Backend/SSH/Strings/SSHBackend.Designer.cs @@ -222,6 +222,24 @@ namespace Duplicati.Library.Backend.Strings { } } + /// + /// Looks up a localized string similar to The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME".. + /// + internal static string DescriptionFTPUsernameLong { + get { + return ResourceManager.GetString("DescriptionFTPUsernameLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Supplies the username used to connect to the server. + /// + internal static string DescriptionFTPUsernameShort { + get { + return ResourceManager.GetString("DescriptionFTPUsernameShort", resourceCulture); + } + } + /// /// Looks up a localized string similar to The full path to the "sftp" application.. /// diff --git a/Duplicati/Library/Backend/SSH/Strings/SSHBackend.resx b/Duplicati/Library/Backend/SSH/Strings/SSHBackend.resx index 92778786b..9893266f2 100644 --- a/Duplicati/Library/Backend/SSH/Strings/SSHBackend.resx +++ b/Duplicati/Library/Backend/SSH/Strings/SSHBackend.resx @@ -171,6 +171,12 @@ Supplies the password used to connect to the server + + The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME". + + + Supplies the username used to connect to the server + The full path to the "sftp" application. diff --git a/Duplicati/Library/Backend/WEBDAV/Strings/WEBDAV.Designer.cs b/Duplicati/Library/Backend/WEBDAV/Strings/WEBDAV.Designer.cs index 7348e18c0..cded2ee48 100644 --- a/Duplicati/Library/Backend/WEBDAV/Strings/WEBDAV.Designer.cs +++ b/Duplicati/Library/Backend/WEBDAV/Strings/WEBDAV.Designer.cs @@ -105,6 +105,24 @@ namespace Duplicati.Library.Backend.Strings { } } + /// + /// Looks up a localized string similar to The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME".. + /// + internal static string DescriptionFTPUsernameLong { + get { + return ResourceManager.GetString("DescriptionFTPUsernameLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Supplies the username used to connect to the server. + /// + internal static string DescriptionFTPUsernameShort { + get { + return ResourceManager.GetString("DescriptionFTPUsernameShort", resourceCulture); + } + } + /// /// Looks up a localized string similar to If the server and client both supports integrated authentication, this option enables that authentication method. This is likely only avalible with windows servers and clients.. /// diff --git a/Duplicati/Library/Backend/WEBDAV/Strings/WEBDAV.resx b/Duplicati/Library/Backend/WEBDAV/Strings/WEBDAV.resx index 85be8043b..c4860c305 100644 --- a/Duplicati/Library/Backend/WEBDAV/Strings/WEBDAV.resx +++ b/Duplicati/Library/Backend/WEBDAV/Strings/WEBDAV.resx @@ -132,6 +132,12 @@ Supplies the password used to connect to the server + + The username used to connect to the server. This may also be supplied as the environment variable "FTP_USERNAME". + + + Supplies the username used to connect to the server + If the server and client both supports integrated authentication, this option enables that authentication method. This is likely only avalible with windows servers and clients. diff --git a/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs b/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs index b3c2d07ca..7673e4dc1 100644 --- a/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs +++ b/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs @@ -56,6 +56,16 @@ namespace Duplicati.Library.Backend m_userInfo.Password = options["ftp-password"]; } } + else + { + if (options.ContainsKey("ftp-username")) + { + m_userInfo = new System.Net.NetworkCredential(); + m_userInfo.UserName = options["ftp-username"]; + if (options.ContainsKey("ftp-password")) + m_userInfo.Password = options["ftp-password"]; + } + } m_options = options; m_useIntegratedAuthentication = m_options.ContainsKey("integrated-authentication"); @@ -166,6 +176,7 @@ namespace Duplicati.Library.Backend { return new List(new ICommandLineArgument[] { new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.WEBDAV.DescriptionFTPPasswordShort, Strings.WEBDAV.DescriptionFTPPasswordLong), + new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.WEBDAV.DescriptionFTPUsernameShort, Strings.WEBDAV.DescriptionFTPUsernameLong), new CommandLineArgument("integrated-authentication", CommandLineArgument.ArgumentType.Boolean, Strings.WEBDAV.DescriptionIntegratedAuthenticationShort, Strings.WEBDAV.DescriptionIntegratedAuthenticationLong), new CommandLineArgument("force-digest-authentication", CommandLineArgument.ArgumentType.Boolean, Strings.WEBDAV.DescriptionForceDigestShort, Strings.WEBDAV.DescriptionForceDigestLong), }); diff --git a/Duplicati/Localization/da/GUI/Strings/Common.da.resx b/Duplicati/Localization/da/GUI/Strings/Common.da.resx index 6289c6e14..0d99d34f5 100644 --- a/Duplicati/Localization/da/GUI/Strings/Common.da.resx +++ b/Duplicati/Localization/da/GUI/Strings/Common.da.resx @@ -125,38 +125,38 @@ The full backup duration entered is not valid: {0} - One day + En dag A string displayed in comboboxes indicating that the duration should be one day - One month + En måned A string displayed in comboboxes indicating that the duration should be one month - One week + En uge A string displayed in comboboxes indicating that the duration should be one week - Above normal + Over normal - Below normal + Under normal - Highest + Højeste Normal - Lowest + Laveste - Three months + Tre måneder A string displayed in comboboxes indicating that the duration should be three months - Two weeks + To uger A string displayed in comboboxes indicating that the duration should be two weeks \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 853d81e15..74be14c0c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +trunk +Added a FTP_USERNAME option to solve problems with usernames in urls. + 1.0.1 r215 05 jul 2009 Fixes to a restore problem when restoring the setup Added a debug option for the SSH backend