Skip to content

Commit

Permalink
disable CWS signature verification for PDFJS
Browse files Browse the repository at this point in the history
needed for
brave/brave-browser#663 (comment)

PDFJS is not directly installed from CWS as of
brave/brave-core-crx-packager#29
  • Loading branch information
diracdeltas committed Oct 18, 2018
1 parent cc06d17 commit a89dfb9
Showing 1 changed file with 23 additions and 0 deletions.
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);
}

0 comments on commit a89dfb9

Please sign in to comment.