Skip to content
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

Merged
merged 5 commits into from
Jun 23, 2016
Merged

重构 Class Hook 中用户信息的获取 #73

merged 5 commits into from
Jun 23, 2016

Conversation

jysperm
Copy link
Contributor

@jysperm jysperm commented May 30, 2016

  • 不再从 req.body.user 获取用户信息
  • 对于 before 和 after 类的 Hook 检查签名

@jysperm
Copy link
Contributor Author

jysperm commented Jun 6, 2016

需要等待 leancloud/avoscloud-code-command#150 发布

@jysperm
Copy link
Contributor Author

jysperm commented Jun 12, 2016

https://github.com/leancloud/uluru-platform/issues/2242
https://github.com/leancloud/avoscloud-push/issues/903

已添加 onVerified/onLogin 以及实时通讯的 Hook 签名验证(因为是新加的验证,会将校验失败的请求打印出来)

'_conversationAdd', '_conversationRemove', '_conversationUpdate'
], splited[1])) {
if (!utils.verifyHookSign(AV.masterKey, splited[1], req.body.__sign)) {
console.trace('LeanEngine: verifyHookSign failed');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里建议把 url 也输出,否则只有一个错误提示意义不大。
是否也输出下 remote ip?因为我们服务器发出的请求一半不会有问题,如果是仿冒的请求,有个 ip 也许会有一点帮助。

@jysperm
Copy link
Contributor Author

jysperm commented Jun 23, 2016

已在线上测试通过所有 Hook 的验证

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants