wechat
wechat copied to clipboard
WeChat SDK for Go (微信SDK:简单、易用)
**描述** ``` // 使用memcache保存access_token,也可选择redis或自定义cache wc := wechat.NewWechat() memory := cache.NewMemory() cfg := &offConfig.Config{ AppID: "xxx", AppSecret: "xxx", Token: "xxx", // EncodingAESKey: "xxxx", Cache: memory, } officialAccount := wc.GetOfficialAccount(cfg) // 传入request和responseWriter...
**使用的版本** - SDK 版本:v2.1.7 报错文件 `util/http.go#293` ```go // httpWithTLS CA 证书 func httpWithTLS(rootCa, key string) (*http.Client, error) { var client *http.Client certData, err := os.ReadFile(rootCa) if err != nil {...
[feat(media): add UploadImgFromReader api](https://github.com/silenceper/wechat/commit/a9fc0958f67e5dadadacf1aca5c3a330e0404367)
https://developer.work.weixin.qq.com/document/path/90506
## 问题及现象 都2024年了,这些算法确实不太安全了,别用这种上古算法签名了,有点子危险,这么签出来的东西很可能被人伪造消息或者证书啥的,挺危险的,建议考虑全局替换个sha256, 512之类的 landv/wechat/pay/notify_result.go landv\wechat\pay\pay.go landv\wechat\pay\refund.go sign := util.MD5Sum(signStrings) ------------------------------------------------------ /github.com/landv/wechat/util/signature.go 这里面使用了sha1算法,和md5差不多,也很危险