Skip to content

Commit

Permalink
fix Bug 70637
Browse files Browse the repository at this point in the history
  • Loading branch information
MaksimChegulov committed Oct 2, 2024
1 parent 854d355 commit a74e60a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion products/ASC.Files/Core/Core/Security/ExternalShare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,24 @@ public string GetKey()

public async Task<TokenData> ParseShareKeyAsync(string key)
{
ArgumentException.ThrowIfNullOrEmpty(key);
if (string.IsNullOrEmpty(key))
{
return new TokenData
{
Id = Guid.Empty
};
}

var stringKey = Signature.Read<string>(key, await GetDbKeyAsync());

if (string.IsNullOrEmpty(stringKey))
{
return new TokenData
{
Id = Guid.Empty
};
}

if (!stringKey.StartsWith('{') || !stringKey.EndsWith('}'))
{
return new TokenData
Expand Down

0 comments on commit a74e60a

Please sign in to comment.