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:
Tom Ritter 2022-04-25 13:54:01 +00:00
Родитель eda46349a8
Коммит 790bbf4ea8
5 изменённых файлов: 0 добавлений и 23 удалений

Просмотреть файл

@ -3640,12 +3640,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,