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

Validate data retrieved from Firestore #159

Closed
NicholasChoong opened this issue Dec 19, 2022 · 4 comments · Fixed by #248
Closed

Validate data retrieved from Firestore #159

NicholasChoong opened this issue Dec 19, 2022 · 4 comments · Fixed by #248
Assignees
Labels
difficulty::hard Difficult tasks enhancement New feature or request frontend Task must have a front end issue point::5 Issue will take a very long time to resolve. Issue depends on other major features and tasks.

Comments

@NicholasChoong
Copy link
Member

Is your feature request related to a problem? Please describe.
The current code only cast type to the retrieved data.

Describe the solution you'd like
Use Zod to validate the data.

We are in the process of changing our database schema so this issue is blocked by #155 .

@NicholasChoong NicholasChoong added enhancement New feature or request frontend Task must have a front end issue difficulty::hard Difficult tasks point::5 Issue will take a very long time to resolve. Issue depends on other major features and tasks. labels Dec 19, 2022
@scratchclaggy
Copy link
Contributor

Is validating data from reads necessary if we're also doing validation on writes?

@NicholasChoong
Copy link
Member Author

I personally prefer to check data retrieved from an external source as we have no idea what sort of changes have been made to data outside of the app. Also, Firestore security rules only apply to the request coming from the client side apps so Firebase admin SDK or Functions can bypass these rules.
You have a point though as the only part that is vulnerable to change is on the client side only.

@skyheat
Copy link
Member

skyheat commented Dec 31, 2022

Also @JeremiahPinto roasted us.

@NicholasChoong NicholasChoong self-assigned this Jan 31, 2023
@github-actions
Copy link

Branch i159-validate_data_retrieved_from_firestore created!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty::hard Difficult tasks enhancement New feature or request frontend Task must have a front end issue point::5 Issue will take a very long time to resolve. Issue depends on other major features and tasks.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants