Opened 6 years ago

Closed 5 years ago

#1484601 closed Feature Patches (fixed)

"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 (3)

display_images.2.patch (6.5 KB) - added by benw 6 years ago.
#1484601.200802061339.patch (6.1 KB) - added by robin 5 years ago.
1484601.200802141337.patch (5.9 KB) - added by robin 5 years ago.

Download all attachments as: .zip

Change History (12)

Changed 6 years ago by benw

comment:1 Changed 5 years ago by till

  • Milestone set to 0.1-stable

comment:2 Changed 5 years ago by till

  • Owner set to till
  • Status changed from new to assigned

comment:3 Changed 5 years 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 5 years ago by robin

comment:4 Changed 5 years ago by robin

Added #1484601.200802061339.patch.

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

comment:5 Changed 5 years 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"? :)

comment:6 Changed 5 years ago by till

  • Milestone changed from 0.1-stable to 0.1.1

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

comment:7 Changed 5 years 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 5 years ago by robin

comment:8 Changed 5 years ago by thomasb

  • Milestone changed from 0.1.1 to 0.2-beta

comment:9 Changed 5 years ago by alec

  • Resolution set to fixed
  • Status changed from assigned to closed

Applied in [712b30dd].

Note: See TracTickets for help on using tickets.