MantisBT - NetSurf
View Issue Details
0002140NetSurfLayoutpublic2014-06-09 12:032015-03-10 11:05
ReporterDaniel Silverstone 
Assigned ToChris Young 
PrioritynormalSeveritycrashReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformRISC OSOS?OS Version?
Product Version3.1 
Target Version3.2Fixed in Version3.2 
Fixed in CI build #1962
Reported in CI build #1959
URL of problem page
Summary0002140: Poor/invalid URLs can cause the layout engine to stop after IDNA code merge
DescriptionAs summary
Steps To ReproduceUnknown as yet, Bob Latham's intranet triggers this a lot. Perhaps a test case can be constructed.
Additional InformationSome people have shown failures of this ilk with unprocessed SSI in links. We may be able to use that to track down the issue.
TagsNo tags attached.
Attached Fileshtml Ashworth.html (4,400) 2014-06-09 14:37
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=155&type=bug
html Barker.html (1,313) 2014-06-09 14:37
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=156&type=bug

Notes
(0000372)
Vincent Sanders   
2014-06-09 13:31   
This appears to be because the dom to box conversion fails when broken urls are processed instead of our previous behaviour of swallowing the garbage wholesale
(0000373)
Chris Young   
2014-06-09 14:55   
nsurl_create now fails with NSERROR_BAD_URL if something invalid/garbage is fed in. Unfortunately this is causing the box creation to abort, rather than NULLing the link ref and continuing with the bad URL removed.
(0000374)
Chris Young   
2014-06-09 15:32   
On further investigation, box_extract_link isn't handling NSERROR_BAD_URL, and nsurl_join is translating the NSERROR_BAD_URL to NSERROR_NOMEM, so it wouldn't see it anyway.
(0000375)
Vincent Sanders   
2014-06-09 21:19   
I have made nsurl_join cope with the host part of a url not being valid IDNA by falling back to the old method of simply using the broken hostname as is (same behaviour on chrome and firefox)

Can people check and see if this fixes the issue for them
(0000376)
Vincent Sanders   
2014-06-10 18:21   
Made nsurl_join cope with IDNA being unable to parse an (invalid) hostname. This prevents errors being reported to the box tree generation as box_extract_link cannot cope at all.
(0000707)
Vincent Sanders   
2015-03-10 11:05   
Confirmed fixed in 3.2 release

Issue History
2014-06-09 12:03Daniel SilverstoneNew Issue
2014-06-09 12:03Daniel SilverstoneStatusnew => assigned
2014-06-09 12:03Daniel SilverstoneAssigned To => Chris Young
2014-06-09 13:31Vincent SandersNote Added: 0000372
2014-06-09 13:31Vincent SandersStatusassigned => confirmed
2014-06-09 14:37Vincent SandersFile Added: Ashworth.html
2014-06-09 14:37Vincent SandersFile Added: Barker.html
2014-06-09 14:55Chris YoungNote Added: 0000373
2014-06-09 15:32Chris YoungNote Added: 0000374
2014-06-09 21:19Vincent SandersFixed in CI build # => 1962
2014-06-09 21:19Vincent SandersNote Added: 0000375
2014-06-10 18:21Vincent SandersNote Added: 0000376
2014-06-10 18:21Vincent SandersStatusconfirmed => resolved
2014-06-10 18:21Vincent SandersResolutionopen => fixed
2014-06-10 18:21Vincent SandersFixed in Version => 3.2
2015-03-10 11:05Vincent SandersNote Added: 0000707
2015-03-10 11:05Vincent SandersStatusresolved => closed