js/src/jit-test/tests/jaeger/bug652305.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 var sjcl = {
michael@0 2 cipher: {},
michael@0 3 };
michael@0 4 var global = 99;
michael@0 5 sjcl.cipher.aes = function (a) {
michael@0 6 var b, c, d, e, f = this.h[0][4],
michael@0 7 g = this.h[1];
michael@0 8 d = a.slice(0);
michael@0 9 this.a = [d, []];
michael@0 10 for (a = 8; a < 60; a++) {
michael@0 11 c = d[a - 1];
michael@0 12 if (a % 8 === 0) {
michael@0 13 c = global;
michael@0 14 if (0 === 0) {
michael@0 15 h = 2;
michael@0 16 }
michael@0 17 }
michael@0 18 d[a] = c;
michael@0 19 }
michael@0 20 assertEq(this.a[0][50], 99);
michael@0 21 };
michael@0 22 sjcl.cipher.aes.prototype = {
michael@0 23 h: [[[], [], [], [], [99, 0]], [[67175681, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 65537], [17039621, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 16777472], [83952641, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 65537], [17105156, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , 16777472], []]],
michael@0 24 };
michael@0 25 new sjcl.cipher.aes([0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]);

mercurial