Skip to content

Commit 0f18861

Browse files
committed
Bump Jackson dependency version to 2.11.0
1 parent df99c0c commit 0f18861

File tree

7 files changed

+32
-23
lines changed

7 files changed

+32
-23
lines changed

NEWS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
== Version 1.6.3 (unreleased) ==
2+
3+
- Bumped Jackson dependency to version 2.11.0 in response to CVEs:
4+
- CVE-2020-9546
5+
- CVE-2020-10672
6+
- CVE-2020-10969
7+
- CVE-2020-11620
8+
9+
110
== Version 1.6.2 ==
211

312
- Fixed dependencies missing from release POM metadata

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ allprojects {
5151
Map<String, String> dependencyVersions = [
5252
'ch.qos.logback:logback-classic:1.2.3',
5353
'com.augustcellars.cose:cose-java:1.0.0',
54-
'com.fasterxml.jackson.core:jackson-databind:2.9.10.3',
55-
'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.9.10',
56-
'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.10',
54+
'com.fasterxml.jackson.core:jackson-databind:2.11.0',
55+
'com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.11.0',
56+
'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.0',
5757
'com.google.guava:guava:19.0',
5858
'com.upokecenter:cbor:4.0.1',
5959
'javax.activation:activation:1.1.1',

webauthn-server-core/src/test/scala/com/yubico/scalacheck/gen/JacksonGenerators.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ object JacksonGenerators {
5050
} yield {
5151
val o = jsonFactory.objectNode()
5252
for { (name, value) <- names.zip(values) } {
53-
o.set(name, value)
53+
o.set[ObjectNode](name, value)
5454
}
5555
o
5656
}

webauthn-server-core/src/test/scala/com/yubico/webauthn/RegistrationTestData.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ case class RegistrationTestData(
316316
)
317317

318318
def editClientData(name: String, value: JsonNode): RegistrationTestData = editClientData { clientData: ObjectNode =>
319-
clientData.set(name, value)
319+
clientData.set[ObjectNode](name, value)
320320
}
321321
def editClientData(name: String, value: String): RegistrationTestData = editClientData(name, RegistrationTestData.jsonFactory.textNode(value))
322322
def responseChallenge: ByteArray = clientData.getChallenge

webauthn-server-core/src/test/scala/com/yubico/webauthn/RelyingPartyRegistrationSpec.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ class RelyingPartyRegistrationSpec extends FunSpec with Matchers with ScalaCheck
414414

415415
it("Verification succeeds if client data specifies token binding is unsupported, and RP does not use it.") {
416416
val steps = finishRegistration(testData = RegistrationTestData.FidoU2f.BasicAttestation
417-
.editClientData(_.without("tokenBinding"))
417+
.editClientData(_.without[ObjectNode]("tokenBinding"))
418418
)
419419
val step: FinishRegistrationSteps#Step6 = steps.begin.next.next.next.next.next
420420

@@ -435,7 +435,7 @@ class RelyingPartyRegistrationSpec extends FunSpec with Matchers with ScalaCheck
435435
it("Verification fails if client data does not specify token binding status and RP specifies token binding ID.") {
436436
val steps = finishRegistration(
437437
callerTokenBindingId = Some(ByteArray.fromBase64Url("YELLOWSUBMARINE")),
438-
testData = RegistrationTestData.FidoU2f.BasicAttestation.editClientData(_.without("tokenBinding"))
438+
testData = RegistrationTestData.FidoU2f.BasicAttestation.editClientData(_.without[ObjectNode]("tokenBinding"))
439439
)
440440
val step: FinishRegistrationSteps#Step6 = steps.begin.next.next.next.next.next
441441

@@ -447,7 +447,7 @@ class RelyingPartyRegistrationSpec extends FunSpec with Matchers with ScalaCheck
447447
it("Verification succeeds if client data does not specify token binding status and RP does not specify token binding ID.") {
448448
val steps = finishRegistration(
449449
callerTokenBindingId = None,
450-
testData = RegistrationTestData.FidoU2f.BasicAttestation.editClientData(_.without("tokenBinding"))
450+
testData = RegistrationTestData.FidoU2f.BasicAttestation.editClientData(_.without[ObjectNode]("tokenBinding"))
451451
)
452452
val step: FinishRegistrationSteps#Step6 = steps.begin.next.next.next.next.next
453453

@@ -493,7 +493,7 @@ class RelyingPartyRegistrationSpec extends FunSpec with Matchers with ScalaCheck
493493
it("Verification fails if RP specifies token binding ID but client does not support it.") {
494494
val steps = finishRegistration(
495495
callerTokenBindingId = Some(ByteArray.fromBase64Url("YELLOWSUBMARINE")),
496-
testData = RegistrationTestData.FidoU2f.BasicAttestation.editClientData(_.without("tokenBinding"))
496+
testData = RegistrationTestData.FidoU2f.BasicAttestation.editClientData(_.without[ObjectNode]("tokenBinding"))
497497
)
498498
val step: FinishRegistrationSteps#Step6 = steps.begin.next.next.next.next.next
499499

@@ -796,7 +796,7 @@ class RelyingPartyRegistrationSpec extends FunSpec with Matchers with ScalaCheck
796796
it("a fido-u2f attestation is still rejected if invalid.") {
797797
val testData = RegistrationTestData.FidoU2f.BasicAttestation.updateAttestationObject("attStmt", { attStmtNode: JsonNode =>
798798
attStmtNode.asInstanceOf[ObjectNode]
799-
.set("sig", jsonFactory.binaryNode(Array(0, 0, 0, 0)))
799+
.set[ObjectNode]("sig", jsonFactory.binaryNode(Array(0, 0, 0, 0)))
800800
})
801801
val steps = finishRegistration(
802802
testData = testData,
@@ -1457,33 +1457,33 @@ class RelyingPartyRegistrationSpec extends FunSpec with Matchers with ScalaCheck
14571457
describe("1. Verify that attStmt is valid CBOR conforming to the syntax defined above and perform CBOR decoding on it to extract the contained fields.") {
14581458
it("Fails if attStmt.ver is a number value.") {
14591459
val testData = defaultTestData
1460-
.updateAttestationObject("attStmt", attStmt => attStmt.asInstanceOf[ObjectNode].set("ver", jsonFactory.numberNode(123)))
1460+
.updateAttestationObject("attStmt", attStmt => attStmt.asInstanceOf[ObjectNode].set[ObjectNode]("ver", jsonFactory.numberNode(123)))
14611461
checkFails(testData)
14621462
}
14631463

14641464
it("Fails if attStmt.ver is missing.") {
14651465
val testData = defaultTestData
1466-
.updateAttestationObject("attStmt", attStmt => attStmt.asInstanceOf[ObjectNode].without("ver"))
1466+
.updateAttestationObject("attStmt", attStmt => attStmt.asInstanceOf[ObjectNode].without[ObjectNode]("ver"))
14671467
checkFails(testData)
14681468
}
14691469

14701470
it("Fails if attStmt.response is a text value.") {
14711471
val testData = defaultTestData
1472-
.updateAttestationObject("attStmt", attStmt => attStmt.asInstanceOf[ObjectNode].set("response", jsonFactory.textNode(new ByteArray(attStmt.get("response").binaryValue()).getBase64Url)))
1472+
.updateAttestationObject("attStmt", attStmt => attStmt.asInstanceOf[ObjectNode].set[ObjectNode]("response", jsonFactory.textNode(new ByteArray(attStmt.get("response").binaryValue()).getBase64Url)))
14731473
checkFails(testData)
14741474
}
14751475

14761476
it("Fails if attStmt.response is missing.") {
14771477
val testData = defaultTestData
1478-
.updateAttestationObject("attStmt", attStmt => attStmt.asInstanceOf[ObjectNode].without("response"))
1478+
.updateAttestationObject("attStmt", attStmt => attStmt.asInstanceOf[ObjectNode].without[ObjectNode]("response"))
14791479
checkFails(testData)
14801480
}
14811481
}
14821482

14831483
describe("2. Verify that response is a valid SafetyNet response of version ver.") {
14841484
it("Fails if there's a difference in the signature.") {
14851485
val testData = defaultTestData
1486-
.updateAttestationObject("attStmt", attStmt => attStmt.asInstanceOf[ObjectNode].set("response", jsonFactory.binaryNode(editByte(new ByteArray(attStmt.get("response").binaryValue()), 2000, b => ((b + 1) % 26 + 0x41).toByte).getBytes)))
1486+
.updateAttestationObject("attStmt", attStmt => attStmt.asInstanceOf[ObjectNode].set[ObjectNode]("response", jsonFactory.binaryNode(editByte(new ByteArray(attStmt.get("response").binaryValue()), 2000, b => ((b + 1) % 26 + 0x41).toByte).getBytes)))
14871487

14881488
val result: Try[Boolean] = Try(verifier.verifyAttestationSignature(
14891489
new AttestationObject(testData.attestationObject),

webauthn-server-core/src/test/scala/com/yubico/webauthn/TestAuthenticator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ object TestAuthenticator {
160160
clientDataJson: String,
161161
): ByteArray = {
162162
val f = JsonNodeFactory.instance
163-
val attObj = f.objectNode().setAll(Map(
163+
val attObj = f.objectNode().setAll[ObjectNode](Map(
164164
"authData" -> f.binaryNode(authDataBytes.getBytes),
165165
"fmt" -> f.textNode(format),
166166
"attStmt" -> makeAttestationStatement(authDataBytes, clientDataJson),

webauthn-server-core/src/test/scala/com/yubico/webauthn/data/Generators.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ object Generators {
103103
alg <- arbitrary[COSEAlgorithmIdentifier]
104104
sig <- arbitrary[ByteArray]
105105
x5c <- arbitrary[List[ByteArray]]
106-
attStmt = jsonFactory.objectNode().setAll(Map(
106+
attStmt = jsonFactory.objectNode().setAll[ObjectNode](Map(
107107
"alg" -> jsonFactory.numberNode(alg.getId),
108108
"sig" -> jsonFactory.binaryNode(sig.getBytes),
109109
"x5c" -> jsonFactory.arrayNode().addAll(x5c.map(cert => jsonFactory.binaryNode(cert.getBytes)).asJava)
110110
).asJava)
111-
attObj = jsonFactory.objectNode().setAll(Map(
111+
attObj = jsonFactory.objectNode().setAll[ObjectNode](Map(
112112
"authData" -> jsonFactory.binaryNode(authData.getBytes),
113113
"fmt" -> jsonFactory.textNode("packed"),
114114
"attStmt" -> attStmt
@@ -120,11 +120,11 @@ object Generators {
120120
alg <- arbitrary[COSEAlgorithmIdentifier]
121121
sig <- arbitrary[ByteArray]
122122
x5c <- arbitrary[List[ByteArray]]
123-
attStmt = jsonFactory.objectNode().setAll(Map(
123+
attStmt = jsonFactory.objectNode().setAll[ObjectNode](Map(
124124
"sig" -> jsonFactory.binaryNode(sig.getBytes),
125125
"x5c" -> jsonFactory.arrayNode().addAll(x5c.map(cert => jsonFactory.binaryNode(cert.getBytes)).asJava)
126126
).asJava)
127-
attObj = jsonFactory.objectNode().setAll(Map(
127+
attObj = jsonFactory.objectNode().setAll[ObjectNode](Map(
128128
"authData" -> jsonFactory.binaryNode(authData.getBytes),
129129
"fmt" -> jsonFactory.textNode("fido-u2f"),
130130
"attStmt" -> attStmt
@@ -223,15 +223,15 @@ object Generators {
223223
.set("type", jsonFactory.textNode(tpe)).asInstanceOf[ObjectNode]
224224

225225
tokenBinding.asScala foreach { tb =>
226-
json.set("tokenBinding", JacksonCodecs.json().readTree(JacksonCodecs.json().writeValueAsString(tb)))
226+
json.set[ObjectNode]("tokenBinding", JacksonCodecs.json().readTree(JacksonCodecs.json().writeValueAsString(tb)))
227227
}
228228

229229
authenticatorExtensions.asScala foreach { ae =>
230-
json.set("authenticatorExtensions", JacksonCodecs.json().readTree(JacksonCodecs.json().writeValueAsString(ae)))
230+
json.set[ObjectNode]("authenticatorExtensions", JacksonCodecs.json().readTree(JacksonCodecs.json().writeValueAsString(ae)))
231231
}
232232

233233
clientExtensions.asScala foreach { ce =>
234-
json.set("clientExtensions", JacksonCodecs.json().readTree(JacksonCodecs.json().writeValueAsString(ce)))
234+
json.set[ObjectNode]("clientExtensions", JacksonCodecs.json().readTree(JacksonCodecs.json().writeValueAsString(ce)))
235235
}
236236

237237
json

0 commit comments

Comments
 (0)