diff options
author | jyasskin@chromium.org <jyasskin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-01 23:55:03 +0000 |
---|---|---|
committer | jyasskin@chromium.org <jyasskin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-01 23:55:03 +0000 |
commit | ab55c2b682d9770de2b46cc85b00bcc79c4ea315 (patch) | |
tree | 875cb25ac3ce7df01ac2117a2bdf49437601f43c /chrome/browser/extensions/extension_creator.cc | |
parent | 1d424a13c881bde3c6f96c099e5b46215df3b243 (diff) | |
download | chromium_src-ab55c2b682d9770de2b46cc85b00bcc79c4ea315.zip chromium_src-ab55c2b682d9770de2b46cc85b00bcc79c4ea315.tar.gz chromium_src-ab55c2b682d9770de2b46cc85b00bcc79c4ea315.tar.bz2 |
Prevent developers from accidentally including their private keys in extensions.
This puts a warning on chrome://extensions in developer mode when an
unpacked extension includes a parsable .pem file, and fails an attempt
to pack such an extension.
This doesn't yet identify when an extension includes its own private
key because RSAPrivateKey currently requires loading from the
filesystem on Mac, and the utility process that first loads an
extension is prohibited from doing that.
BUG=130140
TEST=unit_tests --gtest_filter=Extension*;
Manually ran chrome and tried to load and pack an extension containing
a private key.
Review URL: https://chromiumcodereview.appspot.com/10451086
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140128 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_creator.cc')
-rw-r--r-- | chrome/browser/extensions/extension_creator.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc index ea03d3a..61e0134 100644 --- a/chrome/browser/extensions/extension_creator.cc +++ b/chrome/browser/extensions/extension_creator.cc @@ -107,7 +107,7 @@ bool ExtensionCreator::ValidateManifest(const FilePath& extension_dir, extension_dir, extension_id, Extension::INTERNAL, - Extension::FOLLOW_SYMLINKS_ANYWHERE, + Extension::FOLLOW_SYMLINKS_ANYWHERE | Extension::ERROR_ON_PRIVATE_KEY, &error_message_)); return !!extension.get(); } |