From baa1899536bba3ac81482b3e508e7ee6ddb3c208 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Thu, 15 Nov 2018 22:29:02 +0100 Subject: [PATCH] Fix U2F sign request after u2f library upgrade. --- server/src/lib/routes/secondfactor/u2f/sign_request/get.ts | 2 +- test/inactivity/00-suite.ts | 1 + test/minimal-config/00-suite.ts | 1 + test/minimal-config/reset_password.ts | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server/src/lib/routes/secondfactor/u2f/sign_request/get.ts b/server/src/lib/routes/secondfactor/u2f/sign_request/get.ts index 9c19e468..f6907d8f 100644 --- a/server/src/lib/routes/secondfactor/u2f/sign_request/get.ts +++ b/server/src/lib/routes/secondfactor/u2f/sign_request/get.ts @@ -31,8 +31,8 @@ export default function (vars: ServerVariables) { vars.logger.debug(req, "AppId = %s, keyHandle = %s", appId, JSON.stringify(doc.registration.keyHandle)); const request = vars.u2f.request(appId, doc.registration.keyHandle); - res.json(request); authSession.sign_request = request; + res.json(request); return BluebirdPromise.resolve(); }) .catch(ErrorReplies.replyWithError200(req, res, vars.logger, diff --git a/test/inactivity/00-suite.ts b/test/inactivity/00-suite.ts index b488d3cc..0bb67bf6 100644 --- a/test/inactivity/00-suite.ts +++ b/test/inactivity/00-suite.ts @@ -10,6 +10,7 @@ const includes = [ "docker-compose.test.yml", "example/compose/docker-compose.base.yml", "example/compose/nginx/minimal/docker-compose.yml", + "example/compose/smtp/docker-compose.yml", ] diff --git a/test/minimal-config/00-suite.ts b/test/minimal-config/00-suite.ts index 5fd30c77..0ee3b674 100644 --- a/test/minimal-config/00-suite.ts +++ b/test/minimal-config/00-suite.ts @@ -10,6 +10,7 @@ const includes = [ "docker-compose.minimal.yml", "example/compose/docker-compose.base.yml", "example/compose/nginx/minimal/docker-compose.yml", + "example/compose/smtp/docker-compose.yml", ] diff --git a/test/minimal-config/reset_password.ts b/test/minimal-config/reset_password.ts index 5ae3d674..880b40cb 100644 --- a/test/minimal-config/reset_password.ts +++ b/test/minimal-config/reset_password.ts @@ -9,7 +9,7 @@ import ClickOnLink from '../helpers/click-on-link'; import ClickOnButton from '../helpers/click-on-button'; import WaitRedirect from '../helpers/wait-redirected'; import FillField from "../helpers/fill-field"; -import {GetLinkFromFile} from "../helpers/get-identity-link"; +import {GetLinkFromEmail} from "../helpers/get-identity-link"; import FillLoginPageAndClick from "../helpers/fill-login-page-and-click"; const execAsync = Bluebird.promisify(ChildProcess.exec); @@ -30,7 +30,7 @@ describe('Reset password', function() { .then(() => FillField(this.driver, "username", "john")) .then(() => ClickOnButton(this.driver, "Reset Password")) .then(() => this.driver.sleep(1000)) // Simulate the time to read it from mailbox. - .then(() => GetLinkFromFile()) + .then(() => GetLinkFromEmail()) .then((link) => VisitPage(this.driver, link)) .then(() => FillField(this.driver, "password1", "newpass")) .then(() => FillField(this.driver, "password2", "newpass"))