diff --git a/services/web/app/coffee/router.coffee b/services/web/app/coffee/router.coffee index 1b237e409e..549cc50e81 100644 --- a/services/web/app/coffee/router.coffee +++ b/services/web/app/coffee/router.coffee @@ -248,7 +248,7 @@ module.exports = class Router webRouter.post "/beta/opt-in", AuthenticationController.requireLogin(), BetaProgramController.optIn webRouter.post "/beta/opt-out", AuthenticationController.requireLogin(), BetaProgramController.optOut webRouter.get "/confirm-password", AuthenticationController.requireLogin(), SudoModeController.sudoModePrompt - webRouter.post "/confirm-password/submit", AuthenticationController.requireLogin(), SudoModeController.submitPassword + webRouter.post "/confirm-password", AuthenticationController.requireLogin(), SudoModeController.submitPassword #Admin Stuff diff --git a/services/web/app/views/sudo_mode/sudo_mode_prompt.pug b/services/web/app/views/sudo_mode/sudo_mode_prompt.pug index 55af6255ff..27ccc41eb6 100644 --- a/services/web/app/views/sudo_mode/sudo_mode_prompt.pug +++ b/services/web/app/views/sudo_mode/sudo_mode_prompt.pug @@ -13,7 +13,7 @@ block content .row .col-md-12 form(async-form="confirmPassword", name="confirmPassword", - action='/confirm-password/submit', method="POST", ng-cloak) + action='/confirm-password', method="POST", ng-cloak) input(name='_csrf', type='hidden', value=csrfToken) form-messages(for="confirmPassword") .form-group diff --git a/services/web/test/acceptance/coffee/SessionTests.coffee b/services/web/test/acceptance/coffee/SessionTests.coffee index 9343b0e544..07a431a229 100644 --- a/services/web/test/acceptance/coffee/SessionTests.coffee +++ b/services/web/test/acceptance/coffee/SessionTests.coffee @@ -310,7 +310,7 @@ describe "Sessions", -> @user2.getCsrfToken (err) => expect(err).to.be.oneOf [null, undefined] @user2.request.post { - uri: '/confirm-password/submit', + uri: '/confirm-password', json: password: @user2.password }, (err, response, body) =>