Skip to content

Commit 10fe7f1

Browse files
committed
Merge branch '2.7' into 2.8
2 parents 569e36e + f031f27 commit 10fe7f1

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

release-notes/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Project: jackson-databind
1515
(reported by henryptung@github)
1616
#1807: Jackson-databind caches plain map deserializer and use it even map has `@JsonDeserializer`
1717
(reported by lexas2509@github)
18+
#1855: More blacklisting of serialization gadgets
1819

1920
2.8.10 (24-Aug-2017)
2021

src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public class BeanDeserializerFactory
7070
s.add("com.mchange.v2.c3p0.JndiRefForwardingDataSource");
7171
s.add("com.mchange.v2.c3p0.WrapperConnectionPoolDataSource");
7272

73+
// [databind#1855]: more 3rd party
74+
s.add("org.apache.tomcat.dbcp.dbcp2.BasicDataSource");
75+
s.add("com.sun.org.apache.bcel.internal.util.ClassLoader");
7376
DEFAULT_NO_DESER_CLASS_NAMES = Collections.unmodifiableSet(s);
7477
}
7578

src/test/java/com/fasterxml/jackson/databind/interop/IllegalTypesCheckTest.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,15 @@ public void testXalanTypes1599() throws Exception
5858

5959
public void testJDKTypes1737() throws Exception
6060
{
61-
_testTypes1737(java.util.logging.FileHandler.class);
62-
_testTypes1737(java.rmi.server.UnicastRemoteObject.class);
61+
_testIllegalType(java.util.logging.FileHandler.class);
62+
_testIllegalType(java.rmi.server.UnicastRemoteObject.class);
63+
}
64+
65+
// // // Tests for [databind#1855]
66+
public void testJDKTypes1855() throws Exception
67+
{
68+
// apparently included by JDK?
69+
_testIllegalType("com.sun.org.apache.bcel.internal.util.ClassLoader");
6370
}
6471

6572
// 17-Aug-2017, tatu: Ideally would test handling of 3rd party types, too,
@@ -69,8 +76,8 @@ public void testJDKTypes1737() throws Exception
6976
/*
7077
public void testSpringTypes1737() throws Exception
7178
{
72-
_testTypes1737("org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor");
73-
_testTypes1737("org.springframework.beans.factory.config.PropertyPathFactoryBean");
79+
_testIllegalType("org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor");
80+
_testIllegalType("org.springframework.beans.factory.config.PropertyPathFactoryBean");
7481
}
7582
7683
public void testC3P0Types1737() throws Exception
@@ -80,11 +87,11 @@ public void testC3P0Types1737() throws Exception
8087
}
8188
*/
8289

83-
private void _testTypes1737(Class<?> nasty) throws Exception {
84-
_testTypes1737(nasty.getName());
90+
private void _testIllegalType(Class<?> nasty) throws Exception {
91+
_testIllegalType(nasty.getName());
8592
}
8693

87-
private void _testTypes1737(String clsName) throws Exception
94+
private void _testIllegalType(String clsName) throws Exception
8895
{
8996
// While usually exploited via default typing let's not require
9097
// it here; mechanism still the same

0 commit comments

Comments
 (0)