BAEL-4946 added in code for java deserialization vulnerabilities article

This commit is contained in:
Liam Garvie 2021-05-13 21:17:37 +01:00
parent 8b115f4c8a
commit ab5b85c81c
1 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package com.baeldung.deserialization.vulnerabilities;
import org.junit.Test;
import org.junit.jupiter.api.DisplayName;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@ -11,6 +12,7 @@ import java.io.ObjectOutputStream;
public class BadThingTest {
@Test
@DisplayName("When a BadThing object is deserialized, then code execution in MyCustomAttackObject is run.")
public void testCodeExecution() throws Exception {
BadThing bt = new BadThing();