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

[BUG] - Security issue with using firebase functions #27

Open
4 tasks
zvikarp opened this issue May 2, 2019 · 0 comments
Open
4 tasks

[BUG] - Security issue with using firebase functions #27

zvikarp opened this issue May 2, 2019 · 0 comments
Labels
available task waiting for a contributor to start working on this task bug Something isn't working security issue
Milestone

Comments

@zvikarp
Copy link
Owner

zvikarp commented May 2, 2019

The security issue
When a user uses a firesbase function (e.g. changing his name) there is no check that it is him.
This can be a big problem because we use firebase functions for admin only functions (sending messages).

How to fix

  1. generate a token for user and sending it to the function.
  2. function checks the token and validates it.
  3. function gets uid from the function and uses it. not a uid passed to it.
  4. if needed, check in firestore if user has specific role.

This issue is in the following functions:

  • changeName
  • changeUserStatus
  • sendMessage (in the near future...)
  • changeUserRoles(in the near future...)
@zvikarp zvikarp added bug Something isn't working available task waiting for a contributor to start working on this task security issue labels May 2, 2019
@zvikarp zvikarp added this to the version 1.0.0 milestone May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
available task waiting for a contributor to start working on this task bug Something isn't working security issue
Projects
None yet
Development

No branches or pull requests

1 participant