js/src/jit-test/tests/jaeger/bug656096.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.

     1 function aes(a) {
     2     d = a.slice()
     3     for (; a < 28; a++)
     4     d[0] = d[0] ^ undefined
     5 }
     6 var sjcl = {};
     7 sjcl.bitArray = {
     8     concat: function (a, b) {
     9         return d ? a : [];
    10     },
    11     clamp: function (a, b) {
    12         return a
    13     }
    14 };
    15 function G(a, b, c, d, e, f) {
    16     var g = [],
    17         h = sjcl.bitArray,
    18         f = [];
    19     f = h.concat(f, c)
    20     if (c) g = []
    21     else c = h.concat([], [])
    22     h.concat(g, d)
    23     h.clamp(f, [1,2,3])
    24 }
    25 function decrypt(a, b, c, d, e) {
    26     G(a, 1, c, d, e, b)
    27     var g = [],
    28         h = sjcl.bitArray,
    29         f = [];
    30     h.concat(f, c)
    31     if (c) g = []
    32     else c = h.concat([], [])
    33     h.concat(g, d)
    34     h.concat([], c).concat.slice
    35 }
    36 aes(sjcl.bitArray.clamp([]));
    37 decrypt(1, 2, 3);

mercurial