helloflask / bootstrap-flask

Bootstrap 4 & 5 helper for your Flask projects.
https://bootstrap-flask.readthedocs.io
Other
1.1k stars 189 forks source link

Failed to find a valid digest - bootstrap@5.3.2/dist/js/bootstrap.min.js #331

Closed pschleiter closed 8 months ago

pschleiter commented 8 months ago

Hello,

with version 2.3.1 I get the following failure in the browser, when I include {{ bootstrap.load_js() }} using Bootstrap5.

Failed to find a valid digest in the 'integrity' attribute for resource 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.min.js' with computed SHA-384 integrity 'BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+'. The resource has been blocked.

On the getbootstrap.com (https://getbootstrap.com/docs/5.3/getting-started/introduction/) specifies the following tags for 5.3.2

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.min.js" integrity="sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+" crossorigin="anonymous"></script>

I guess the was a mix up in the release with bootstrap.bundle.min.js and bootstrap.min.js.

greyli commented 8 months ago

Fixed in #332 and released 2.3.2. Thanks for the quick report!

@PanderMusubi Please be careful when updating the integrity value.

PanderMusubi commented 8 months ago

Yes, sorry for that. I have made an extra not of it in https://github.com/helloflask/bootstrap-flask/discussions/300