mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
Merge pull request #1418 from FlowiseAI/bugfix/Credential-Decrypt
Bugfix/Change encryption key path
This commit is contained in:
@@ -428,16 +428,7 @@ export const getEnvironmentVariable = (name: string): string | undefined => {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
const getEncryptionKeyFilePath = (): string => {
|
const getEncryptionKeyFilePath = (): string => {
|
||||||
const checkPaths = [
|
const checkPaths = [path.join(getUserHome(), '.flowise', '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'),
|
|
||||||
path.join(__dirname, '..', '..', '..', '..', '..', 'encryption.key'),
|
|
||||||
path.join(__dirname, '..', '..', '..', '..', '..', 'server', 'encryption.key')
|
|
||||||
]
|
|
||||||
for (const checkPath of checkPaths) {
|
for (const checkPath of checkPaths) {
|
||||||
if (fs.existsSync(checkPath)) {
|
if (fs.existsSync(checkPath)) {
|
||||||
return checkPath
|
return checkPath
|
||||||
|
|||||||
@@ -859,7 +859,7 @@ export const isFlowValidForStream = (reactFlowNodes: IReactFlowNode[], endingNod
|
|||||||
export const getEncryptionKeyPath = (): string => {
|
export const getEncryptionKeyPath = (): string => {
|
||||||
return process.env.SECRETKEY_PATH
|
return process.env.SECRETKEY_PATH
|
||||||
? path.join(process.env.SECRETKEY_PATH, 'encryption.key')
|
? path.join(process.env.SECRETKEY_PATH, 'encryption.key')
|
||||||
: path.join(__dirname, '..', '..', 'encryption.key')
|
: path.join(getUserHome(), '.flowise', 'encryption.key')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user