--- a/Overview.html Mon Jul 15 13:46:45 2013 -0400
+++ b/Overview.html Tue Jul 16 10:33:09 2013 -0400
@@ -266,19 +266,25 @@
bufferData = createArrayBufferView(src);
window.crypto.subtle.digest("SHA-256", bufferData).then(
function(digest){
- if(digest == src_hash)
+ if(digest === src_hash)
{
var transformed = JSON.parse(src);
/* Now do stuff with transformed -- it is legitimately from the mothership */
+ }
+ else
+ {
+ request.pull("https://cdn.example/src.js")
+
+ // Put it in localStore
}
},
function(error){
// Fetch the code anew
- request.pull("http://cdn.example/src.js");
+ request.pull("https://cdn.example/src.js");
// Put it in localStore
@@ -441,7 +447,7 @@
{
if(event.origin != "http://photosharingsite.example")
return;
- if(event.data == "OK")
+ if(event.data === "OK")
// Auth was successful
else
// Auth Fail on PSS side