mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1218284
- Match signed packages' with trust origin without suffix. r=valentin
This commit is contained in:
parent
d14edeff37
commit
088ac76c5a
@ -18,6 +18,7 @@
|
||||
#include "nsIInputStream.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsIURL.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
|
||||
static const short kResourceHashType = nsICryptoHash::SHA256;
|
||||
|
||||
@ -74,14 +75,15 @@ NS_IMETHODIMP PackagedAppVerifier::Init(nsIPackagedAppVerifierListener* aListene
|
||||
|
||||
mListener = aListener;
|
||||
mState = STATE_UNKNOWN;
|
||||
mPackageOrigin = aPackageOrigin;
|
||||
mSignature = aSignature;
|
||||
mIsPackageSigned = false;
|
||||
mPackageCacheEntry = aPackageCacheEntry;
|
||||
mIsFirstResource = true;
|
||||
mManifest = EmptyCString();
|
||||
|
||||
mBypassVerification = (mPackageOrigin ==
|
||||
nsAutoCString originNoSuffix;
|
||||
OriginAttributes().PopulateFromOrigin(aPackageOrigin, originNoSuffix);
|
||||
mBypassVerification = (originNoSuffix ==
|
||||
Preferences::GetCString("network.http.signed-packages.trusted-origin"));
|
||||
|
||||
nsresult rv;
|
||||
|
@ -241,7 +241,7 @@ function test_channel_with_bad_signature_from_trusted_origin() {
|
||||
let pref = "network.http.signed-packages.trusted-origin";
|
||||
ok(!!Ci.nsISupportsString, "Ci.nsISupportsString");
|
||||
let origin = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
|
||||
origin.data = uri + "^appId=1024";
|
||||
origin.data = uri;
|
||||
Services.prefs.setComplexValue(pref, Ci.nsISupportsString, origin);
|
||||
var channel = make_channel(uri+"/package_with_bad_signature!//index.html");
|
||||
channel.notificationCallbacks = new LoadContextCallback(1024, false, false, false);
|
||||
|
Loading…
Reference in New Issue
Block a user