javascript – 尽管存在不安全因素,但流媒体更新访问被拒绝
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了javascript – 尽管存在不安全因素,但流媒体更新访问被拒绝,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3165字,纯文字阅读大概需要5分钟。
内容图文
![javascript – 尽管存在不安全因素,但流媒体更新访问被拒绝](/upload/InfoBanner/zyjiaocheng/818/c8616c54f26a4543bec4899b3811e32e.jpg)
我安装了不安全的软件包,但是我在客户端控制台中获得了以下内容:
Meteor.user()
Object {_id: "4Dyaa5wRmxmq7j7XF", profile: Object, services: Object}_id: "4Dyaa5wRmxmq7j7XF"profile: Objectname: "Mel Oug"__proto__: Objectservices: Objectfacebook: Object__proto__: Object__proto__: Object__defineGetter__: function __defineGetter__() { [native code] }__defineSetter__: function __defineSetter__() { [native code] }__lookupGetter__: function __lookupGetter__() { [native code] }__lookupSetter__: function __lookupSetter__() { [native code] }constructor: function Object() { [native code] }hasOwnProperty: function hasOwnProperty() { [native code] }isPrototypeOf: function isPrototypeOf() { [native code] }propertyIsEnumerable: function propertyIsEnumerable() { [native code] }toLocaleString: function toLocaleString() { [native code] }toString: function toString() { [native code] }valueOf: function valueOf() { [native code] }get __proto__: function __proto__() { [native code] }set __proto__: function __proto__() { [native code] }
va = Meteor.user()._id
"4Dyaa5wRmxmq7j7XF"
Meteor.users.update(va, {$set: {email: 'the@aarts.com'}})
1
debug.js:41 update failed: Access denied
我不确定要包含哪些其他相关代码.我没有设置拒绝(或允许)规则.这是一个非常简单的用户设置,我只是看不到可能阻止它的东西.
这是我得到的包裹:
ccounts-facebook 1.0.4 Login service for Facebook accounts
accounts-google 1.0.4 Login service for Google accounts
accounts-twitter 1.0.4 Login service for Twitter accounts
aldeed:autoform 5.1.2 Easily create forms with automatic insert a...
aldeed:collection2 2.3.3 Automatic validation of insert and update o...
autopublish 1.0.3 Publish the entire database to all clients
blaze 2.1.2 Meteor Reactive Templating library
cmather:handlebars-server 2.0.0 Allows handlebars templates to be defined o...
email 1.0.6 Send email messages
insecure 1.0.3 Allow all database writes by default
iron:router 1.0.7 Routing specifically designed for Meteor
meteor-platform 1.2.2 Include a standard set of Meteor packages i...
mquandalle:jade 0.4.1* Jade template language
msavin:mongol 1.0.30* The insanely handy development package for...
service-configuration 1.0.4 Manage the configuration for third-party se...
twbs:bootstrap 3.3.4 The most popular front-end framework for de...
useraccounts:bootstrap 1.8.1* Accounts Templates styled for Twitter Boots
解决方法:
Meteor.users集合是一个特殊情况,具有已建立的结构和权限.您只能从客户端更新user.profile字段,即使安装了不安全的软件包也是如此.
这将起作用,例如:
Meteor.users.update(va, {$set: {'profile.email': 'the@aarts.com'}})
通常,电子邮件将从服务器代码中保存,并推送到用户记录中提供的“电子邮件”数组中.
“电子邮件”:[
{
“地址”:“the@aarts.com”,
“已验证”:错误
}
]
来自流星文档:
Users are by default allowed to specify their own profile field with Accounts.createUser and modify it with Meteor.users.update. To allow users to edit additional fields, use Meteor.users.allow.
内容总结
以上是互联网集市为您收集整理的javascript – 尽管存在不安全因素,但流媒体更新访问被拒绝全部内容,希望文章能够帮你解决javascript – 尽管存在不安全因素,但流媒体更新访问被拒绝所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。