Snapshots are not typed, and no check is done when restoring
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.
Steps to Reproduce
- Snapshot a user
- Delete it
- Create a user with the same uid ("Login") elsewhere
- Restore the snapshot
The restore should fail in some way because uid is a unique field.
The snapshot is restored with no error and you get a duplicated uid
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)