Export files can be downloaded without auth through public /uploads/exports #35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by Nye while reviewing #32 (pre-existing, not part of that fix).
Export files are written under
<UPLOAD_PATH>/exports, andendpoint.exserves all ofUPLOAD_PATHat/uploadswithPlug.Staticand no auth. So/uploads/exports/fuzzy_catalog_export_<ISO timestamp>.json|csvcan be downloaded by anyone who guesses the name. The timestamp goes to the microsecond, so it's hard but not impossible. The data is catalog only, no user data, hence low.Fix: store exports outside the public dir (e.g. a separate
EXPORT_PATH, or a private dir beside the uploads), or 404/uploads/exports/*before the static plug. Downloads already go through the admin controller, so nothing legitimate uses the public path.