Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Commit

Permalink
update tests for HttpOnly protection against XSS
Browse files Browse the repository at this point in the history
  • Loading branch information
Caolan McMahon committed Apr 26, 2011
1 parent a2e5c87 commit 665d4f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test-cookie-sessions.js
Expand Up @@ -351,7 +351,7 @@ exports['writeHead'] = function(test){
headers['Set-Cookie'],
'_node=serialized_session; ' +
'expires=expiry_date; ' +
'path=/'
'path=/; HttpOnly'
);
test.equals(headers['original'], 'header');
}
Expand Down Expand Up @@ -422,7 +422,7 @@ exports['writeHead writes empty cookie with immediate expiration if session is u
headers['Set-Cookie'],
'_node=; ' +
'expires=now; ' +
'path=/'
'path=/; HttpOnly'
);
test.equals(headers['original'], 'header');
}
Expand Down Expand Up @@ -494,7 +494,7 @@ exports['set multiple cookies'] = function(test){
['Set-Cookie', 'testcookie=testvalue'],
['Set-Cookie', '_node=session_data; ' +
'expires=expiry_date; ' +
'path=/']
'path=/; HttpOnly']
]);
sessions.serialize = _serialize;
sessions.expires = _expires;
Expand Down Expand Up @@ -530,7 +530,7 @@ exports['set single cookie'] = function(test){
'other_header': 'val',
'Set-Cookie': '_node=session_data; ' +
'expires=expiry_date; ' +
'path=/'
'path=/; HttpOnly'
});
sessions.serialize = _serialize;
sessions.expires = _expires;
Expand Down Expand Up @@ -563,7 +563,7 @@ exports['handle headers as array'] = function(test){
['header2', 'val2'],
['Set-Cookie', '_node=session_data; ' +
'expires=expiry_date; ' +
'path=/']
'path=/; HttpOnly']
]);
sessions.serialize = _serialize;
test.done();
Expand Down

0 comments on commit 665d4f8

Please sign in to comment.