Browse Source
* Apply fix for Microsoft Security Advisory CVE-2018-0784 * Apply fix for Microsoft Security Advisory CVE-2018-0785main
committed by
GitHub
7 changed files with 109 additions and 37 deletions
@ -1,6 +1,7 @@ |
|||||
namespace Microsoft.eShopWeb.Web.ViewModels.Manage; |
namespace Microsoft.eShopWeb.Web.ViewModels.Manage; |
||||
|
|
||||
public class GenerateRecoveryCodesViewModel |
public class ShowRecoveryCodesViewModel |
||||
{ |
{ |
||||
public string[] RecoveryCodes { get; set; } |
public string[] RecoveryCodes { get; set; } |
||||
} |
} |
||||
|
|
||||
@ -1,24 +1,26 @@ |
|||||
@model GenerateRecoveryCodesViewModel |
@{ |
||||
@{ |
ViewData["Title"] = "Generate two-factor authentication (2FA) recovery codes"; |
||||
ViewData["Title"] = "Recovery codes"; |
|
||||
ViewData.AddActivePage(ManageNavPages.TwoFactorAuthentication); |
ViewData.AddActivePage(ManageNavPages.TwoFactorAuthentication); |
||||
} |
} |
||||
|
|
||||
<h4>@ViewData["Title"]</h4> |
<h2>@ViewData["Title"]</h2> |
||||
|
|
||||
<div class="alert alert-warning" role="alert"> |
<div class="alert alert-warning" role="alert"> |
||||
<p> |
<p> |
||||
<span class="glyphicon glyphicon-warning-sign"></span> |
<span class="glyphicon glyphicon-warning-sign"></span> |
||||
<strong>Put these codes in a safe place.</strong> |
<strong>This action generates new recovery codes.</strong> |
||||
</p> |
</p> |
||||
<p> |
<p> |
||||
If you lose your device and don't have the recovery codes you will lose access to your account. |
If you lose your device and don't have the recovery codes you will lose access to your account. |
||||
</p> |
</p> |
||||
|
<p> |
||||
|
Generating new recovery codes does not change the keys used in authenticator apps. If you wish to change the key |
||||
|
used in an authenticator app you should <a asp-action="ResetAuthenticatorWarning">reset your authenticator keys.</a> |
||||
|
</p> |
||||
</div> |
</div> |
||||
<div class="row"> |
|
||||
<div class="col-md-12"> |
<div> |
||||
@for (var row = 0; row < Model.RecoveryCodes.Count(); row += 2) |
<form asp-action="GenerateRecoveryCodes" method="post" class="form-group"> |
||||
{ |
<button class="btn btn-danger" type="submit">Generate Recovery Codes</button> |
||||
<code>@Model.RecoveryCodes[row]</code><text> </text><code>@Model.RecoveryCodes[row + 1]</code><br /> |
</form> |
||||
} |
|
||||
</div> |
|
||||
</div> |
</div> |
||||
@ -0,0 +1,25 @@ |
|||||
|
@model ShowRecoveryCodesViewModel |
||||
|
@{ |
||||
|
ViewData["Title"] = "Recovery codes"; |
||||
|
ViewData.AddActivePage(ManageNavPages.TwoFactorAuthentication); |
||||
|
} |
||||
|
|
||||
|
<h4>@ViewData["Title"]</h4> |
||||
|
<div class="alert alert-warning" role="alert"> |
||||
|
<p> |
||||
|
<span class="glyphicon glyphicon-warning-sign"></span> |
||||
|
<strong>Put these codes in a safe place.</strong> |
||||
|
</p> |
||||
|
<p> |
||||
|
If you lose your device and don't have the recovery codes you will lose access to your account. |
||||
|
</p> |
||||
|
</div> |
||||
|
<div class="row"> |
||||
|
<div class="col-md-12"> |
||||
|
@for (var row = 0; row < Model.RecoveryCodes.Length; row += 2) |
||||
|
{ |
||||
|
<code>@Model.RecoveryCodes[row]</code><text> </text><code>@Model.RecoveryCodes[row + 1]</code><br /> |
||||
|
} |
||||
|
</div> |
||||
|
</div> |
||||
|
© 2021 GitHub, Inc. |
||||
Loading…
Reference in new issue