DAST On-Demand Add uniqueness constraint to DastSiteToken#token
problem
in !67933 (merged) we added a missing application-level uniqueness constraint on token
. however we may have existing duplicate tokens in the database and race conditions could result in duplicates being created.
proposal
- prevent new duplicates being added (eg. at application level)
- add a data migration to remove existing duplicates
- add a migration that adds an index (
token
)
Edited by Marcos Rocha