Fixed Mega backend worng username parsing

This commit is contained in:
Kenneth Skovhede
2025-03-28 15:57:46 +01:00
parent 0be4a77a0c
commit 0dca3f356a
@@ -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();