Merge pull request #1418 from FlowiseAI/bugfix/Credential-Decrypt

Bugfix/Change encryption key path
This commit is contained in:
Henry Heng
2023-12-21 14:38:09 +00:00
committed by GitHub
2 changed files with 2 additions and 11 deletions
+1 -10
View File
@@ -428,16 +428,7 @@ export const getEnvironmentVariable = (name: string): string | undefined => {
* @returns {string}
*/
const getEncryptionKeyFilePath = (): string => {
const checkPaths = [
path.join(__dirname, '..', '..', 'encryption.key'),
path.join(__dirname, '..', '..', 'server', 'encryption.key'),
path.join(__dirname, '..', '..', '..', 'encryption.key'),
path.join(__dirname, '..', '..', '..', 'server', 'encryption.key'),
path.join(__dirname, '..', '..', '..', '..', 'encryption.key'),
path.join(__dirname, '..', '..', '..', '..', 'server', 'encryption.key'),
path.join(__dirname, '..', '..', '..', '..', '..', 'encryption.key'),
path.join(__dirname, '..', '..', '..', '..', '..', 'server', 'encryption.key')
]
const checkPaths = [path.join(getUserHome(), '.flowise', 'encryption.key')]
for (const checkPath of checkPaths) {
if (fs.existsSync(checkPath)) {
return checkPath