The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

getSelectionBounds() function return wrong indexes when message contains Chinese

bit4woo | Last updated: Apr 17, 2020 02:15PM UTC

I try to get selected content with function "getSelectionBounds()". but I found it return wrong indexes when message contains Chinese, and Chinese is in front of the selected. here is the code of test: source = message.getResponse(); int[] selectedIndex = invocation.getSelectionBounds(); int selectedLength = selectedIndex[1]-selectedIndex[0]; byte[] selectedBytes = new byte[selectedLength]; System.arraycopy(source, selectedIndex[0], selectedBytes, 0, selectedLength); String selectedUrl = new String(selectedBytes); stdout.println("selected content"); stdout.println(selectedUrl); you can test with this URL https://intl.sf-express.com/ in the response, I want to select: https://www.sf-express.com/.galleries/favicon.ico but got: l="shortcut icon" href="https://www.sf-express.co it seems that the indexes move front.

bit4woo | Last updated: Apr 17, 2020 02:26PM UTC

some screen shot of the bug, you can download it for more information https://send.firefox.com/download/e465b1d152fcf8c5/#qMbn4RiqhdT8P6-A2nCV7w

Hannah, PortSwigger Agent | Last updated: Apr 17, 2020 03:16PM UTC

Do you see the same issue when there are not Chinese (or other multibyte characters) characters present?

Micheal | Last updated: Jun 08, 2023 07:03PM UTC