Harden Firestore follower update rule
This prevents users from creating follower entries with the userId of someone else, which would effectively subscribe that person to the fold.
This commit is contained in:
parent
262ce38bc1
commit
5c8f939730
|
@ -64,7 +64,8 @@ service cloud.firestore {
|
|||
|
||||
match /{somePath=**}/followers/{userId} {
|
||||
allow read;
|
||||
allow write: if request.auth.uid == userId;
|
||||
allow create, update: if request.auth.uid == userId && request.resource.data.userId == userId;
|
||||
allow delete: if request.auth.uid == userId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user