Bug 248155

Summary: browser.runtime.getURL() has some edge cases that should be failures or return different results
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: WebKit ExtensionsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: carlosj-webkit-bugzilla, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Description Timothy Hatcher 2022-11-20 12:31:45 PST
Non-string types:
browser.runtime.getURL(42); // ${baseURL}/42
browser.runtime.getURL(/test/); // ${baseURL}/test/

Double-slashes truncate the host:
browser.runtime.getURL('//'); // test-extension://
browser.runtime.getURL('//example'); // test-extension://example
browser.runtime.getURL('///'); // test-extension:///
Comment 1 Radar WebKit Bug Importer 2022-11-27 12:32:15 PST
<rdar://problem/102694661>