Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ognl 3.4.3 string equals bug #309

Open
hengyunabc opened this issue Nov 15, 2024 · 1 comment · May be fixed by #337
Open

ognl 3.4.3 string equals bug #309

hengyunabc opened this issue Nov 15, 2024 · 1 comment · May be fixed by #337

Comments

@hengyunabc
Copy link
Contributor

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
@lukaszlenart
Copy link
Collaborator

Either using ognlContext.setRoot(advice); or Object object = Ognl.getValue(conditionExpress, advice); solves the problem. Yet I'm not able to figure it out why your example fails.

lukaszlenart added a commit that referenced this issue Dec 27, 2024
@lukaszlenart lukaszlenart linked a pull request Dec 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants