Skip to content
Open
Show file tree
Hide file tree
Changes from all 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: 4 additions & 0 deletions pulsar-functions/api-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.github.pixee</groupId>
<artifactId>java-security-toolkit</artifactId>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.apache.pulsar.functions.api.utils;

import io.github.pixee.security.ObjectInputFilters;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
Expand Down Expand Up @@ -60,6 +61,7 @@ public Object deserialize(byte[] data) {
Object obj = null;
try (ByteArrayInputStream bis = new ByteArrayInputStream(data);
ObjectInputStream ois = new ObjectInputStream(bis)) {
ObjectInputFilters.enableObjectFilterIfUnprotected(ois);
obj = ois.readObject();
} catch (Exception ex) {
log.info("Exception during deserialization", ex);
Expand Down
12 changes: 12 additions & 0 deletions pulsar-functions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,16 @@

</profiles>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.pixee</groupId>
<artifactId>java-security-toolkit</artifactId>
<version>${versions.java-security-toolkit}</version>
</dependency>
</dependencies>
</dependencyManagement>
<properties>
<versions.java-security-toolkit>1.1.3</versions.java-security-toolkit>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the properties in the parent pom file.

</properties>
</project>
Loading