Closed Nisden closed 10 months ago
Might have found the bug (And will be testing it very soon), I think its because my custom encryption have an empty IV.
I've tried to reproduce it, but without success.
The test is here: https://github.com/rebus-org/Rebus.AzureBlobs/blob/master/Rebus.AzureBlobs.Tests/Bugs/ReproduceDataBusNullReferenceException.cs
Can you see if there's anything different in your code?
Just confirmed it, my issue was my custom encryption based on a DataProtectionProvider
internal sealed class RebusDataProtectionEncryption : IEncryptor
{
private readonly IDataProtector dataProtector;
public string ContentEncryptionValue => "dataprotection";
public RebusDataProtectionEncryption(IDataProtectionProvider dataProtectionProvider)
{
dataProtector = dataProtectionProvider.CreateProtector("Rebus");
}
public byte[] Decrypt(EncryptedData encryptedData)
{
return dataProtector.Unprotect(encryptedData.Bytes);
}
public EncryptedData Encrypt(byte[] bytes)
{
return new EncryptedData(dataProtector.Protect(bytes), Array.Empty<byte>());
}
}
Having added an "dummy" IV it works now, instead of Array.Empty
Enabling
SendBigMessagesAsAttachments
together withStoreInBlobStorage
throws an exception that says "The argument must not be empty string"Our configuration is pretty basic
Full exception