You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For security reasons, we execute delete window.webkit.messageHandlers and then immediately WebKit would restore the original, so we could use it securely.
On iOS 18, it seems it does NOT restore immediately anymore, but rather after some arbitrary time-frame.
Chrome does the same thing:
functionsendWebKitMessage(handlerName,message){try{// A web page can override `window.webkit` with any value. Deleting the// object ensures that original and working implementation of// window.webkit is restored.varoldWebkit=window.webkit;deletewindow['webkit'];window.webkit.messageHandlers[handlerName].postMessage(message);window.webkit=oldWebkit;}catch(err){// TODO(crbug.com/40269960): Report this fatal error}}
Description
delete window.webkit.messageHandlers
and then immediately WebKit would restore the original, so we could use it securely.Chrome does the same thing:
and it's also broken.
Steps to reproduce
Actual result
Expected result
Reproduces how often
Easily reproduced
Brave version
Device/iOS version
Affected browser versions
Reproducibility
Miscellaneous information
No response
The text was updated successfully, but these errors were encountered: