summaryrefslogtreecommitdiff
path: root/dom
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
commitb2c0fda7753ce19074e17bf6844c6d78026670ed (patch)
treedb13ddd669688647027db2c57c8ae29ba254df8d /dom
parent525961c26137ca8a6416b9b2cd6b390593881be1 (diff)
downloaduxp-b2c0fda7753ce19074e17bf6844c6d78026670ed.tar.gz
[DOM] Don't reveal error details for CORS-cross-origin decoding errors.
Diffstat (limited to 'dom')
-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 0828208f69..1ff1fd7a45 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);
}
}