Ticket #1484601 (closed Patches: fixed)

Opened 15 months ago

Last modified 7 months ago

"Always display images" patch

Reported by: benw Owned by: till
Priority: 5 Milestone: 0.2-beta
Component: Client Scripts Version: 0.1-rc1
Severity: normal Keywords:
Cc:

Description

I created this patch to allow behavior to have an option to always display remote images from a particular sender so you don't have to click "Display remote images" each time you load one of their messages (behavior similar to some commercial webmail services). I've also sent this to the dev list, I'm kinda new to this so sorry in advance if I'm doing it incorrectly.

A few things:

1) I didn't know the best way to get the raw email address from the $MESSAGE headers, so I wrote a simple method that uses preg_match to extract it. If there's a better way, please let me know and I'll update my patch.

2) Caching causes a bit of a glitch in my patch. If you click a message with remote objects, click Always display, it will add the sender to the address book and display the images. If you go right back to the message however it will show the cached version so you have to Shift-Reload or it will appear it was unsuccessful. I'd be grateful if anybody knows a way around this.

3) Only includes updates to the en_US locale, needs translations.

Attachments

display_images.2.patch (6.5 kB) - added by benw 15 months ago.
#1484601.200802061339.patch (6.1 kB) - added by robin 11 months ago.
1484601.200802141337.patch (5.9 kB) - added by robin 11 months ago.

Change History

Changed 15 months ago by benw

Changed 11 months ago by till

  • milestone set to 0.1-stable

Changed 11 months ago by till

  • owner set to till
  • status changed from new to assigned

Changed 11 months ago by thomasb

This patch needs to be simplified first:

1) Don't add a new method to rcube_contacts but use search() instead.

2) rcmail_strip_email() does not work as expected when there's no <>. Use rcube_imap::decode_address_list() instead.

Changed 11 months ago by robin

Changed 11 months ago by robin

Added #1484601.200802061339.patch.

Personally, I think we should make the 'always show images from persons in the address book' configurable.

Changed 11 months ago by till

@Robin I agree. People in the addressbook are more likely to not send malicious email.

Also, we could easily replicated "Always display images from this sender" with a "add to addressbook"-call.

I couldn't look at the patch yet (no HTML preview... :(), but does your patch do this, if not could you work on it "soon"? :)

Changed 11 months ago by till

  • milestone changed from 0.1-stable to 0.1.1

If no one cares, we'll do it later. :)

Changed 11 months ago by robin

I wouldn't use this feature (anyone who sends HTML will never end up in my addressbook) but made a new patch anyway.

See 1484601.200802141337.patch. It adds an option to the settings tab. Only problem is that the image displaying stuff is cached somehow, and that cache needs to be cleared after the setting has changed.

Changed 11 months ago by robin

Changed 10 months ago by thomasb

  • milestone changed from 0.1.1 to 0.2-beta

Changed 7 months ago by alec

  • status changed from assigned to closed
  • resolution set to fixed

Applied in r1525.

Note: See TracTickets for help on using tickets.