Skip to content

Commit

Permalink
Merge pull request #34 from gdcc/shafixtodev
Browse files Browse the repository at this point in the history
Sha512 Race fix
  • Loading branch information
qqmyers authored Aug 20, 2024
2 parents 92dd4a0 + 586a2a7 commit 55d5afa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/fileupload2.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,13 @@ $(document).ready(function() {
break;
case 'SHA-512':
js.src = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/x64-core.js";
//Make async false to avoid sha512 loading before the x64-core which can cause an error
js.async = false;
head.appendChild(js);
js = document.createElement("script");
js.type = "text/javascript";
js.src = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/sha512.js";
js.async = false;
break;
default:
js.src = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/md5.js";
Expand Down

0 comments on commit 55d5afa

Please sign in to comment.