Bug 248155 - browser.runtime.getURL() has some edge cases that should be failures or return different results
Summary: browser.runtime.getURL() has some edge cases that should be failures or retur...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Extensions (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-20 12:31 PST by Timothy Hatcher
Modified: 2024-04-23 13:16 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>