aspnet / Templates

This repo is OBSOLETE - please see the README file for information
Other
151 stars 57 forks source link

Account - VerifyCode does not use correct returnUrl. #734

Closed natelaff closed 7 years ago

natelaff commented 7 years ago

In VerifyCode.cshtml you define the form as

<form asp-controller="Account" asp-action="VerifyCode" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" role="form">

The ReturnUrl is not in ViewData, you pass it in VerifyCodeViewModel. So the form should use Model.ReturnUrl.

<form asp-controller="Account" asp-action="VerifyCode" asp-route-returnurl="@Model.ReturnUrl" method="post" role="form">