-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Enum
values can not be read from single-element array even with DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS
#3655
Comments
Added version info (2.9.9.3). |
2.9.x is ancient version, will need to test against later (2.14.0). For now assuming problem still exists. Root cause likely due to code not checking there is legit |
@cowtowncoder i think the same happens without UNWRAP_SINGLE_VALUE_ARRAYS, what should be the behavior then? i can work on this since it came up with micronaut. |
@yawkat sounds good, I appreciate your help here -- it is/was on my short TODO-NEXT list :) |
- it seems that the DoS fix in `BeanDeserializer` incorrectly advanced the parser. I've fixed this, but this is potentially security-sensitive, so please take a careful look if this is right :) - I also changed `FactoryBasedEnumDeserializer` to handle unwrapping of strings properly. I haven't touched the error handling when there is another token, that is handled by the branch with the comment `Could argue we should throw an exception but...`. imo that should throw an exception, can we change that in a minor release? Fixes FasterXML#3655
Enum
values can not be read from single-element array even with DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS
@cowtowncoder i think you can close this issue |
Thank you @yawkat! |
Using Jackson
2.9.9.3
.This issue was carried over from micronaut-core: micronaut-projects/micronaut-core#8215
Example test-case:
Result:
The text was updated successfully, but these errors were encountered: