diff --git a/Duplicati/Library/Backend/Mega/MegaBackend.cs b/Duplicati/Library/Backend/Mega/MegaBackend.cs index 4431c7ace..56cb2ef8e 100644 --- a/Duplicati/Library/Backend/Mega/MegaBackend.cs +++ b/Duplicati/Library/Backend/Mega/MegaBackend.cs @@ -79,9 +79,9 @@ namespace Duplicati.Library.Backend.Mega if (options.ContainsKey("auth-two-factor-key")) m_twoFactorKey = options["auth-two-factor-key"]; - if (string.IsNullOrEmpty(m_username)) + if (string.IsNullOrWhiteSpace(auth.Username)) throw new UserInformationException(Strings.MegaBackend.NoUsernameError, "MegaNoUsername"); - if (string.IsNullOrEmpty(m_password)) + if (string.IsNullOrWhiteSpace(auth.Password)) throw new UserInformationException(Strings.MegaBackend.NoPasswordError, "MegaNoPassword"); (m_username, m_password) = auth.GetCredentials();