6.0.0-alpha12
6/12/25

[#11207] Favourites driver matches all email address searches
Summary Favourites driver matches all email address searches
Queue Turba
Queue Version 3.0.14
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester simon (at) simonandkate (dot) net
Created 06/01/2012 (4759 days ago)
Due
Updated 06/08/2012 (4752 days ago)
Assigned 06/04/2012 (4756 days ago)
Resolved 06/05/2012 (4755 days ago)
Github Issue Link
Github Pull Request
Milestone 3.0.15
Patch No

History
06/08/2012 03:27:21 AM simon (at) simonandkate (dot) net Comment #15 Reply to this comment
Noted... looking in my upgrade records, my last Imp u/g was to 5.0.19, 
i.e. I skipped .20, which I should have checked and made clear in my 
original post.

[Show Quoted Text - 18 lines]
06/06/2012 08:52:05 PM Michael Slusarz Comment #14 Reply to this comment
FWIW, this would have first been seen as broken in IMP 5.0.20, not 
5.0.21, since we switched to exact address searching after 5.0.19.  So 
upgrading from 5.0.20->5.0.21 would not have changed anything:

commit 1e26935a7c16a327f1c60e43bf00a100ab48bfda
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Tue Mar 6 12:56:06 2012 -0700

     This should be an exact address search

-----

slusarz@bigworm % git show imp-5.0.20
tag imp-5.0.20
Tagger: Jan Schneider <jan@horde.org>
Date:   Wed Apr 11 12:36:58 2012 +0200

Released imp-5.0.20.
06/05/2012 07:49:53 PM Git Commit Comment #13 Reply to this comment
Changes have been made in Git (develop):

commit db87df86571a87ed8c0ef19826e13caae939935a
Author: Jan Schneider <jan@horde.org>
Date:   Tue Jun 5 11:06:27 2012 +0200

     Correctly build AND queries, implement strict searching (Bug #11207).

  turba/docs/CHANGES              |    1 +
  turba/lib/Driver/Favourites.php |   57 ++++++++++++++++++++++++++------------
  turba/package.xml               |    4 +-
  3 files changed, 42 insertions(+), 20 deletions(-)

http://git.horde.org/horde-git/-/commit/db87df86571a87ed8c0ef19826e13caae939935a
06/05/2012 10:17:19 AM simon (at) simonandkate (dot) net Comment #12 Reply to this comment
Wow... Impressively quick fix.

Thanks, will chuck that in and confirm.
06/05/2012 09:08:16 AM Jan Schneider State ⇒ Resolved
Milestone ⇒ 3.0.15
 
06/05/2012 09:07:18 AM Git Commit Comment #11 Reply to this comment
Changes have been made in Git (master):

commit db87df86571a87ed8c0ef19826e13caae939935a
Author: Jan Schneider <jan@horde.org>
Date:   Tue Jun 5 11:06:27 2012 +0200

     Correctly build AND queries, implement strict searching (Bug #11207).

  turba/docs/CHANGES              |    1 +
  turba/lib/Driver/Favourites.php |   57 ++++++++++++++++++++++++++------------
  turba/package.xml               |    4 +-
  3 files changed, 42 insertions(+), 20 deletions(-)

http://git.horde.org/horde-git/-/commit/db87df86571a87ed8c0ef19826e13caae939935a
06/05/2012 07:54:33 AM Jan Schneider Summary ⇒ Favourites driver matches all email address searches
 
06/05/2012 07:53:40 AM Jan Schneider Version ⇒ 3.0.14
Queue ⇒ Turba
 
06/05/2012 01:15:56 AM simon (at) simonandkate (dot) net Comment #10 Reply to this comment

[Show Quoted Text - 32 lines]
Aha, progress...

Unselect "Automatically show images in messages when the sender is in 
my address book?" and it works again.

So you are spot-on, it is matching everything as being in the address book.
06/04/2012 11:10:01 PM Michael Slusarz Comment #9 Reply to this comment
We no longer use contacts/getField API call in IMP 6, so this is not 
an issue there (we use contacts/search).
06/04/2012 11:08:38 PM Michael Slusarz Comment #8
Assigned to Jan Schneider
Taken from Michael Slusarz
Reply to this comment
There is nothing wrong with the preferences.  And I have verified 
multiple times that nothing has changed in IMP 5 relating to the image 
viewing code.

On my system, however, something appears broken with the Turba 
getField API call.  It matches ALL entries in the favourites table, 
even if those emails do not match the search query (the matches are 
not even close).  The query being run is this:

Array
(
     [AND] => Array
         (
             [0] => Array
                 (
                     [field] => email
                     [op] => =
                     [test] => foo@example.com
                 )
         )
)

Two problems with this query:
1) The code in the Favourites driver does not handle the '=' op, only 
the LIKE op.
2) Any AND query that doesn't match will be considered as "found" and 
will be returned. (That's why the absence of the '=' op constititues 
matching).

Thus any email address, if querying the favourites addressbook, will 
ALWAYS be considered matched AFAICT.  No idea if this is your issue 
and, if so, why it suddenly started when upgrading only IMP.
06/04/2012 10:44:01 PM simon (at) simonandkate (dot) net Comment #7 Reply to this comment
I tried unsetting the pref, saving it, and logging out. Logged back 
in, and the preference was correctly still set as not ticked. As 
expected at that point, all images download without prompting for 
blocked images.

I then ticked the preference to block emails, logged out, and logged 
back in, and the preference again had correctly been retained. 
However, actual behaviour in Imp remains incorrect - all images are 
still downloaded.

The preference appears to be correctly maintained, but Imp is ignoring it.
06/04/2012 10:23:21 PM simon (at) simonandkate (dot) net Comment #6 Reply to this comment
Did something change?
No.
With respect to 5.0.20 -> 5.0.21.
I don't usually believe in coincidences...

Ever since running Horde I have had images blocked in HTML emails, 
with the exception of a couple of regular HTML newsletters that I get, 
which I have added to the Address Book so that I don't have to click 
on Show Blocked Iimages for these emails that I trust.

I.e. this is not something new that I am playing with...

I upgraded to 5.0.21, and the next day I noticed that images are not 
being blocked any more. Nothing else was changed on that server at 
that time.

What would be great would be some help on working out why it is doing 
it now all of a sudden, apparently coincidentally  :-/
06/04/2012 08:30:23 PM Michael Slusarz Comment #5 Reply to this comment
Did something change?
No.
With respect to 5.0.20 -> 5.0.21.
06/04/2012 08:22:29 PM Michael Slusarz Comment #4 Reply to this comment
Did something change?
No.
06/04/2012 08:21:09 PM Michael Slusarz Comment #3 Reply to this comment
Beside that, it looks like address book lookups haven't been used 
for 20 months without anyone noticing. Unless I'm missing something. 
AFAIC address book lookups have been (accidentally) removed in 
commit 91ffa129ee86b75d506351e1d6ac66e921676273.
Addressbook lookups occur in IMP_Ui_Imageview::showInlineImage().

_inAddressBook() is dead code, but that has been known for awhile.  I 
have never seen a need to remove it in IMP 5 though (it was long ago 
removed in IMP 6).
06/04/2012 12:21:13 PM Jan Schneider Comment #2 Reply to this comment
Beside that, it looks like address book lookups haven't been used for 
20 months without anyone noticing. Unless I'm missing something. AFAIC 
address book lookups have been (accidentally) removed in commit 
91ffa129ee86b75d506351e1d6ac66e921676273.
06/04/2012 12:12:53 PM Jan Schneider State ⇒ Assigned
Assigned to Michael Slusarz
 
06/01/2012 11:21:43 AM simon (at) simonandkate (dot) net Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Imp no longer blocking images in html emails
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
I have Imp 5.0.21 (just upgraded a couple of days ago, including clearing
cache etc). No other changes on the server in recent weeks.

In my Imp preferences, the following is set:

Block images in messages unless they are specifically requested? - YES

Automatically show images in messages when the sender is in my address
book? - YES

Imp no longer asks if I want to show blocked images (both Traditional
and Dynamic), but shows all HTML images for ALL emails, regardless of
whether the sender is in my address book. I have tried from a PC and my
iPad - both the same.

Did something change?

Saved Queries