Skip to content

Ability to access files you shall not be able to access #6974

Description

@Mineblame16

Please confirm the following.

Describe the bug

While waiting for moderation you can download your own project (thats normal) but any unauthenticated user / not project owner is able to download it too, the solution would be to guard the download endpoint with ownership and role checking.
This is a minor issue but could contribute to an exploit.

Steps to reproduce

  1. Get the url of unmoderated project download
  2. Use incognito mode to erase tokens
  3. access the url

Expected behavior

The user shall not be able to download the file since it is unmoderated

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiRelates to the Modrinth API for developersbackendInvolves work from the backend team

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions