Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable CWS signature verification for PDFJS #674

Merged
merged 1 commit into from
Oct 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions patches/chrome-browser-extensions-install_verifier.cc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/chrome/browser/extensions/install_verifier.cc b/chrome/browser/extensions/install_verifier.cc
index ed1d3ad3d7f3f4f80fbeb050bf5861e89de09b8c..1bb5839b811d6a7e69e54dff328fa6d68b1472b8 100644
--- a/chrome/browser/extensions/install_verifier.cc
+++ b/chrome/browser/extensions/install_verifier.cc
@@ -15,6 +15,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/stl_util.h"
#include "base/trace_event/trace_event.h"
+#include "brave/common/extensions/extension_constants.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_management.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -213,6 +214,10 @@ bool InstallVerifier::NeedsVerification(const Extension& extension) {

// static
bool InstallVerifier::IsFromStore(const Extension& extension) {
+ // Do not fetch signatures for PDFJS which is hosted by Brave, not CWS
+ if (extension.id() == pdfjs_extension_id) {
+ return false;
+ }
return extension.from_webstore() ||
ManifestURL::UpdatesFromGallery(&extension);
}