tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

hash-failure.html (804B)


      1 <!DOCTYPE html>
      2 <html>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'sha256-wrong9e+pZbSYIkpB8BIE0Hs7yHajJDiX5mnT/wrong=' 'sha256-RAsyam34o4peVe9sCebtaZWRVhqAhudem+NlcnP2Kp8=';">
      6 
      7 <!-- 'sha256-P5xqp9e+pZbSYIkpB8BIE0Hs7yHajJDiX5mnT/1PO1I=' -->
      8 <script type="importmap">
      9 {
     10  "imports": {
     11    "../resources/log.js?pipe=sub&name=A": "../resources/log.js?pipe=sub&name=B"
     12  }
     13 }
     14 </script>
     15 
     16 <!-- 'sha256-RAsyam34o4peVe9sCebtaZWRVhqAhudem+NlcnP2Kp8=' -->
     17 <script>
     18 const log = [];
     19 promise_test(() => {
     20  return import("../resources/log.js?pipe=sub&name=A")
     21    .then(() => assert_array_equals(log, ["log:A"]))
     22  },
     23  'Importmap should not be accepted due to wrong hash');
     24 </script>