summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-02-24 10:13:37 +0000
committerMoonchild <moonchild@palemoon.org>2021-02-24 10:13:37 +0000
commit0f269c6548704e45470a027f4916420e6a73280a (patch)
treedb13ddd669688647027db2c57c8ae29ba254df8d
parent2ec9766a7a09b68f9c8ff82a33331a3fbed5cba4 (diff)
downloadaura-central-0f269c6548704e45470a027f4916420e6a73280a.tar.gz
[DOM] Don't reveal error details for CORS-cross-origin decoding errors.
-rw-r--r--dom/html/HTMLMediaElement.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp
index 0828208f6..1ff1fd7a4 100644
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -4614,8 +4614,12 @@ void HTMLMediaElement::DecodeError(const MediaResult& aError)
}
} else if (mReadyState == nsIDOMHTMLMediaElement::HAVE_NOTHING) {
NoSupportedMediaSourceError(aError.Description());
- } else {
+ } else if (IsCORSSameOrigin()) {
Error(MEDIA_ERR_DECODE, aError.Description());
+ } else {
+ nsAutoCString eMessage;
+ eMessage.AssignLiteral("Failed to decode media");
+ Error(MEDIA_ERR_DECODE, eMessage);
}
}