Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Hardening Firebase Rules #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

omer88
Copy link

@omer88 omer88 commented Mar 12, 2018

Fixes #41
You can view the security issue in this report.

Solution

I removed the rule ".write": "auth !== null && auth.provider === 'github'" from v1/users, and hardened the write rule under v1/users/$uid so a user can only write to its own uid.

In addition, I removed the read rule from /v1/users/$uid, since it was useless because of the ".read": "auth !== null && auth.provider === 'github'" under /v1/users.

From what I saw, the current functionality needs to read all the users, therefore I left it permissive rule.

Note: I didn't removed the problem from the old API, in order not to break anything.

An analysis on the fixed rules can be seen here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vulnerabilities in Firebase Database Rules
1 participant