Snapshots are not typed, and no check is done when restoring
Description
FD cannot know which objectType was a snapshot of, so when restoring the snapshot it just insert the LDIF saved without performing any check or processing.
FusionDirectory Version
1.2
Steps to Reproduce
- Snapshot a user
- Delete it
- Create a user with the same uid ("Login") elsewhere
- Restore the snapshot
Expected behavior:
The restore should fail in some way because uid is a unique field.
Actual behavior:
The snapshot is restored with no error and you get a duplicated uid
Additional Information
One possible solution:
- Store the objectType along with the snapshot
- Open the snapshoted LDIF through the stored objectType
- Save the opened object unless there are errors
(This is a bit similar to the process used when copy/pasting entries)
Related to fd-plugins#5631 (closed)