OUT-401: Prevent creation of contact entries for own identities OUT-401
authorThomas
Thu, 15 Feb 2018 13:30:19 +0100
branchOUT-401
changeset 2007 31da7a34305e
parent 2006 f2b0f06a8a5b
child 2008 fa305b491940
OUT-401: Prevent creation of contact entries for own identities
PEPIdentity.cs
--- a/PEPIdentity.cs	Thu Feb 15 13:05:06 2018 +0100
+++ b/PEPIdentity.cs	Thu Feb 15 13:30:19 2018 +0100
@@ -1649,8 +1649,10 @@
                 items = null;
             }
 
-            // If contact doesn't exist, create it
-            if (contactExists == false)
+            // If contact doesn't exist, create it.
+            // Make also sure that it's not an own identity.
+            if ((contactExists == false) &&
+                (PEPIdentity.GetIsOwnIdentity(address) == false))
             {
                 try
                 {