The vulnerability lies in the process of deleting share links associated with a file. When a user deletes a file, the http.resourceDeleteHandler is invoked. In the vulnerable version, this handler called d.store.Share.DeleteWithPathPrefix using only the file path. This call propagated down to the database backend, specifically bolt.shareBackend.DeleteWithPathPrefix. The core of the vulnerability is in this database function, which would delete all share link records where the stored path had the deleted file's path as a prefix, without verifying the owner of the share link. This allowed a low-privileged user to craft a file path that was a prefix to another user's shared file path, and by deleting their own file, they could trigger the deletion of the other user's share link. The fix involved passing the user's ID from the HTTP handler all the way down to the database query, ensuring that DeleteWithPathPrefix only deletes share links belonging to the user performing the action.