alibaba / arthas

Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas
https://arthas.aliyun.com/
Apache License 2.0
35.7k stars 7.51k forks source link

ognl 3.4.2/3.4.3 版本 bug 导致 string equals 出错 #2954

Closed hengyunabc closed 2 days ago

hengyunabc commented 3 days ago

https://github.com/hengyunabc/ognl34-bug-demo

ognl 3.4.3 result

"aaa".equals(params[0].flowAttribute.getBxApp()), result: false
"aaa" == params[0].flowAttribute.getBxApp(), result: true
params[0].flowAttribute.getBxApp().equals("aaa"), result: true

ognl 3.3.5 result

"aaa".equals(params[0].flowAttribute.getBxApp()), result: true
"aaa" == params[0].flowAttribute.getBxApp(), result: true
params[0].flowAttribute.getBxApp().equals("aaa"), result: true

https://github.com/orphan-oss/ognl/issues/309