Review class identity getters/setters for non-cloned Date objects:
- Date is mutable so we should clone it in getters and setters
- Document why we clone it
- At places where it is already cloned, remove wrongly documented reason of "to prevent duplicate usage of db4o-stored objects" - Date is a db4o-primitive such as int, String, etc - so this does not apply.
- This is part of resolving https://bugs.freenetproject.org/view.php?id=6074
Review class OwnIdentity getters/setters for non-cloned Date objects:
- Date is mutable so we should clone it in getters and setters
- Document why we clone it
- At places where it is already cloned, remove wrongly documented reason of "to prevent duplicate usage of db4o-stored objects" - Date is a db4o-primitive such as int, String, etc - so this does not apply.
- This is part of resolving https://bugs.freenetproject.org/view.php?id=6074
Review class Trust getters/setters for non-cloned Date objects:
- Date is mutable so we should clone it in getters and setters
- Document why we clone it
- At places where it is already cloned, remove wrongly documented reason of "to prevent duplicate usage of db4o-stored objects" - Date is a db4o-primitive such as int, String, etc - so this does not apply.
- This is part of resolving https://bugs.freenetproject.org/view.php?id=6074
Inline getter so we don't clone it twice:
- We did activateFully() so no activation is needed here.
Review class Score getters/setters for non-cloned Date objects:
- Date is mutable so we should clone it in getters and setters
- Document why we clone it
- At places where it is already cloned, remove wrongly documented reason of "to prevent duplicate usage of db4o-stored objects" - Date is a db4o-primitive such as int, String, etc - so this does not apply.
- This is part of resolving https://bugs.freenetproject.org/view.php?id=6074
- In Score.clone(), don't clone date twice where possible. Also, activateFully() is needed because we don't activate there and we need all fields of the class in clone() anyway.
Review class IntroductionPuzzle getters/setters for non-cloned Date objects:
- Date is mutable so we should clone it in getters and setters
- Document why we clone it
- This is part of resolving https://bugs.freenetproject.org/view.php?id=6074
FCP API "RandomName": Remove support for "type" option
- This allowed the generation of nicknames which were not even valid in terms of Identity.isNicknameValid(). It would be impossible to use such nicknames with WOT.
- The reason is that the option did allow the generation of nicknames which use spaces or non-breakable spaces - which we both don't consider as valid in nicknames
- Notice: Making spaces valid is NOT an option since this would break compatibility with newsreaders for example. We want nicknames to be newsreader compatible though because they are very suitable as UI for things such as Freetalk. (Remember: You can generate a valid E-Mail address with something like "nickname@encoded-identity-id.freetalk")
Fix random nickname generation from returning invalid nicknames:
- This fixes issue https://bugs.freenetproject.org/view.php?id=6148
- Also reduces visibility of function not used anywhere else.
- Also add an unit test so it doesn't happen again.
Merge branch 'master' of https://github.com/freenet/plugin-WoT-staging into fix-database-leakage