Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Handle nil err

Neeraj Gupta68ac911162c0
diff --git a/server/pkg/utils/crypto/crypto.go b/server/pkg/utils/crypto/crypto.go
index d659ba1989..0d84e05db8 100644
--- a/server/pkg/utils/crypto/crypto.go
+++ b/server/pkg/utils/crypto/crypto.go
@@ -47,7 +47,7 @@ func encryptWithNonce(data string, encryptionKey []byte, nonce []byte) (ente.Enc
if base64.StdEncoding.EncodeToString(nativeEnc.Cipher) != base64.StdEncoding.EncodeToString(encryptedEmailBytes) ||
base64.StdEncoding.EncodeToString(nativeEnc.Nonce) != base64.StdEncoding.EncodeToString(nonce) {
logrus.WithField("op", "crypto_compare").Error("encryption mismatch between libsodium and native implementation")
- return ente.EncryptionResult{}, stacktrace.Propagate(err, "encryption mismatch")
+ return ente.EncryptionResult{}, stacktrace.NewError("encryption mismatch", " nonce or cipher not same")
}
return nativeEnc, nil
}