Botframework-webchat: Subresource Integrity Problem

Created on 6 Mar 2020  路  5Comments  路  Source: microsoft/BotFramework-WebChat

Screenshots

image

Version

Webchat CDN v.4.8.0

Describe the bug

I replaced webchat cdn urls v 4.7.1 in my project with the new webchat cdn urls with v 4.8.0 and they throw http status code 404 (Not Fount). Please see the screenshot above.

Code

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title></title>
  <base href="./" />

  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <link rel="icon" type="image/x-icon" href="favicon.ico" />
  <link rel="stylesheet" href="https://use.typekit.net/fuc4zia.css" />
  <script crossorigin="anonymous"
          integrity="sha384-EAMohwVGPGHagMPKSsrNj19/AUPEveyotCJG2ZriygMOR7dujHk9iLMoKOeZiETX"
          src="https://cdn.botframework.com/botframework-webchat/4.8.0/webchat.js"></script>

  <script crossorigin="anonymous"
          integrity="sha384-kBFopxfE3U3wq2fCUCdxNFihClv3I5jnxsQqqeShIPDs7wpWg9K8NSKUINSzPuJs"
          src="https://cdn.botframework.com/botframework-webchat/4.8.0/webchat-es5.js"></script>
</head>
<body>
  <app-root>Loading...</app-root>
</body>
</html>

Steps to reproduce

  1. On an existing webchat host project update CDN urls with v4.8.0
  2. Run the project and observe the http 404 errors under the browser console.

Expected behavior

Files should be available and we should not see http code 404.

[Bug]

Question customer-replied-to customer-reported

Most helpful comment

4.8.0 is not on CDN yet. It will be released coming Monday noon.

Thus, the SRI for 4.8.0 is not working yet.

@arman-g thanks for being cutting edge.

All 5 comments

Hi @arman-g unfortunately I'm not able to reproduce this problem. When I specify 4.8.0, Web Chat loads for me normally.
image

If you remove the integrity attribute, does the behavior stay the same, or are there any changes?

Hi @corinagum, unfortunately removing the integrity does not help. I wonder What is the difference between v4.7.1 and v4.8.0? Please see the image below, I have no problem seeing the /4.7.1/webchat.js file content in the browser but there is an error for /4.8.0/webchat.js.

image

4.8.0 is not on CDN yet. It will be released coming Monday noon.

Thus, the SRI for 4.8.0 is not working yet.

@arman-g thanks for being cutting edge.

@compulim Thank you! I thought I am going crazy :)

Closing as resolved. @compulim thanks for jumping in xD

Was this page helpful?
0 / 5 - 0 ratings