Implement unit test which demonstrates bug https://bugs.freenetproject.org/view.php?id=6207
- This actually adds two unit tests. The one relevant for the bug is the testCreateOwnIdentity_Duplicate2() one. The *1 one has been added for cleanness: Its nice to test both possible error conditions of createOwnIdentity()
- The *2 test will currently fail because the relevant bug is not fixed yet. The purpose of this branch will be to fix it.
WebOfTrust.createOwnIdentity:(): Use getShortestUniqueNickname() instead of getNickname()
- Mixing up OwnIdentitys can have very bad effects, so we should use the former instead of the latter function whenever possible
- I've filed bug https://bugs.freenetproject.org/view.php?id=6262 to ensure that people review the rest of WOT for possible cases where getNickname() might be replaced as well.
WebOfTrust.createOwnIdentity(): Don't allow creating an identity when a non-own Identity exists which matches its URI.
- This party fixes issue https://bugs.freenetproject.org/view.php?id=6207 but does NOT complete the branch: We need to introduce a new database format version and write database upgrade code which deletes existing duplicate identities.
- The unit tests should succeed now.
Indent.
Finish fixing issue 6207 (https://bugs.freenetproject.org/view.php?id=6207):
- Introduce a new database format version and write upgrade code for old databases which fixes the breakage caused by the issue.
Merge branch 'issue-0006207'