Skip to content

Commit

Permalink
iron 1.0. Closes hapijs#1081
Browse files Browse the repository at this point in the history
  • Loading branch information
Eran Hammer committed Sep 30, 2013
1 parent cbe7d18 commit d2236ff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "hapi",
"description": "HTTP Server framework",
"homepage": "http://hapijs.com",
"version": "1.11.1",
"version": "1.12.0",
"repository": {
"type": "git",
"url": "git://github.com/spumko/hapi"
Expand All @@ -18,14 +18,14 @@
"node": "0.10.x"
},
"dependencies": {
"hoek": "1.0.x",
"boom": "1.0.x",
"joi": "1.1.x",
"catbox": "1.0.x",
"hoek": "1.x.x",
"boom": "1.x.x",
"joi": "1.x.x",
"catbox": "1.x.x",
"hawk": "1.x.x",
"shot": "1.1.x",
"cryptiles": "0.2.x",
"iron": "0.3.x",
"shot": "1.x.x",
"cryptiles": "1.x.x",
"iron": "1.x.x",
"async": "0.2.x",
"multiparty": "2.1.x",
"mime": "1.2.x",
Expand All @@ -35,7 +35,7 @@
"semver": "2.0.x"
},
"devDependencies": {
"lab": "0.2.x",
"lab": "1.x.x",
"request": "2.22.x",
"handlebars": "1.0.x",
"jade": "0.33.x",
Expand Down
8 changes: 4 additions & 4 deletions test/unit/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('State', function () {
pass('key=dGVzdA', { key: 'test' }, null, { key: { encoding: 'base64' } });
pass('key=dGVzdA', { key: 'dGVzdA' }, null, { key: { encoding: 'none' } });
pass('key=eyJ0ZXN0aW5nIjoianNvbiJ9', { key: { testing: 'json' } }, null, { key: { encoding: 'base64json' } });
pass('key=Fe26.1**0c68b200eb53406edefb402bb84e265d056bd11eb6bdebf3627a4fd7d1db6d79*XL-d8bUCuSwIwIYtmjXZ3g*4yVxLHFllbJWLSve93se4w*34771b9abd1cadeb0118e2a337c066f32cb44c223e3610533fc56ef3bbc53d56*HEfokc825mlBi-9jm1I94DWeZJ5uifVRD0kx_o-jKp8', { key: { a: 1 } }, null, { key: { encoding: 'iron', password: 'password' } });
pass('key=Fe26.2**f3fc42242467f7a97c042be866a32c1e7645045c2cc085124eadc66d25fc8395*URXpH8k-R0d4O5bnY23fRQ*uq9rd8ZzdjZqUrq9P2Ci0yZ-EEUikGzxTLn6QTcJ0bc**3880c0ac8bab054f529afec8660ebbbbc8050e192e39e5d622e7ac312b9860d0*r_g7N9kJYqXDrFlvOnuKpfpEWwrJLOKMXEI43LAGeFg', { key: { a: 1, b: 2, c: 3 } }, null, { key: { encoding: 'iron', password: 'password' } });
pass('sid=a=1&b=2&c=3%20x.2d75635d74c1a987f84f3ee7f3113b9a2ff71f89d6692b1089f19d5d11d140f8*xGhc6WvkE55V-TzucCl0NVFmbijeCwgs5Hf5tAVbSUo', { sid: { a: '1', b: '2', c: '3 x' } }, null, { sid: { encoding: 'form', sign: { password: 'password' } } });

var loose = Hapi.utils.clone(Defaults.server.state);
Expand Down Expand Up @@ -137,8 +137,8 @@ describe('State', function () {
fail('a=1; b=2; c=3;;');
fail('key=XeyJ0ZXN0aW5nIjoianNvbiJ9', null, { key: { encoding: 'base64json' } });
fail('x=XeyJ0ZXN0aW5nIjoianNvbiJ9; x=XeyJ0ZXN0aW5dnIjoianNvbiJ9', null, { x: { encoding: 'base64json' } });
fail('key=Fe26.2**0c68b200eb53406edefb402bb84e265d056bd11eb6bdebf3627a4fd7d1db6d79*XL-d8bUCuSwIwIYtmjXZ3g*4yVxLHFllbJWLSve93se4w*34771b9abd1cadeb0118e2a337c066f32cb44c223e3610533fc56ef3bbc53d56*HEfokc825mlBi-9jm1I94DWeZJ5uifVRD0kx_o-jKp8', null, { key: { encoding: 'iron', password: 'password' } });
fail('key=Fe26.1**0c68b200eb53406edefb402bb84e265d056bd11eb6bdebf3627a4fd7d1db6d79*XL-d8bUCuSwIwIYtmjXZ3g*4yVxLHFllbJWLSve93se4w*34771b9abd1cadeb0118e2a337c066f32cb44c223e3610533fc56ef3bbc53d56*HEfokc825mlBi-9jm1I94DWeZJ5uifVRD0kx_o-jKp8', null, { key: { encoding: 'iron', password: 'passwordx' } });
fail('key=Fe26.1**f3fc42242467f7a97c042be866a32c1e7645045c2cc085124eadc66d25fc8395*URXpH8k-R0d4O5bnY23fRQ*uq9rd8ZzdjZqUrq9P2Ci0yZ-EEUikGzxTLn6QTcJ0bc**3880c0ac8bab054f529afec8660ebbbbc8050e192e39e5d622e7ac312b9860d0*r_g7N9kJYqXDrFlvOnuKpfpEWwrJLOKMXEI43LAGeFg', null, { key: { encoding: 'iron', password: 'password' } });
fail('key=Fe26.2**f3fc42242467f7a97c042be866a32c1e7645045c2cc085124eadc66d25fc8395*URXpH8k-R0d4O5bnY23fRQ*uq9rd8ZzdjZqUrq9P2Ci0yZ-EEUikGzxTLn6QTcJ0bc**3880c0ac8bab054f529afec8660ebbbbc8050e192e39e5d622e7ac312b9860d0*r_g7N9kJYqXDrFlvOnuKpfpEWwrJLOKMXEI43LAGeFg', null, { key: { encoding: 'iron', password: 'passwordx' } });
fail('sid=a=1&b=2&c=3%20x.2d75635d74c1a987f84f3ee7f3113b9a2ff71f89d6692b1089f19d5d11d140f8*khsb8lmkNJS-iljqDKZDMmd__2PcHBz7Ksrc-48gZ-0', null, { sid: { encoding: 'form', sign: {} } });
fail('sid=a=1&b=2&c=3%20x', null, { sid: { encoding: 'form', sign: { password: 'password' } } });
fail('sid=a=1&b=2&c=3%20x; sid=a=1&b=2&c=3%20x', null, { sid: { encoding: 'form', sign: { password: 'password' } } });
Expand Down Expand Up @@ -300,7 +300,7 @@ describe('State', function () {
State.generateSetCookieHeader({ name: 'sid', value: { a: 1, b: 2, c: 3 } }, definitions, function (err, header) {

expect(err).to.not.exist;
expect(header[0]).to.have.string('sid=Fe26.1*');
expect(header[0]).to.have.string('sid=Fe26.2*');
done();
});
});
Expand Down

0 comments on commit d2236ff

Please sign in to comment.