[CHANGE] Cookie login fixed

This commit is contained in:
max
2025-09-05 23:36:51 +02:00
parent 55322f8792
commit f334c87fbb
7 changed files with 83 additions and 19 deletions

View File

@@ -9,11 +9,11 @@ public static class AuthenticationUtilities
{
private const string HeaderScheme = "SAPISIDHASH";
// Dave Thomas @ https://stackoverflow.com/a/32065323/9948300
// Dave Thomas & windy for updated answer @ https://stackoverflow.com/a/32065323/9948300
public static AuthenticationHeaderValue? GetSapisidHashHeader(string datasyncId, string sapisid, string origin)
{
var strHash = GetSapisidHash(datasyncId, sapisid, origin);
return new AuthenticationHeaderValue(HeaderScheme, strHash);
return strHash == null ? null : new AuthenticationHeaderValue(HeaderScheme, strHash);
}
public static string? GetSapisidHash(string datasyncId, string sapisid, string origin, string? time = null)