When a file is ingested, we fetch its session key and try to decrypt the body of the file with it.
Before doing the latter, we checks if the sha256 checksum of the session key is already contained in the database (for non-errored and non-cancelled files).
If so, we raise a User Error.
If not, we proceed with the decryption and store the checksum of the session key in the database. (Note, we are aware of the potential data-race there, but it is not a harmful one).
Describe the pull request:
[x] Bug fix
[x] Functional change
[x] New feature
[x] Code cleanup
[ ] Build system change
[ ] Documentation change
[ ] Language translation
One more tests has been enabled: Not ingesting twice the same file
When a file is ingested, we fetch its session key and try to decrypt the body of the file with it. Before doing the latter, we checks if the sha256 checksum of the session key is already contained in the database (for non-errored and non-cancelled files).
If so, we raise a User Error. If not, we proceed with the decryption and store the checksum of the session key in the database. (Note, we are aware of the potential data-race there, but it is not a harmful one).
Describe the pull request:
One more tests has been enabled: Not ingesting twice the same file