问题
firebase --version 8.4.1
with Firebase init I created some files.
Now firebase deploy is complaining about firebase.storage. The error message is:
Ruleset uses old version (version [1]). Please update to the latest version (version [2]).
What is wrong with it?
firebase deploy
deploying database, storage, firestore, functions, hosting
database: checking rules syntax...
database: rules syntax for database $db is valid
firebase.storage: checking storage.rules for compilation errors...
undefined:undefined - Ruleset uses old version (version
[1]). Please update to the latest version (version [2]).
firebase.storage: rules file storage.rules compiled successfully
cat storage.rules
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth!=null;
}
}
}
回答1:
You should be using security rules version 2 going forward. Note the first line:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth!=null;
}
}
}
来源:https://stackoverflow.com/questions/62137672/firebase-security-rules-ruleset-uses-old-version-what-is-current-version