osf.io
osf.io copied to clipboard
[fix] prevent creating a phantom BaseFileNode with Guid
Purpose
if the ember files detail page is waffled on, then visiting /<guid>/files/osfstorage/<...>
(where <...>
is not a real file id) creates a phantom OsfStorageFileNode
with its own guid (e.g. https://api.osf.io/v2/files/yp4su/ )
i don't see any significant consequences to this, but it's not good.
Changes
wait to create a guid and redirect to the file detail page until after verifying the file exists.
QA Notes
Please make verification statements inspired by your code and what your code touches.
- Verify
- Verify
What are the areas of risk?
Any concerns/considerations/questions that development raised?