Skip to content

Commit

Permalink
Allow periods in cookie name (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Oberegger authored Apr 5, 2022
1 parent 6fde094 commit 50132d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const paramsSchema = Joi.object({
.optional()
.default(7 * 24 * 60 * 60), // 7 days,
name: Joi.string()
.pattern(/^[0-9a-zA-Z_-]+$/, { name: 'cookie name' })
.pattern(/^[0-9a-zA-Z_.-]+$/, { name: 'cookie name' })
.optional()
.default('appSession'),
store: Joi.object().optional(),
Expand Down
1 change: 1 addition & 0 deletions test/config.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ describe('get config', () => {
'my_session',
'__Host-mysession',
'mySession123',
'my.session',
];
const invalidNames = [
'my session',
Expand Down

0 comments on commit 50132d4

Please sign in to comment.