diff options
author | Moonchild <moonchild@palemoon.org> | 2021-02-24 10:13:37 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-02-24 10:13:37 +0000 |
commit | b2c0fda7753ce19074e17bf6844c6d78026670ed (patch) | |
tree | db13ddd669688647027db2c57c8ae29ba254df8d | |
parent | 525961c26137ca8a6416b9b2cd6b390593881be1 (diff) | |
download | uxp-b2c0fda7753ce19074e17bf6844c6d78026670ed.tar.gz |
[DOM] Don't reveal error details for CORS-cross-origin decoding errors.
-rw-r--r-- | dom/html/HTMLMediaElement.cpp | 6 |
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); } } |