Open Bug 1541465 Opened 7 months ago Updated 6 months ago

Firefox Screenshot tool crashes on pages with IPv6 Address

Categories

(Firefox :: Screenshots, defect, P3)

66 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: dev, Unassigned)

Details

Attachments

(1 file)

Attached image Error_notification.png

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

I opened a page using its IPv6 Address (e.g. http://[::1]:8080/) and tried to take a screenshot (using right click > Take a screenshot)

Actual results:

The tool did not take a screenshot but the notification I attached popped up.

An exception is thrown in shot.js in assertUrl, because originFromUrl returns a broken URL. The regex in originFromUrl (const match = (/^https?://[^/:]{1,4000}/i).exec(url);) cannot handle the ':' in IPv6 Addresses. I'm not sure, but why don't you use (window.)location.origin instead of parsing the URL?

Expected results:

The screenshot tool should be able to handle IPv6 Addresses.

The priority flag is not set for this bug.
:ianbicking, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ianb)
Flags: needinfo?(ianb)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.