Is unicode character encoding a safe alternative for html encoding when rendering unsafe user input to html?

I am building a web application in which a third party library is used, which transforms the user input into JSON and sends it to an controller action. In this action, we serialize the input using the standard Microsoft serialize from the … Continue reading Is unicode character encoding a safe alternative for html encoding when rendering unsafe user input to html?

A couple of questions about ASP.Net Core default implementation for login security

By default, ASP.Net Core configures the login exercise with a couple of things that seem strange to me. I’d like someone who knows more about infosec than I to comment on these please.

First, it sends an email to a user upon registration … Continue reading A couple of questions about ASP.Net Core default implementation for login security

Does Asp.Net Core exposes too much information for required enums that were not supplied?

I have a simple code for an input model:

public class MyClass
{
[Required]
public MyEnum? Type { get; set; }
}

Now if I do not send Type as a part of json to the request, I get this error from Web.Api:

“The JSON value coul… Continue reading Does Asp.Net Core exposes too much information for required enums that were not supplied?

Why does Microsoft recommend storing the ASP.NET Core DataProtection Key Ring in EFCore?

After many years that accepted best practice was to never store keys in a database, but Microsoft now recommends storing the data protection key ring (encrypted with certificate) in the database using EFCore.

My question is, is this actua… Continue reading Why does Microsoft recommend storing the ASP.NET Core DataProtection Key Ring in EFCore?

Architecting a solution with native login and 3rd party login via OAuth/OpenID Connect using dotnet core

I am building an API driven application that will have a native login with username and password, and will also need to grant 3rd party access via OAuth/OpenID Connect in the near future.

A pattern I have used in the past is… Continue reading Architecting a solution with native login and 3rd party login via OAuth/OpenID Connect using dotnet core