Compare commits

..

No commits in common. "9ec97d8aa28ca6a6fc130fbc2566848819cf2563" and "e6039e78b154f14bab36a96223cd0b4ec4b97fe8" have entirely different histories.

2 changed files with 2 additions and 4 deletions

View File

@ -48,7 +48,7 @@ class GatewayClass {
return null; return null;
let auth = null; let auth = null;
run_regex ( run_regex (
/(?:^|;)\s*(?<name>[^;=]+)=(?<value>[^;]+)/gu, /(?:^|;)(?<name>[^;=]+)=(?<value>[^;]+)/gu,
req.headers.cookie, req.headers.cookie,
(res: RegExpMatchArray) => { (res: RegExpMatchArray) => {
if (res.groups?.name === this._options.cookie_name) if (res.groups?.name === this._options.cookie_name)

View File

@ -61,9 +61,7 @@ describe ('gateway', () => {
it ('should allow a valid access token using cookies', async () => { it ('should allow a valid access token using cookies', async () => {
const token = await authority.sign ('access_token', 60); const token = await authority.sign ('access_token', 60);
const resp = await get ( const resp = await get ({ cookie: `cookie_jar=${token.signature}` });
{ cookie: `foo=bar;cookie_jar=${token.signature};asd=efg` }
);
expect (resp.statusCode) expect (resp.statusCode)
.toEqual (200); .toEqual (200);
expect (JSON.parse (resp.body as string).token_id) expect (JSON.parse (resp.body as string).token_id)