dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

test: add yaml loadAs test

Open yuluo-yx opened this issue 1 year ago • 4 comments

  • For #13799

yuluo-yx avatar Apr 12 '24 16:04 yuluo-yx

The background of this feature is that snakeyaml supports including class names within the content. Therefore, it's intended to test and verify that classes configured on the whitelist can be deserialized, whereas others should be rejected. e.g.,

"1": !!demo.User
  name: Alice
  age: 28
"2": !!demo.User
  name: Bob
  age: 34

Refs: https://github.com/apache/dubbo/blob/3.3/dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/message/codec/YamlCodec.java#L40 https://github.com/apache/dubbo/blob/3.3/dubbo-common/src/main/java/org/apache/dubbo/common/utils/DefaultSerializeClassChecker.java#L33 https://dubbo.apache.org/zh-cn/overview/mannual/java-sdk/advanced-features-and-usage/security/class-check/

got it, I will refactor it

yuluo-yx avatar May 06 '24 07:05 yuluo-yx

For https://github.com/apache/dubbo/issues/13799, we should test it through a complete RPC

AlbumenJ avatar Jun 24 '24 09:06 AlbumenJ