关于小程序login的code问题

小程序 文章 2022-04-11 15:20 1663 0 全屏看文

AI助手支持GPT4.0

关于小程序login的code问题About the code problem of applet login

关于小程序login的code问题
框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug wx.login() 微信安卓客户端 未知 1.0.0

https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/login.html

根据文档可知 小程序端需调用 wx.login 后获取code 然后code可换取用户openid code仅可使用一次

但近期发现攻击者通过触发我方后端检测code的接口,并传入code后生成用户信息

疑问:

1.他的code是在哪获取到的 为什么他会有大量的code(我发现他请求使用的code每天可创建五百条左右用户)?

2.除了根据我方通过ip或其他技术手段避免注册外,微信是否有其他注册方式?


Framework type problem type API / component name terminal type wechat version basic library version applet bug Wx Login() wechat Android client unknown 1.0.0 https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/login.html According to the document, the applet needs to call Wx After login, get the code, and then the code can be exchanged for the user. Openid code can only be used once. But recently, it was found that the attacker generated user information by triggering our backend to detect the interface of code and passing in the code. Question: 1 Where did he get his code? Why did he have a large number of codes (I found that the code he requested can create about 500 users every day)? 2. Does wechat have other registration methods besides avoiding registration through IP or other technical means?

回答:

微喵网络:

能通过接口获取openid的code都是合法的code,没办法检测出是否是攻击

Ming:那就是微信官方有bug吗   目前确实发现单ip高频访问我方服务端登录接口   并提供了有效的code
拾忆:

正常code是通过用户访问小程序端才生成的,而且code仅5分钟内有效,被伪造的概率很低。

也不排除人家是通过群控设备去访问的,如果是的话这种无法区分的,如果你知道对方的IP就直接禁止对应IP访问。

也可以使用云函数直接给服务端返回用户的openid,看看还会不会有类似的问题。

八九:

有内鬼!

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
picker组件的省市区三级联动缺少区?
小程序访问页面不存在?
wx.showModal中editable字段设置为true,ios真机没有input框
页面跳转时,将一条比较复杂的地址作为参数,如何传递?
通过API提交特约商户申请单,提交成功,门店门头照片、店内环境照片 不显示问题
随便看看
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9047
如何快速搭建抽奖助手小程序(无需代码知识) 6176
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7471
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 6792
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 6126
如何解决渲染层网络错误Failed to load media? 17393
小程序找号找回 释放昵称? 3252
我的小程序广告主收入5301,实际进账4406,是怎么回事呀? 3108
删除部分微信用户个人数据的通知,怎么删除? 6380