Deprecate SerializationUtils#deserialize

Since SerializationUtils#deserialize is based on Java's serialization
mechanism, it can be the source of Remote Code Execution (RCE)
vulnerabilities.

Closes gh-28075
This commit is contained in:
Loïc Ledoyen
2022-02-18 18:31:17 +01:00
committed by Sam Brannen
parent e681e713d4
commit 7f7fb58dd0
3 changed files with 23 additions and 1 deletions

View File

@@ -67,4 +67,9 @@ class SerializationUtilsTests {
assertThat(SerializationUtils.deserialize(null)).isNull();
}
@Test
void cloneException() {
IllegalArgumentException ex = new IllegalArgumentException("foo");
assertThat(SerializationUtils.clone(ex)).hasMessage("foo").isNotSameAs(ex);
}
}