viur-blob-locks
entities are just using id_or_name
#1214
Labels
bug(fix)
Something isn't working or address a specific issue or vulnerability
Priority: Critical
This should be dealt with ASAP. It's blocking someone.
Milestone
I need to test and recheck this, but as far as I see there is a problem with
viur-blob-locks
.viur-blob-locks
prevents files (whether weak or not) from being deleted, even if the FileSkel has already been deleted.When saving the skeleton, all the dlkeys used are collected with the help of
getReferencedBlobs
and saved in aviur-block-locks
entity. However, this only uses theid_or_name
of the skeleton key.viur-core/src/viur/core/skeleton.py
Lines 1144 to 1164 in 3a681bc
Which means that if two skeletons in different kinds have the same
id_or_name
, they will always overwrite each other'sviur-block-locks
entity.In ViUR2 the complete key (including kindname) was used, so there were no conflicts: https://github.com/viur-framework/server/blob/e53c744834103a467a5f51b6b29db7aa531a6096/skeleton.py#L708
I think the probability that the same id is used twice with the randomly used ids is low. Especially if projects only have a few entities (< 1000). But it is not impossible. We should therefore change this implementation asap and use ancestors, for example.
The problem is to some way related to #1211. However, since I assume that in this case it is really caused by the error that is fixed in #1213, I would look at this separately.
The text was updated successfully, but these errors were encountered: