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

第二章 路由设置 签名部分有个疑问 #15

Open
ZYiDa opened this issue Jan 18, 2024 · 0 comments
Open

第二章 路由设置 签名部分有个疑问 #15

ZYiDa opened this issue Jan 18, 2024 · 0 comments

Comments

@ZYiDa
Copy link

ZYiDa commented Jan 18, 2024

按照我的理解:

  • 要先调用一下/sn接口,获取sn和ts信息
  • 然后在使用v2接口时,将这两个字段带过去进行对比验证。

我复制了你的代码来运行,一直卡在sn验证那里。

然后仔细看了看/sn接口和签名发现了问题:

  • 签名由MD5(MD5(参数字符串)+MD5(config配置信息))组成,但调用/sn接口生成sn时,在SignDemo方法中,签名的参数字符串是空或者默认值,这样就会导致,请求中参数中的sn和比对时的sn不一致
  • 将签名方法由MD5(MD5(参数字符串)+MD5(config配置信息))改成MD5(config配置信息)的形式,就能验证通过了

小白第一次接触后台开发,不知道我这样理解和修改是否正确?谢谢了

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

No branches or pull requests

1 participant