-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
重构 Class Hook 中用户信息的获取 #73
Conversation
jysperm
commented
May 30, 2016
- 不再从 req.body.user 获取用户信息
- 对于 before 和 after 类的 Hook 检查签名
https://github.com/leancloud/uluru-platform/issues/2242 已添加 onVerified/onLogin 以及实时通讯的 Hook 签名验证(因为是新加的验证,会将校验失败的请求打印出来) |
'_conversationAdd', '_conversationRemove', '_conversationUpdate' | ||
], splited[1])) { | ||
if (!utils.verifyHookSign(AV.masterKey, splited[1], req.body.__sign)) { | ||
console.trace('LeanEngine: verifyHookSign failed'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里建议把 url 也输出,否则只有一个错误提示意义不大。
是否也输出下 remote ip?因为我们服务器发出的请求一半不会有问题,如果是仿冒的请求,有个 ip 也许会有一点帮助。
已在线上测试通过所有 Hook 的验证 |