Skip to content

Commit

Permalink
Merge branch 'hotfix/v2.6.3' of git.onlyoffice.com:ONLYOFFICE/DocSpac…
Browse files Browse the repository at this point in the history
…e-server into hotfix/v2.6.3

# Conflicts:
#	products/ASC.Files/Core/Core/Security/ExternalShare.cs
  • Loading branch information
pavelbannov committed Oct 2, 2024
2 parents a729111 + a74e60a commit 97f3c4c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions products/ASC.Files/Core/Core/Security/ExternalShare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +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 null;
return new TokenData
{
Id = Guid.Empty
};
}

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

0 comments on commit 97f3c4c

Please sign in to comment.