  'test that authorization can change handshake data': function (done) {
    var port = ++ports
      , io = sio.listen(port)
      , cl = client(port);

    io.configure(function () {
      function auth (data, fn) {
        var replacement = { baz: 'qu' };
        for (i in data) {
          if (data.hasOwnProperty(i)) {
            replacement[i] = data[i];
          }
        }
        fn(null, true, replacement);
      };

      io.set('authorization', auth);
    });

    cl.get('/socket.io/{protocol}/', function (res, data) {
      var id = data.split(':', 2)[0];
      res.statusCode.should.eql(200);
      io.handshaken[id].should.have.baz;
      io.handshaken[id].baz.should.eql('qu');

      cl.end();
      io.server.close();
      done();
    });
  },
The software uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.