[EME] generateRequest was not using the sanitized init data
authorcalvaris@igalia.com <calvaris@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2019 08:29:07 +0000 (08:29 +0000)
committercalvaris@igalia.com <calvaris@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2019 08:29:07 +0000 (08:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195555

Reviewed by Jer Noble.

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::generateRequest): Use sanitized init
data instead of the original one.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242787 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp

index aab45a4..50bb326 100644 (file)
@@ -1,3 +1,14 @@
+2019-03-12  Xabier Rodriguez Calvar  <calvaris@igalia.com>
+
+        [EME] generateRequest was not using the sanitized init data
+        https://bugs.webkit.org/show_bug.cgi?id=195555
+
+        Reviewed by Jer Noble.
+
+        * Modules/encryptedmedia/MediaKeySession.cpp:
+        (WebCore::MediaKeySession::generateRequest): Use sanitized init
+        data instead of the original one.
+
 2019-03-12  Rob Buis  <rbuis@igalia.com>
 
         Implement further CORS restrictions
index 7b38450..0404d86 100644 (file)
@@ -200,7 +200,7 @@ void MediaKeySession::generateRequest(const AtomicString& initDataType, const Bu
         }
 
         LOG(EME, "EME - request license from CDM implementation");
-        m_instanceSession->requestLicense(m_sessionType, initDataType, WTFMove(initData), [this, weakThis = makeWeakPtr(*this), promise = WTFMove(promise)] (Ref<SharedBuffer>&& message, const String& sessionId, bool needsIndividualization, CDMInstanceSession::SuccessValue succeeded) mutable {
+        m_instanceSession->requestLicense(m_sessionType, initDataType, sanitizedInitData.releaseNonNull(), [this, weakThis = makeWeakPtr(*this), promise = WTFMove(promise)] (Ref<SharedBuffer>&& message, const String& sessionId, bool needsIndividualization, CDMInstanceSession::SuccessValue succeeded) mutable {
             if (!weakThis)
                 return;