Richsploit icon indicating copy to clipboard operation
Richsploit copied to clipboard

Building master branch fails

Open bogend opened this issue 5 years ago • 2 comments

Hi, first of all thanks for the great work.

I've tried to build the project by my own on a windows env, but this fails without editing pom.xml. When I add UTF-8 to the maven-compiler-plugin the project can be build successsfully.

When running the jar a exception is thrown:

Exception in thread "main" java.lang.IllegalAccessError: tried to access class javax.faces.component.StateHolderSaver from class com.redtimmy.Richsploit
        at com.redtimmy.Richsploit.createStateHolderSaver(Richsploit.java:240)
        at com.redtimmy.Richsploit.exploit2(Richsploit.java:174)
        at com.redtimmy.Richsploit.main(Richsploit.java:92)

Some comparison between your jar and my built one shows up, that javax.faces.component.StateHolderSaver.class exists twice. Are you building with some special parameters?

Thanks in advance.

bogend avatar Jul 29 '20 11:07 bogend

Hi, Because the original javax.faces.component.StateHolderSaver class from the JDK is not declared Public, it is not possible to instantiate objects with it. Therefore we have redefined it. For me, building with maven will pick the redefined class, but looking at the exception thrown, it seems for you it picked the original class. I'm not sure why this happens, and if it is possible to force Maven to use one class over another.

redtimmy avatar Jul 29 '20 13:07 redtimmy