Commit 38486620 authored by Ivan Sandrk's avatar Ivan Sandrk Committed by Commit Bot

Fix a crash in WebRequestInternalEventHandledFunction::Run

Dereferencing a null extension(), change it to use extension_id_safe()

bug: chromium:795399
Change-Id: If072049509dca199707c48ff374c6a296b45625a
Reviewed-on: https://chromium-review.googlesource.com/831186Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Ivan Šandrk <isandrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524603}
parent 02505ac5
...@@ -2095,7 +2095,7 @@ WebRequestInternalEventHandledFunction::Run() { ...@@ -2095,7 +2095,7 @@ WebRequestInternalEventHandledFunction::Run() {
// In Public Session we only want to allow "cancel" (except for whitelisted // In Public Session we only want to allow "cancel" (except for whitelisted
// extensions which have no such restrictions). // extensions which have no such restrictions).
if (IsPublicSession() && if (IsPublicSession() &&
!extensions::IsWhitelistedForPublicSession(extension()->id()) && !extensions::IsWhitelistedForPublicSession(extension_id_safe()) &&
(value->HasKey("redirectUrl") || (value->HasKey("redirectUrl") ||
value->HasKey(keys::kAuthCredentialsKey) || value->HasKey(keys::kAuthCredentialsKey) ||
value->HasKey("requestHeaders") || value->HasKey("requestHeaders") ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment