| Index: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
|
| diff --git a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
|
| index 2c9dc72656fd4c8690494ff6eb8c6c6044fe6b25..b0c577530d4ecb132e57ba0b3923f8a274d1e921 100644
|
| --- a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
|
| +++ b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
|
| @@ -1805,9 +1805,15 @@ WKWebViewErrorSource WKWebViewErrorSourceFromError(NSError* error) {
|
| // TODO(crbug.com/546347): Extract necessary tasks for app specific URL
|
| // navigation rather than restarting the load.
|
| if (web::GetWebClient()->IsAppSpecificURL(webViewURL)) {
|
| - [self abortWebLoad];
|
| - web::WebLoadParams params(webViewURL);
|
| - [self loadWithParams:params];
|
| + // Renderer-initiated loads of WebUI can be done only from other WebUI
|
| + // pages. WebUI pages may have increased power and using the same web
|
| + // process (which may potentially be controller by an attacker) is
|
| + // dangerous.
|
| + if (web::GetWebClient()->IsAppSpecificURL(_documentURL)) {
|
| + [self abortWebLoad];
|
| + web::WebLoadParams params(webViewURL);
|
| + [self loadWithParams:params];
|
| + }
|
| return;
|
| } else {
|
| [self registerLoadRequest:webViewURL];
|
|
|