Why not use HTTPS for everything?

In addition to the other reasons (especially performance related) you can only host a single domain per IP address* when using HTTPS. A single server can support multiple domains in HTTP because the Server HTTP header lets the server know which domain to respond with. With HTTPS, the server must offer its certificate to the … Read more

Is there a way to force apache to return 404 instead of 403?

RedirectMatch as in e.g. RedirectMatch 404 /\. does the trick, it prohibits access to all files or directories starting with a dot, giving a “404 Not Found” error. From the Apache manual: “The Redirect[Match] directive maps an old URL into a new one by asking the client to refetch the resource at the new location.” … Read more

How to manually decrypt an ASP.NET Core Authentication cookie?

Decrypting the Authentication Cookie without needing the keys It’s worth noting that you don’t need to gain access to the keys to decrypt the authentication cookie. You simply need to use the right IDataProtector created with the right purpose parameter, and subpurpose parameters. Based on the CookieAuthenticationMiddleware source code https://github.com/aspnet/Security/blob/rel/1.1.1/src/Microsoft.AspNetCore.Authentication.Cookies/CookieAuthenticationMiddleware.cs#L4 it looks like the purpose … Read more