Serialized URI when deserialized does not include path and other transient fields #6553
Unanswered
HankHerr-NOAA
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We've recently updated our code to use the newer, 3.45.0, release of Redisson. To do so, we had to change to a different codec to avoid a reported vulnerability; specifically:
https://nvd.nist.gov/vuln/detail/CVE-2023-42809
In the CVE, it is recommended that we use a codec that requires class registration. Hence, we chose
KryoCodecas the codec to use, sinceKryo5Codecdoes not require registration (again, see the CVE which specifically recommends againstKryo5Codec). Upon implementing it, we realized that we needed to register the classjava.net.URIor else the underlyingKryowould complain about unregistered data being stored. Specifically, in via Redisson, we store aSortedSetofURIinstances that contains the location of outputs from an evaluation.Upon doing so, we discovered that, when the output
URIis deserialized (i.e., obtained from theSortedSetafter being placed inside of it), theURIstringis correct, but none of the transient fields, such aspath, are available.Here is how the codec is initialized:
Here is how we declared the
outputsvariable:If we add a
URItooutputsand then immediately print alloutputs, we see that that URI'stoStringlooks good, but thepath(i.e.,getPathorgetRawPath) is null. It appears that whatever serializer is used when we registerURI, its not restoring the transient fields upon deserializing.For a discussion of our investigation, you can refer to our ticket in here; it should be publicly visible. If anyone has any tips for how to make this work, we'd appreciate it. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions