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

fix jackson-databind vulnerability #606

Merged
merged 6 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<opensrp.api.version>1.1.3-SNAPSHOT</opensrp.api.version>
<opensrp.interface.version>2.0.1-SNAPSHOT</opensrp.interface.version>
<opensrp.plan.evaluator.version>1.6.7-SNAPSHOT</opensrp.plan.evaluator.version>
<jackson.version>2.12.6</jackson.version>
<jackson.version>2.13.2.1</jackson.version>
<powermock.version>2.0.5</powermock.version>
<lombok.version>1.18.12</lombok.version>
<spring.data.redis>2.2.13.RELEASE</spring.data.redis>
Expand Down Expand Up @@ -108,7 +108,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<version>2.12.6</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public void testFindAssignedLocations() {
assertEquals("304cbcd4-0850-404a-a8b1-486b02f7b84d", assignedLocations.get(0).getJurisdictionId());
assertEquals("7f2ae03f-9569-5535-918c-9d976b3ae5f8", assignedLocations.get(0).getPlanId());
assertEquals("2019-09-10", dateFormat.format(assignedLocations.get(0).getFromDate()));
assertEquals("2022-09-10", dateFormat.format(assignedLocations.get(0).getToDate()));
assertEquals("2023-09-10", dateFormat.format(assignedLocations.get(0).getToDate()));

}

Expand All @@ -376,7 +376,7 @@ public void testFindAssignedLocationsMutipleIds() {
assertEquals("304cbcd4-0850-404a-a8b1-486b02f7b84d", assignedLocations.get(0).getJurisdictionId());
assertEquals("7f2ae03f-9569-5535-918c-9d976b3ae5f8", assignedLocations.get(0).getPlanId());
assertEquals("2019-09-10", dateFormat.format(assignedLocations.get(0).getFromDate()));
assertEquals("2022-09-10", dateFormat.format(assignedLocations.get(0).getToDate()));
assertEquals("2023-09-10", dateFormat.format(assignedLocations.get(0).getToDate()));

assignedLocations = organizationRepository.findAssignedLocations(Arrays.asList(1l, 2l), true);
assertEquals(3, assignedLocations.size());
Expand Down
6 changes: 3 additions & 3 deletions src/test/resources/test-scripts/organization.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ INSERT INTO core.plan (identifier, json, date_deleted, server_version, id) VALUE
INSERT INTO core.plan (identifier, json, date_deleted, server_version, id) VALUES ('7f2ae03f-9569-5535-918c-9d976b3ae5f8', '{}', null, 1567765433007, 294);


INSERT INTO team.organization_location (id, organization_id, location_id, plan_id, from_date, to_date,duration) VALUES (1, 1, 2243, 162, '2019-09-10 17:29:55.059000', '2022-09-10 17:29:55.059000',daterange('2019-09-10','2022-09-10'));
INSERT INTO team.organization_location (id, organization_id, location_id, plan_id, from_date, to_date,duration) VALUES (2, 1, 2243, 11, '2019-09-10 17:29:55.059000', '2022-09-10 17:29:55.059000',daterange('2019-09-10','2022-09-10'));
INSERT INTO team.organization_location (id, organization_id, location_id, plan_id, from_date, to_date,duration) VALUES (3, 2, 2243, 294, '2019-09-10 17:29:55.059000', '2022-09-10 17:29:55.059000',daterange('2019-09-10','2022-09-10'));
INSERT INTO team.organization_location (id, organization_id, location_id, plan_id, from_date, to_date,duration) VALUES (1, 1, 2243, 162, '2019-09-10 17:29:55.059000', '2023-09-10 17:29:55.059000',daterange('2019-09-10','2023-09-10'));
INSERT INTO team.organization_location (id, organization_id, location_id, plan_id, from_date, to_date,duration) VALUES (2, 1, 2243, 11, '2019-09-10 17:29:55.059000', '2023-09-10 17:29:55.059000',daterange('2019-09-10','2023-09-10'));
INSERT INTO team.organization_location (id, organization_id, location_id, plan_id, from_date, to_date,duration) VALUES (3, 2, 2243, 294, '2019-09-10 17:29:55.059000', '2023-09-10 17:29:55.059000',daterange('2019-09-10','2023-09-10'));
hilpitome marked this conversation as resolved.
Show resolved Hide resolved