Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Users with Public(ish) URLS to Baskets #134

Open
imRohan opened this issue Mar 9, 2022 · 2 comments
Open

Provide Users with Public(ish) URLS to Baskets #134

imRohan opened this issue Mar 9, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@imRohan
Copy link
Owner

imRohan commented Mar 9, 2022

Currently, users are able to GET/POST a particular basket via one private(ish) URLs.
The API endpoint looks like this /apiv1/pantry/PANTRY_ID/basket/BASKET_NAME.
This is problematic since users should not share this URL with untrusted parties since
it exposes both their PANTRY_ID (uuid) and a BASKET_NAME (human-readable name).

By providing users a way to create a public link directly to their basket, we should be able
to generate a "proxy path" to a particular basket without exposing private details.

POST - /apiv1/pantry/PANTRY_ID/public_basket/BASKET_NAME returns /apiv1/public/UUID

@LeXofLeviafan
Copy link

…I'd like to add that the user's own webapp also counts as an "untrusted party" for this purpose (because all major desktop browsers have built-in debuggers that make it trivial to keep track of all fetched URLs).

Using the basket name isn't really a problem (if anything, having it in the URL makes it more convenient for legitimate debugging, and it's hardly going to contain some sensitive information), but knowing the pantry ID is the only thing that anyone needs to gain full admin access to it.
In fact, rather than an "enhancement request", I'd flag this issue as a "critical bug" 😅

@WallOfMessages
Copy link

(hashing and salting the pantry id)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants