After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685401 - linking by email
linking by email
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: libfolks
git master
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-03 15:26 UTC by Patrick Ohly
Modified: 2012-10-29 23:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make "email-addresses" linkable in EDS (1.47 KB, patch)
2012-10-05 08:59 UTC, Patrick Ohly
needs-work Details | Review
make "email-addresses" linkable in EDS + remove lazy loading (5.08 KB, patch)
2012-10-29 16:23 UTC, Patrick Ohly
needs-work Details | Review
Fix merged patch (2.08 KB, patch)
2012-10-29 22:28 UTC, Jeremy Whiting
accepted-commit_now Details | Review

Description Patrick Ohly 2012-10-03 15:26:41 UTC
As discussed on IRC, folks only links Personas based on a few properties which are assumed to be unique for persons. For EDS, these are IM handles and web service addresses. The later are folks extensions and not normally found in vcards.

folks does not link by telephone number or email address.

I agree with the argument that phone numbers are too often shared between different persons to be used for linking, for example family members living in the same house.

For email I am less sure. Both I and flo expected that to be a unique identifier for real-world persons and thus suitable for linking. Let's discuss the pros and cons of linking by email...
Comment 1 Travis Reitter 2012-10-03 17:57:00 UTC
(In reply to comment #0)
> As discussed on IRC, folks only links Personas based on a few properties which
> are assumed to be unique for persons. For EDS, these are IM handles and web
> service addresses. The later are folks extensions and not normally found in
> vcards.
> 
> folks does not link by telephone number or email address.
> 
> I agree with the argument that phone numbers are too often shared between
> different persons to be used for linking, for example family members living in
> the same house.
> 
> For email I am less sure. Both I and flo expected that to be a unique
> identifier for real-world persons and thus suitable for linking. Let's discuss
> the pros and cons of linking by email...

Shared email addresses aren't entirely unheard of. They were somewhat common in the dial-up era, when people would get their email access through their ISP.

I'm guessing that's very rare at this point, but I do know of two people who share an email account (I think they also share a Facebook account, which is even less common and not something I'd worry about supporting).

But the main reason we didn't link by email, at least historically, was that at least one of the Personas providing it would be untrusted. Eg, Facebook contacts can set an arbitrary email address (and IM account, for that matter). So someone would be able to spoof another person's identity through their Facebook account.

However, I think we should be able to add "email-addresses" to Edsf.Persona.linkable_properties (and this should be all the implementation needed to support this feature, I think). We only do linking if multiple personas contain the same value for the same property, both Personas have that property in their linkable_properties, and one Persona's PersonaStore.trust_level == FULL and the other's Persona.trust_level >= PARTIAL.

We'll need to carefully check that all the linking this now supports is safe (eg, making sure we don't suddenly allow the Facebook-based spoofing I mentioned earlier), but I don't otherwise have a problem with it.
Comment 2 Patrick Ohly 2012-10-05 08:59:15 UTC
Created attachment 225865 [details] [review]
make "email-addresses" linkable in EDS

This works for me...
Comment 3 Philip Withnall 2012-10-05 10:25:13 UTC
Review of attachment 225865 [details] [review]:

Looks good to me. I agree with Travis that we should enable this. I’ve just quickly checked the code in the IndividualAggregator, and it does indeed only link two personas by their linkable properties if they both have FULL trust.

Please commit this to master along with a suitable entry in NEWS. Thanks!
Comment 4 Philip Withnall 2012-10-05 10:29:15 UTC
Review of attachment 225865 [details] [review]:

Oh, actually, you should probably also change edsf-persona.vala to no longer perform lazy loading on the email-addresses property. If it’s a linkable property, its values will always be needed, so lazy loading is an unnecessary overhead. See the im-addresses property in edsf-persona.vala for an example.
Comment 5 Patrick Ohly 2012-10-29 16:23:49 UTC
Created attachment 227554 [details] [review]
make "email-addresses" linkable in EDS + remove lazy loading

As suggested, this revised patch also removes lazy loading of email addresses.
Comment 6 Jeremy Whiting 2012-10-29 20:54:31 UTC
Thanks, merged to master.
Comment 7 Philip Withnall 2012-10-29 21:34:54 UTC
Review of attachment 227554 [details] [review]:

::: backends/eds/lib/edsf-persona.vala
@@ -288,3 @@
 
-  private HashSet<EmailFieldDetails>? _email_addresses = null;
-  private Set<EmailFieldDetails>? _email_addresses_ro = null;

Please don’t remove the read-only view of the set (_email_addresses_ro). folks exposes as many of its collection properties as possible as read-only collections. This prevents clients erroneously modifying the collections without going through folks.

@@ +529,3 @@
 
+  
+

Extraneous whitespace.
Comment 8 Jeremy Whiting 2012-10-29 22:28:36 UTC
Created attachment 227598 [details] [review]
Fix merged patch

Oops, my bad.  This patch should fix those two issues, right?
Comment 9 Jeremy Whiting 2012-10-29 22:30:06 UTC
Also, should Edsf.Persona _web_service_addresses also have a corresponding read only Set?
Comment 10 Philip Withnall 2012-10-29 23:01:08 UTC
Review of attachment 227598 [details] [review]:

Looks good to me.

> Also, should Edsf.Persona _web_service_addresses also have a corresponding read
> only Set?

libgee doesn’t provide any API like MultiMap.read_only_view, so this isn’t possible. I was sure there was a bug open against libgee about this, but it seems to have disappeared. Would you mind opening one please (and then opening a libfolks bug against it)?
Comment 11 Jeremy Whiting 2012-10-29 23:42:47 UTC
Done.