Burp Suite User Forum

Create new post

Montoya Persistence setBoolean IndexOutOfBounds

Tyler | Last updated: Sep 12, 2023 07:47AM UTC

Hi, I'm getting the following error when attempting to save a boolean value to Persistence: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at burp.Zbg.ZjV(Unknown Source) at burp.Zknd.Zu(Unknown Source) at burp.Zknd.next(Unknown Source) at burp.Zbr.Zn(Unknown Source) at burp.Zbr.Zn(Unknown Source) at burp.Zbk.ZQ(Unknown Source) at burp.Zbk.Zs(Unknown Source) at burp.Zn2.Zq(Unknown Source) at burp.Z_i.setBoolean(Unknown Source) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at burp.Zkzz.invoke(Unknown Source) at jdk.proxy2/jdk.proxy2.$Proxy102.setBoolean(Unknown Source) ... I'm a bit thrown off troubleshooting this because I wouldn't have expected an indexoutofbounds while setting a primitive Boolean value. Is there anything which may be causing this? This is on Burp Professional v2023.9.4 Build 23045. Thanks, Tyler

Hannah, PortSwigger Agent | Last updated: Sep 12, 2023 12:25PM UTC

Hi Tyler

Could you drop us an email at support@portswigger.net with your diagnostic information (Help > Diagnostics) and your code?

We've tried to replicate this issue with a minimal example, but have not been successful.

import burp.api.montoya.BurpExtension;
import burp.api.montoya.MontoyaApi;

public class SetBooleanTest implements BurpExtension
{

    @Override
    public void initialize(MontoyaApi api)
    {
        api.extension().setName("Test setBoolean()");
        
        try
        {
            api.persistence().extensionData().setBoolean("hello", true);
        }
        catch (Exception e)
        {
            api.logging().logToError("Failed to set Boolean");
        }

        Boolean hello = api.persistence().extensionData().getBoolean("hello");

        api.logging().logToOutput("Boolean " + hello);
    }
}

Tyler | Last updated: Sep 12, 2023 01:11PM UTC

Hi Hannah, Its difficult to provide the code as its for an internal project at the moment. I can provide the snippets of the stack trace if that helps. I've been given the entire burp file from the consultant who reported this issue. Will the adequate diagnostic data still be there? Thank you, Tyler

Hannah, PortSwigger Agent | Last updated: Sep 13, 2023 10:07AM UTC

Hi Tyler Unfortunately, any exception reporting is from your individual installation (if you have performance feedback enabled), so as you would be on different installations, we won't be able to retrieve the correct debug ID. Are you able to reproduce this error message in a fresh project file? If so, is it possible to give us a minimal example of the code to reproduce the issue? If you're unable to reproduce the issue in a fresh project file, it may be that there is an issue with the original project file.

Tyler | Last updated: Sep 14, 2023 12:02PM UTC

I'm going to try reproduce in a separate project and report back if I'm successful. I'll email the details if I'm successful. Thank you

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.