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

Change in behaviour - 0.3.8 -> 0.3.9 #77

Open
lowecg opened this issue Jul 3, 2024 · 1 comment
Open

Change in behaviour - 0.3.8 -> 0.3.9 #77

lowecg opened this issue Jul 3, 2024 · 1 comment

Comments

@lowecg
Copy link

lowecg commented Jul 3, 2024

There's a change in behaviour between 0.3.8 and 0.3.9 with how errors are reported in the exception message. The source is now redacted from the error message.

That seems like a more secure default, but is there a way to control this in the options to get the same behaviour as before?

0.3.8

(require '[jsonista.core :as j])

(j/read-value "{\"result\": \"value\"" j/keyword-keys-object-mapper)
Execution error (JsonEOFException) at com.fasterxml.jackson.core.base.ParserMinimalBase/_reportInvalidEOF (ParserMinimalBase.java:697).
Unexpected end-of-input: expected close marker for Object (start marker at [Source: (String)"{"result": "value""; line: 1, column: 1])
 at [Source: (String)"{"result": "value""; line: 1, column: 19]

0.3.9

(require '[jsonista.core :as j])

(j/read-value "{\"result\": \"value\"" j/keyword-keys-object-mapper)

Execution error (JsonEOFException) at com.fasterxml.jackson.core.base.ParserMinimalBase/_reportInvalidEOF (ParserMinimalBase.java:585).
Unexpected end-of-input: expected close marker for Object (start marker at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1])
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 19]

A likely cause is that the jackson deps have jumped and I'm not sure if that was intentional or not. I only say this because the 0.3.9 release notes say that you use 2.15.2 even though 2.17.1 is available, but jsonista's definitely using 2.17.1 now.

[com.fasterxml.jackson.core/jackson-core "2.17.1"] is available but we use "2.15.2"
[com.fasterxml.jackson.core/jackson-databind "2.17.1"] is available but we use "2.15.2"
[com.fasterxml.jackson.datatype/jackson-datatype-jsr310 "2.17.1"] is available but we use "2.15.2"

0.3.8

echo '{:deps {metosin/jsonista {:mvn/version "0.3.8"}}}' > deps.edn

clj -Xdeps tree
org.clojure/clojure 1.11.3
  . org.clojure/spec.alpha 0.3.218
  . org.clojure/core.specs.alpha 0.2.62
metosin/jsonista 0.3.8
  . com.fasterxml.jackson.core/jackson-core 2.15.2
  . com.fasterxml.jackson.core/jackson-databind 2.15.2
    . com.fasterxml.jackson.core/jackson-annotations 2.15.2
    . com.fasterxml.jackson.core/jackson-core 2.15.2
  . com.fasterxml.jackson.datatype/jackson-datatype-jsr310 2.15.2
    . com.fasterxml.jackson.core/jackson-annotations 2.15.2
    . com.fasterxml.jackson.core/jackson-core 2.15.2
    . com.fasterxml.jackson.core/jackson-databind 2.15.2

0.3.9

echo '{:deps {metosin/jsonista {:mvn/version "0.3.9"}}}' > deps.edn

clj -Xdeps tree
org.clojure/clojure 1.11.3
  . org.clojure/spec.alpha 0.3.218
  . org.clojure/core.specs.alpha 0.2.62
metosin/jsonista 0.3.9
  . com.fasterxml.jackson.core/jackson-core 2.17.1
  . com.fasterxml.jackson.core/jackson-databind 2.17.1
    . com.fasterxml.jackson.core/jackson-annotations 2.17.1
    . com.fasterxml.jackson.core/jackson-core 2.17.1
  . com.fasterxml.jackson.datatype/jackson-datatype-jsr310 2.17.1
    . com.fasterxml.jackson.core/jackson-annotations 2.17.1
    . com.fasterxml.jackson.core/jackson-core 2.17.1
    . com.fasterxml.jackson.core/jackson-databind 2.17.1
@ikitommi
Copy link
Member

ikitommi commented Jul 4, 2024

Thanks for reporting! We want to use latest Jackson version for security updates. Could you look the Release Notes of Jackson (https://github.com/FasterXML/jackson/wiki/Jackson-Releases) to see if there are options how to manage how this works now.

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

No branches or pull requests

2 participants