зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1752332: Remove the blocklisting check in ::OnPreferenceChange r=KrisWright
Now that we send everything (except sometimes the user value is sanitized) we should no longer perform this check. This is also good because it eliminates security code you have to have (and thus accidently omitting it is a vulnerability) and changes it to security code that happens automatically, and is enforced by the compiler (via mandatory ctor argument.) Depends on D141414 Differential Revision: https://phabricator.services.mozilla.com/D141415
This commit is contained in:
Родитель
8fd70bf701
Коммит
981a623dfe
|
@ -3639,12 +3639,6 @@ ContentParent::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
// We know prefs are ASCII here.
|
||||
NS_LossyConvertUTF16toASCII strData(aData);
|
||||
|
||||
// A pref changed. If it is useful to do so, inform child processes.
|
||||
if (ShouldSanitizePreference(strData.Data(),
|
||||
/* will be fixed later */ false)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Pref pref(strData, /* isLocked */ false,
|
||||
/* isSanitized */ false, Nothing(), Nothing());
|
||||
|
||||
|
|
|
@ -96,10 +96,6 @@ void RDDProcessManager::OnPreferenceChange(const char16_t* aData) {
|
|||
// We know prefs are ASCII here.
|
||||
NS_LossyConvertUTF16toASCII strData(aData);
|
||||
|
||||
// A pref changed. If it is useful to do so, inform child processes.
|
||||
if (ShouldSanitizePreference(strData.Data(), false)) {
|
||||
return;
|
||||
}
|
||||
mozilla::dom::Pref pref(strData, /* isLocked */ false,
|
||||
/* isSanitized */ false, Nothing(), Nothing());
|
||||
|
||||
|
|
|
@ -163,10 +163,6 @@ void GPUProcessManager::OnPreferenceChange(const char16_t* aData) {
|
|||
// We know prefs are ASCII here.
|
||||
NS_LossyConvertUTF16toASCII strData(aData);
|
||||
|
||||
// A pref changed. If it is useful to do so, inform child processes.
|
||||
if (ShouldSanitizePreference(strData.Data(), false)) {
|
||||
return;
|
||||
}
|
||||
mozilla::dom::Pref pref(strData, /* isLocked */ false,
|
||||
/* isSanitized */ false, Nothing(), Nothing());
|
||||
|
||||
|
|
|
@ -216,10 +216,6 @@ void VRProcessManager::OnPreferenceChange(const char16_t* aData) {
|
|||
// We know prefs are ASCII here.
|
||||
NS_LossyConvertUTF16toASCII strData(aData);
|
||||
|
||||
// A pref changed. If it is useful to do so, inform child processes.
|
||||
if (ShouldSanitizePreference(strData.Data(), false)) {
|
||||
return;
|
||||
}
|
||||
mozilla::dom::Pref pref(strData, /* isLocked */ false,
|
||||
/* isSanitized */ false, Nothing(), Nothing());
|
||||
|
||||
|
|
|
@ -94,11 +94,6 @@ void UtilityProcessManager::OnPreferenceChange(const char16_t* aData) {
|
|||
// We know prefs are ASCII here.
|
||||
NS_LossyConvertUTF16toASCII strData(aData);
|
||||
|
||||
// A pref changed. If it is useful to do so, inform child processes.
|
||||
if (ShouldSanitizePreference(strData.Data(), false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
mozilla::dom::Pref pref(strData, /* isLocked */ false,
|
||||
/* isSanitized */ false, Nothing(), Nothing());
|
||||
Preferences::GetPreference(&pref, GeckoProcessType_Utility,
|
||||
|
|
Загрузка…
Ссылка в новой задаче