Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit ffc4ca1

Browse files
committed
Bug 1690976 - Don't reveal error details for CORS-cross-origin decoding errors. r=sstreich,bryce, a=pascalc
Differential Revision: https://phabricator.services.mozilla.com/D104169
1 parent 46bbf09 commit ffc4ca1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dom/html/HTMLMediaElement.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5405,8 +5405,10 @@ void HTMLMediaElement::DecodeError(const MediaResult& aError) {
54055405
}
54065406
} else if (mReadyState == HAVE_NOTHING) {
54075407
NoSupportedMediaSourceError(aError.Description());
5408-
} else {
5408+
} else if (IsCORSSameOrigin()) {
54095409
Error(MEDIA_ERR_DECODE, aError.Description());
5410+
} else {
5411+
Error(MEDIA_ERR_DECODE, "Failed to decode media"_ns);
54105412
}
54115413
}
54125414

0 commit comments

Comments
 (0)