- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
来自 JS 应用的 Firebase 实时数据库安全性。
我允许所有密码授权用户读取权限。然后,对于所有其他类型(仅匿名,根据我的方案),我只想允许读取特定的/bundles/。
这些是规则-
{
"rules": {
".read": "auth != null && auth.provider == 'password'", // working!
"bundles": {
"$bundle": {
".read": "data.child('anonymous').val() == true", // not working
}
},
}
}
和/bundles-
"-L-2BbIkAg6J9WPMaJpJ": {
"anonymous": true,
"more_data": "data_1"
},
"-L-UHBr45eEUHGwsPWqq": {
"anonymous": false,
"more_data": "data_2"
}
我预计,当以匿名身份登录时,只会看到第一个包,但我却从 FB 收到错误消息 - “permission_denied at/bundles”。
最佳答案
.read
失败,因为您正在尝试访问 /bundles
位置。相反,如果您直接查询特定的包,它将通过:
// read denied
ref.child('bundles').once('value')
// read allowed
ref.child(`bundles/-L-2BbIkAg6J9WPMaJpJ`).once('value')
您将无法通过 Firebase 规则过滤数据,如 this section 中所述的 Firebase 文档。我建议您更新模式并为您的匿名包提供一个单独的节点,例如:
{
"rules": {
".read": "auth != null && auth.provider == 'password'",
"anonymousBundles": {
".read": "auth != null"
}
}
}
关于javascript - Firebase 匿名数据安全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47626898/
我正在使用 Quickblox SDK 开发聊天应用程序。我被要求在向服务器发送请求(登录、注册、修改个人资料...)时使用 MD5 散列用户的密码。但我想知道这是否有必要,因为它可能已经在 SDK
如果任何处理器从队列中获取数据,则开始处理,此时处理器会因任何原因停机。那么特定数据会发生什么(数据丢失或安全地保留到其他队列中)? 最佳答案 嗯,NiFi 的目的是让数据尽可能安全。它的内容写入策略
目前这对我来说真的只是一个概念性问题。 在 Lisp 中,程序就是数据,数据就是程序。 REPL 正是这样做的 - 读取然后评估。 那么如何以一种安全的方式从用户那里获取输入呢?显然这是可能的 - 我
我是 MVC 的初学者。我现在对数据安全性感到好奇。不知道是不是我理解错了。 场景如下:我有一个观点要求用户输入一些数据。 (客户端)当数据传回 Controller (服务器端)时,窃听者能否拦截用
下边是我对部分内容的总结,里边偏向了T-SQL语句实现的总结,对于SQL Server Management Studio中对象管理器的操作并没有太多的总结,因为这些都有一些向导,而且,大部分都是在
有人知道 Google 是否收集提供给 Tensorflow 的数据吗?我的意思是它是开源的,但它受他们的许可。 最佳答案 您可以阅读TF的完整代码。那里没有任何东西发送任何数据,因此答案是否,没有数
我是一名优秀的程序员,十分优秀!