PlaidWeb / Publ

Flexible publishing system for the web
http://publ.beesbuzz.biz/
MIT License
40 stars 4 forks source link

ORM error when accessing an invalid authorized entry #474

Open fluffy-critter opened 2 years ago

fluffy-critter commented 2 years ago

Expected Behavior

When trying to access an invalid entry (i.e. the file has been deleted or the entry-ID is inconsistent) that requires authorization, the database record should get expunged before attempting to update the auth log.

Current Behavior

If there's a stray entry with an ID mismatch (due to weird edge-case race conditions), an attempt at accessing the entry will delete the item from the database, but then attempting to log the access results in a database error, which rolls back the transaction.

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context