Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

iclouddrive: lowercase Apple ID for SRP authentication

Mike GIllan4a00a4dc4bbf
diff --git a/backend/iclouddrive/api/session.go b/backend/iclouddrive/api/session.go
index c4d188793..004faaa37 100644
--- a/backend/iclouddrive/api/session.go
+++ b/backend/iclouddrive/api/session.go
@@ -91,6 +91,11 @@ func (s *Session) Requires2FA() bool {
// SignIn performs SRP-based authentication against Apple's idmsa endpoint.
func (s *Session) SignIn(ctx context.Context, appleID, password string) error {
+ // Apple's SRP implementation expects a lowercase account name.
+ // The old plaintext flow didn't need this because the server normalized
+ // it, but SRP uses the username in client-side proof computation (M1).
+ appleID = strings.ToLower(appleID)
+
// Step 1: Initialize the auth session
if err := s.authStart(ctx); err != nil {
return fmt.Errorf("authStart: %w", err)