hashtopolis/server

[BUG]: Implement deleting objects in new API that have foreignkey constraints

Opened this issue · 0 comments

Version Information

0.14.3

Hashcat

No response

Description

Currently it is not possible to delete objects in the new API, that have foreignkey constraints. For example, in a hash the foreingkey to hashlist can't be null, but deleting a hashlist doesn't cascade to hash. This means that currently hashlist cant be deleted.

There are 2 possible solutions for this:

  1. Either implement #1119 to cascade deletes in the database layer.
  2. The other solution is to add more logic in the deleteObject() function where this is needed. This is also the solution that was used in the old API.

Personally I have a slight preference for solution 1, because this requires less additional logic that has to be written. The con of this solution could be that when you for example accidently delete a hashlist in the DB you also lose your hashes, which can be quite problematic.