Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

Unable to show iCloud contact photos

  • 3 件の返信
  • 2 人がこの問題に困っています
  • 6 回表示
  • 最後の返信者: Matt

more options

When Thunderbird is set to synchronize from an iCloud contact CardDAV, it is unable to show the photos for the contact. I am using TB 115 on Windows (problem is platform independent).

Steps to reproduce
  1. Have an Apple ID. Use iCloud contact's web UI to create a contact and upload a photo for them.
  2. Get an app password for the Apple ID.
  3. Add iCloud contact as a CardDAV address book in TB. Should use https://contacts.icloud.com/contacts/ as the carddav location. The actual carddav URL I got is something like https://p123-contacts.icloud.com/12345678901/carddavhome/card/. (not a real link)
  4. Sync the address book. The photo would not display correctly.
My investigation

Apple's carddav API server returns in its vcard a HTTP URL as its PHOTO field, like:

PHOTO;VALUE=URI:https://gateway.icloud.com/contacts/12345678901/ck/card/123
 456789abcd12345678abcd1234567


(not a real url; you can export the vcard if you have done the above reproducing steps) However, this URL cannot be directly accessed (would return 401 saying "Missing X-APPLE-WEBAUTH-USER cookie"; see e.g. this github issue). However, the cookie is not really needed; I can use HTTP basic auth with the same credential for the carddav server (in this case it's the apple app password, [email protected]:1234-abcd-5678-dcba).

Potential fix

The current implementation directly puts the carddav photo URI into an HTML img tag. I think Thunderbird can make an AJAX request to fetch the image with the credentials and then put the result into an img tag.

When Thunderbird is set to synchronize from an iCloud contact CardDAV, it is unable to show the photos for the contact. I am using TB 115 on Windows (problem is platform independent). =====Steps to reproduce===== # Have an Apple ID. Use [https://www.icloud.com/contacts/ iCloud contact]'s web UI to create a contact and upload a photo for them. # Get an app password for the Apple ID. # Add iCloud contact as a CardDAV address book in TB. Should use https://contacts.icloud.com/contacts/ as the carddav location. The actual carddav URL I got is something like https://p123-contacts.icloud.com/12345678901/carddavhome/card/. (not a real link) # Sync the address book. The photo would not display correctly. =====My investigation===== Apple's carddav API server returns in its vcard a HTTP URL as its PHOTO field, like: <pre> PHOTO;VALUE=URI:https://gateway.icloud.com/contacts/12345678901/ck/card/123 456789abcd12345678abcd1234567 </pre> (not a real url; you can export the vcard if you have done the above reproducing steps) However, this URL cannot be directly accessed (would return 401 saying "Missing X-APPLE-WEBAUTH-USER cookie"; see e.g. [https://github.com/MauriceConrad/iCloud-API/issues/44 this github issue]). However, the cookie is not really needed; I can use HTTP basic auth with the same credential for the carddav server (in this case it's the apple app password, <code>[email protected]:1234-abcd-5678-dcba</code>). =====Potential fix===== The [https://github.com/mozilla/releases-comm-central/blob/658d2be2b789b3da8b2db7f5ac0f602b31a60613/mail/components/addrbook/content/aboutAddressBook.js#L3080C8-L3081 current implementation] directly puts the carddav photo URI into an HTML img tag. I think Thunderbird can make an AJAX request to fetch the image with the credentials and then put the result into an img tag.

この投稿は EtaoinWu により に変更されました

すべての返信 (3)

more options

Have you considered filing a bug? https://bugzilla.mozilla.org/home

I really don't think anything useful will be achieved in a peer support forum.

more options

Matt said

Have you considered filing a bug? https://bugzilla.mozilla.org/home I really don't think anything useful will be achieved in a peer support forum.

Filed as https://bugzilla.mozilla.org/show_bug.cgi?id=1874805. Do I need to mark this as solved?

more options

It is not really solved, but marking topics solved allows them to be indexed by search engines. I would mark it as such for that reason. But I will leave it to you.