Skip to content

Commit

Permalink
Merge pull request #5759 from abpframework/maliming-patch-1
Browse files Browse the repository at this point in the history
Avoid decrypt null setting value.
  • Loading branch information
realLiangshiwei authored Oct 11, 2020
2 parents 59fd31b + bae1ddb commit 16b21f9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public virtual async Task<string> GetOrNullAsync(string name)
//TODO: How to implement setting.IsInherited?

var value = await GetOrNullValueFromProvidersAsync(providers, setting);
if (setting.IsEncrypted)
if (value != null && setting.IsEncrypted)
{
value = SettingEncryptionService.Decrypt(setting, value);
}
Expand Down Expand Up @@ -84,4 +84,4 @@ protected virtual async Task<string> GetOrNullValueFromProvidersAsync(
return null;
}
}
}
}

0 comments on commit 16b21f9

Please sign in to comment.