[Webkit-unassigned] [Bug 256054] New: Redirection to page in extension with regexSubstitution is blocked
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 27 12:56:29 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=256054
Bug ID: 256054
Summary: Redirection to page in extension with
regexSubstitution is blocked
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit Extensions
Assignee: webkit-unassigned at lists.webkit.org
Reporter: emond.papegaaij at topicus.nl
CC: timothy at apple.com
When using the declarativeNetRequest like this:
const EXT_PAGE = chrome.runtime.getURL('/callback.html');
const RULE = {
id: 1,
condition: {
regexFilter: '^https://www\.topicus-keyhub\.com/browser-extension-callback\.html.+$',
resourceTypes: ['main_frame']
},
action: {
type: 'redirect',
redirect: { regexSubstitution: EXT_PAGE + '#\\0' }
}
};
chrome.declarativeNetRequest.updateDynamicRules({
removeRuleIds: [RULE.id],
addRules: [RULE],
});
The request to the URI matched with the regex is intercepted, but the redirection fails with the following message:
Safari can’t open the page “safari-web-extension://5107FF07-6DB1-4907-BCAB-D84EB6E2655E/callback.html#https://www.topicus-keyhub.com/browser-extension-callback.html?iss=https://test.topicus-keyhub.com&state=4ca2b81ed761555f4b9dad97c9d47f9ef6af239d507143b088dc32e8174a1144&error=interaction_required&error_description=User+interaction+required”. The error is: “Redirection to URL with a scheme that is not HTTP(S)” (:0)
We are using this method of redirection to intercept the original URI to complete an OAuth2 code flow. The intercepted page is a stub landing page and only used as a fixed redirection URI for the OAuth2 flow.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230427/9ad7c798/attachment-0001.htm>
More information about the webkit-unassigned
mailing list