Last Comment Bug 741158 - "Always load remote content from ..." fails to work with Thunderbird on OS X (Picks up contact from OS X address book, rather than local)
: "Always load remote content from ..." fails to work with Thunderbird on OS X ...
Status: RESOLVED FIXED
[str in comment 5]
:
Product: Thunderbird
Classification: Client Software
Component: Message Reader UI (show other bugs)
: 11 Branch
: All Mac OS X
: -- normal (vote)
: Thunderbird 26.0
Assigned To: Magnus Melin
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-31 20:39 PDT by ChiefPoints
Modified: 2013-09-09 14:27 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed


Attachments
possible fix (1.37 KB, patch)
2013-08-24 04:31 PDT, Magnus Melin
standard8: review+
standard8: feedback+
standard8: approval‑comm‑aurora+
standard8: approval‑comm‑beta+
Details | Diff | Splinter Review

Description ChiefPoints 2012-03-31 20:39:53 PDT
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0
Build ID: 20120312181643

Steps to reproduce:

When I receive a message with remote content, I get the usual warning: "To protect your privacy, Thunderbird has blocked remote content in this message.", with the link: "always load remote content from user@xyz.com" underneath, and the "Show Remote Content" button to the right.  I then click on the link to allow remote content to be always displayed for the email address.


Actual results:

Upon clicking the link, you see the warning attempt to disappear, but then it returns and remote content isn't displayed.   If you click the button on the right, "Show Remote Content" on a message by message basis, it is functioning properly.


Expected results:

Upon clicking the link to "Always show remote content from ...", the warning message should go away, the email address should be added to the address book and tagged to display remote content.  This issue began directly after installing Thunderbird version 11, and was tested on OS X 10.6.x Snow Leopard, OS X 10.7.3 Lion, and Windows Vista Ultimate.  The bug is only present in the OS X versions of the software, The MS Windows version works as it should.  The bug is always reproducible on OS X and is present when operating Thunderbird 11.0 and 11.01 in safe mode.
Comment 1 ChiefPoints 2012-04-01 07:22:28 PDT
Okay, some additional information here.  Over the night I received some messages that I was able to click on the link to always show remote content and it did work properly, so I've done some comparisons in the messages to attempt to isolate what is causing the issue.  I haven't been able to isolate what is causing some of the messages to not allow this to work properly.  I did find that the clicking the "Always show remote.." link in the messages that don't work will add the address to the address book in these messages, but it still won't display the remote content and won't bring up the address add dialog screen as it is supposed to.  I've deleted the address book entries and attempted to click on the "Always show remote content..." link again, and it will again add the address to the book, but will not bring up the dialog box or show the remote content.  

If it will help to have the message source of a message that won't allow me to click the link, let me know and I'll sterilize it and attach it.
Comment 2 Hashem Masoud 2012-04-02 00:00:51 PDT
(In reply to ChiefPoints from comment #1)
Do you see similarities with bug 528712 ?
Comment 3 ChiefPoints 2012-04-02 20:19:49 PDT
@Hashem Masoud: It's concerning the same function as bug 528712, but I believe that bug is more of a feature request asking for it to remember your last choice (as it should).  In my case, you can't get it to ever bring up the Add To dialog box.  This appears to of been introduced in ver 11 for OS X, as I didn't have this issue with previous versions, including the MS Windows version.   I've tested the windows versions with the same messages that the OS X version mishandles, and it handles them fine.
Comment 4 Bart Bubak 2012-05-29 15:03:26 PDT
Same in 12.0.1 on Ubuntu 12.04
Link "always load remote content from ..." doesn't work, just clicking on it do nothing. 
In previous version opens contact details with check box with the same option. 
Now even this check box not exist in contact details.
Comment 5 Apollo 2013-07-30 09:58:23 PDT
Hi gang,

I've got some detail on this - I also have been getting this problem on Mac OSX Thunderbird (17.0.7), but it was only happening with people I knew really well, so that was odd...  Eventually I figured it out - it's picking up my Mac "Contacts", which of course is shared with my iPhone and everything.  Apparently the "always load remote content" link doesn't work because the iPhone contacts are read-only, and it's trying to make the change there.

As an experiment, I went into Contacts and removed the email address from my wife's contact page.  I then relaunched Thunderbird, and immediately was able to see pictures in emails she sent me.  (So, hm, that means that the "always load remote content" button was _setting_ the value in the correct address book record, but the email display was _reading_ the value from the Mac OSX address book instead.)

I hope this helps you find a solution for the next point release - this is sort of OK, but it means that I don't have email addresses in my iPhone.  Is there maybe a way to disconnect the Mac OSX address book from Thunderbird completely?
Comment 6 Apollo 2013-07-30 10:05:47 PDT
Bug 528735 suggests that we fix this by always loading remote content from all Mac OS Address book contacts.  I think this would be a fine idea.  Or at least a fine option.
Comment 7 Mark Banner (:standard8) (afk until 26th July) 2013-08-06 01:25:00 PDT
Thanks Apollo. Confirming based on your comment 5, as I can certainly see how that would happen.

As a workaround, you can open up the address book window, go to the File menu, and unselect "Use Mac OS X Address Book".
Comment 8 Mark Banner (:standard8) (afk until 26th July) 2013-08-06 01:38:51 PDT
I can see two potential ways to fix this:

1) Change nsMsgContentPolicy::ShouldAcceptRemoteContentForSender to not look in read-only address books.

2) Make an OS X version of GetPropertyAsBool which throws NS_ERROR_NOT_AVAILABLE when getting the remote content attribute. Update nsMsgContentPolicy to detect it.

I think I'm in slight preference of 1, as if its read-only, then we're never going to be able to set the user option.
Comment 9 Magnus Melin 2013-08-24 04:31:11 PDT
Created attachment 795031 [details] [diff] [review]
possible fix

I suppose this would be option 1) - someone with a mac should probably test and drive it in...

I'm a bit confused though - we had 465577 which looks like its still in tree...
Comment 10 Mark Banner (:standard8) (afk until 26th July) 2013-08-26 00:20:22 PDT
Comment on attachment 795031 [details] [diff] [review]
possible fix

A quick glance and this looks reasonable to do and feels like the right patch. I haven't tested it yet though.

Bug 465577 probably didn't pick the up on this as that was just about adding the flag rather than reading it.
Comment 11 Mark Banner (:standard8) (afk until 26th July) 2013-08-27 11:48:08 PDT
Comment on attachment 795031 [details] [diff] [review]
possible fix

I've just tested this and it works fine and does the right things.

+      // If read-only, the remote content property wouldn't be set, so bail.

I would say, "Read-only ABs, don't support the remote content property, so skip this one".

r=Standard8 with that fixed.

Please also nominate for aurora/beta once this lands, I think it would be good to land for TB 24.
Comment 12 Magnus Melin 2013-08-29 11:38:03 PDT
https://hg.mozilla.org/comm-central/rev/5a8c7d05e9d9 -> FIXED
Comment 13 Justin Wood (:Callek) 2013-09-08 11:29:00 PDT
Is this safe to take for 24? We're coming up on the cutoff.

Note You need to log in before you can comment on or make changes to this bug.