Comments (4)
暂未发现此问题,请详细描述问题出现场景、关键错误信息
from wx-api.
步骤:
1、从微信公众号中发送文本消息
2、接口监听调试
XssFilter.doFilter 代码中调试获取是正常的xml字符串数据,逻辑转到WxMpPortalController.post方法@RequestBody String requestBody
接收到的内容总是一串数字“15963364665”此数字会变化
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper(
(HttpServletRequest) request);
chain.doFilter(xssRequest, response);
}
我临时方案是去掉入参@RequestBody String requestBody
,增加参数XssHttpServletRequestWrapper requestWrapper
public String post(@PathVariable String appid,
// @RequestBody String requestBody,
@RequestParam("signature") String signature,
@RequestParam("timestamp") String timestamp,
@RequestParam("nonce") String nonce,
@RequestParam("openid") String openid,
@RequestParam(name = "encrypt_type", required = false) String encType,
@RequestParam(name = "msg_signature", required = false) String msgSignature,
XssHttpServletRequestWrapper requestWrapper){
//临时解决方案,采用requestWrapper.getInputSteam获取内容
String requestBody = HttpContextUtils.ReadAsChars2(requestWrapper);
....
}
from wx-api.
请更新代码到最新版验证此问题是否依然存在
from wx-api.
0.7 版本之后公众号接入地址有变更,从老版本升级的话需要重新接入
from wx-api.
Related Issues (20)
- 同步微信用户和同步消息模板问题 HOT 1
- 模板消息发送记录未能插入到数据库相应的日志表中 HOT 1
- WxMsg 实体中buildOutMsg 缺失appid参数导致保存报错 HOT 1
- 公众号菜单 view 类型后端接收出现链接地址字符串转义问题 HOT 3
- 请问关于全局默认自动回复的设置 HOT 1
- 后台登录问题
- 关于版本更新的咨询 HOT 1
- 新增和修改图文消息报45106错
- 平台同步微信用户,获取不到微信用户的头像、昵称、性别,城市 HOT 1
- 自动回复模块中,跨公众号的素材不能使用
- 查询文章和公众号消息,返回500错误码 HOT 2
- 已更新,仍然报错500 HOT 2
- 你好 我想请问下使用了@async为什么还要使用线程池? HOT 3
- 同步的消息模版数量和模版ID都和公众号后台的对不上
- Bug 优化建议
- docker运行后端api报错,有大佬知道怎么解决嘛 HOT 2
- 启动项目后swagger无法显示 HOT 1
- 模版消息发送日志查询慢,需要增加索引 HOT 1
- 个人订阅号自动回复不生效 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wx-api.