mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 19:28:09 +00:00
remove encryptionKey validation check
This commit is contained in:
@@ -29,20 +29,20 @@ export const validateEncryptionKeysConfig = async () => {
|
|||||||
message: "Failed to find required root encryption key environment variable. Please make sure that you're passing in a ROOT_ENCRYPTION_KEY environment variable."
|
message: "Failed to find required root encryption key environment variable. Please make sure that you're passing in a ROOT_ENCRYPTION_KEY environment variable."
|
||||||
});
|
});
|
||||||
|
|
||||||
if (encryptionKey && encryptionKey !== '') {
|
// if (encryptionKey && encryptionKey !== '') {
|
||||||
// validate [encryptionKey]
|
// // validate [encryptionKey]
|
||||||
|
|
||||||
const keyBuffer = Buffer.from(encryptionKey, 'hex');
|
// const keyBuffer = Buffer.from(encryptionKey, 'hex');
|
||||||
const decoded = keyBuffer.toString('hex');
|
// const decoded = keyBuffer.toString('hex');
|
||||||
|
|
||||||
if (decoded !== encryptionKey) throw InternalServerError({
|
// if (decoded !== encryptionKey) throw InternalServerError({
|
||||||
message: 'Failed to validate that the encryption key is correctly encoded in hex.'
|
// message: 'Failed to validate that the encryption key is correctly encoded in hex.'
|
||||||
});
|
// });
|
||||||
|
|
||||||
if (keyBuffer.length !== 16) throw InternalServerError({
|
// if (keyBuffer.length !== 16) throw InternalServerError({
|
||||||
message: 'Failed to validate that the encryption key is a 128-bit hex string.'
|
// message: 'Failed to validate that the encryption key is a 128-bit hex string.'
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (rootEncryptionKey && rootEncryptionKey !== '') {
|
if (rootEncryptionKey && rootEncryptionKey !== '') {
|
||||||
// validate [rootEncryptionKey]
|
// validate [rootEncryptionKey]
|
||||||
|
|||||||
Reference in New Issue
Block a user