##// END OF EJS Templates
don't store signatures in notebooks...
don't store signatures in notebooks store them in an sqlite database instead. The algorithm and signature are stored and not associated with a path. This means that moving files around doesn't affect trust, and every trusted change to a notebook remains trusted.

File last commit:

r18587:1e136a8b
r19625:0dbcfac8
Show More
inject_js.js
23 lines | 650 B | application/javascript | JavascriptLexer
//
// Test robustness about JS injection in different place
//
// This assume malicious document arrive to the frontend.
//
casper.notebook_test(function () {
var messages = [];
this.on('remote.alert', function (msg) {
messages.push(msg);
});
this.evaluate(function () {
var cell = IPython.notebook.get_cell(0);
var json = cell.toJSON();
json.execution_count = "<script> alert('hello from input prompts !')</script>";
cell.fromJSON(json);
});
this.then(function () {
this.test.assert(messages.length == 0, "Captured log message from script tag injection !");
});
});