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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: x-appwrite-id should disallow unique() #5542

Closed
2 tasks done
Suven-p opened this issue May 16, 2023 · 2 comments 路 Fixed by #5550
Closed
2 tasks done

馃悰 Bug Report: x-appwrite-id should disallow unique() #5542

Suven-p opened this issue May 16, 2023 · 2 comments 路 Fixed by #5550
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed product / storage Fixes and upgrades for the Appwrite Storage.
Milestone

Comments

@Suven-p
Copy link
Contributor

Suven-p commented May 16, 2023

馃憻 Reproduction steps

When passing unique() to x-appwrite-id header with CreateFile endpoint, the request completes successfully but breaks stuff on appwrite's side.

馃憤 Expected behavior

Return an error.

馃憥 Actual Behavior

Request completes successfully. The uploaded file can't be accessed, modified or deleted.

馃幉 Appwrite version

Appwrite Cloud

馃捇 Operating system

Linux

馃П Your Environment

No response

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

@Suven-p Suven-p added the bug Something isn't working label May 16, 2023
@stnguyen90 stnguyen90 added the product / storage Fixes and upgrades for the Appwrite Storage. label May 16, 2023
@stnguyen90
Copy link
Contributor

@Suven-p, thanks for raising this issue! 馃檹馃徏 It looks like we should add some validation to prevent malformed file ids passed in the x-appwrite-id header:

$fileId = $request->getHeader('x-appwrite-id', $fileId);

@stnguyen90 stnguyen90 added good first issue Good for newcomers help wanted Extra attention is needed labels May 17, 2023
@Suven-p
Copy link
Contributor Author

Suven-p commented May 17, 2023

@stnguyen90 Could you assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed product / storage Fixes and upgrades for the Appwrite Storage.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants