osf.io icon indicating copy to clipboard operation
osf.io copied to clipboard

[fix] prevent creating a phantom BaseFileNode with Guid

Open aaxelb opened this issue 2 years ago • 0 comments

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?

Documentation

Side Effects

Ticket

aaxelb avatar Oct 26 '22 21:10 aaxelb