fix(EnvelopedLocked): asp-for tag helper verwendet, um die Daten der UserSelectSMS Eigenschaft zu erhalten.
- nullibility und null check von UserSelectSMS entfernt, weil es für tag helper nicht akzeptabel ist
This commit is contained in:
@@ -226,17 +226,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
|
||||
//check if the user has phone is added
|
||||
if (er_secret.TFAEnabled)
|
||||
{
|
||||
if (auth.UserSelectSMS is bool userSelectSMS)
|
||||
return await TFAView(userSelectSMS);
|
||||
else
|
||||
{
|
||||
// if If TFA is enabled but UserSelectSMS is null, there is an unauthorized request(e.g. via an application like postman)
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
_logger.LogError("TFA is enabled but UserSelectSMS is null. In this case there is an unauthorized request (for example via an application like postman). Form data: {form}", JsonConvert.SerializeObject(auth));
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
}
|
||||
return await TFAView(auth.UserSelectSMS);
|
||||
}
|
||||
else if (auth.HasSmsCode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user