Firefox Screenshot tool crashes on pages with IPv6 Address
Categories
(Firefox :: Screenshots, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox97 | --- | fixed |
People
(Reporter: dev, Assigned: niklas)
References
Details
Attachments
(2 files)
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.
Updated•6 years ago
|
Comment 1•6 years ago
|
||
The priority flag is not set for this bug.
:ianbicking, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•6 years ago
|
This still happens in Firefox 88.
The following error appears in the browser console:
Unhandled error: Error: Not a URL
assertUrl moz-extension://1ee5ddd0-0b25-4a5a-9d8a-9edcc7dfa94f/build/shot.js:45
assertOrigin moz-extension://1ee5ddd0-0b25-4a5a-9d8a-9edcc7dfa94f/build/shot.js:56
set origin moz-extension://1ee5ddd0-0b25-4a5a-9d8a-9edcc7dfa94f/build/shot.js:334
AbstractShot moz-extension://1ee5ddd0-0b25-4a5a-9d8a-9edcc7dfa94f/build/shot.js:183
<anonymous> moz-extension://1ee5ddd0-0b25-4a5a-9d8a-9edcc7dfa94f/selector/shooter.js:135
catcher moz-extension://1ee5ddd0-0b25-4a5a-9d8a-9edcc7dfa94f/catcher.js:59
shooter moz-extension://1ee5ddd0-0b25-4a5a-9d8a-9edcc7dfa94f/selector/shooter.js:143
<anonymous> moz-extension://1ee5ddd0-0b25-4a5a-9d8a-9edcc7dfa94f/selector/shooter.js:146
undefined catcher.js:21:11
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 5•4 years ago
|
||
Comment 7•4 years ago
|
||
| bugherder | ||
Description
•