You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/12/29 09:26:05 UTC

[GitHub] [servicecomb-java-chassis] yhs0092 opened a new issue, #3552: Java-Chassis 2.8.2 版本在form长度超限时的报错信息不明显

yhs0092 opened a new issue, #3552:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3552

   ## 复现方法
   
   在microservice.yaml配置`servicecomb.rest.server.maxFormAttributeSize=500`, 写一个接收String类型表单参数的接口, 传递超过500字节的参数.
   在 Java-Chassis 1.3.8 版本, 得到的错误响应是 500 状态码, body为 `{"message":"java.io.IOException: Size exceed allowed maximum capacity"}`. 而在 2.8.2 版本, 得到的错误响应是 500 状态码, body为 `{"message":"Internal Server Error"}`.
   
   ## 根因
   
   两个版本都是Netty的`AbstractHttpData.checkSize`方法检测到 form 表单参数超限, 抛出 `IOException`, 异常传递到 `org.apache.servicecomb.transport.rest.vertx.VertxRestDispatcher#sendExceptionByRoutingContext` 方法转换成 HTTP response 返回.
   不同之处在于, 2.8.2 版本的这个方法不会调用 `e.getMessage()` 获取异常的错误信息, 设置到 body 中.
   
   不确定这里是不是为了安全原因做的修改, 能否优化一下, 让报错更清晰呢?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3552: Java-Chassis 2.8.2 版本在form长度超限时的报错信息不明显

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #3552:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3552#issuecomment-1367201690

   主要是处于安全原因改的,参考: https://github.com/apache/servicecomb-java-chassis/issues/2659


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org