mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix
This commit is contained in:
@@ -12,19 +12,13 @@ export function applyStorageEncryption(
|
|||||||
if (!masterKey) return;
|
if (!masterKey) return;
|
||||||
if (!Array.isArray(entry.storages) || entry.storages.length === 0) return;
|
if (!Array.isArray(entry.storages) || entry.storages.length === 0) return;
|
||||||
if (!isAgentVersionAtLeast(version, MIN_AGENT_VERSION_STORAGE_ENC)) {
|
if (!isAgentVersionAtLeast(version, MIN_AGENT_VERSION_STORAGE_ENC)) {
|
||||||
log.warn(
|
console.log(
|
||||||
{
|
`============================================================\n` +
|
||||||
name: "applyStorageEncryption",
|
|
||||||
agentId,
|
|
||||||
agentVersion: version ?? "unknown",
|
|
||||||
requiredVersion: MIN_AGENT_VERSION_STORAGE_ENC,
|
|
||||||
},
|
|
||||||
`\n============================================================\n` +
|
|
||||||
`⚠️OUTDATED AGENT — STORAGE CREDENTIALS SENT UNENCRYPTED\n` +
|
`⚠️OUTDATED AGENT — STORAGE CREDENTIALS SENT UNENCRYPTED\n` +
|
||||||
`Agent ${agentId} reports v${version ?? "unknown"} (< required v${MIN_AGENT_VERSION_STORAGE_ENC}).\n` +
|
`Agent ${agentId} reports v${version ?? "unknown"} (< required v${MIN_AGENT_VERSION_STORAGE_ENC}).\n` +
|
||||||
`Update this agent to v${MIN_AGENT_VERSION_STORAGE_ENC}+ to encrypt storage credentials in transit.\n` +
|
`Update this agent to v${MIN_AGENT_VERSION_STORAGE_ENC}+ to encrypt storage credentials in transit.\n` +
|
||||||
`============================================================`,
|
`============================================================`
|
||||||
);
|
)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
import pino, { type Logger } from "pino";
|
import pino, { type Logger } from "pino";
|
||||||
|
|
||||||
const isProd = process.env.NODE_ENV === "production";
|
// const isProd = process.env.NODE_ENV === "production";
|
||||||
|
const isProd =true;
|
||||||
const defaultLevel = isProd ? "info" : "debug";
|
const defaultLevel = isProd ? "info" : "debug";
|
||||||
const level = (process.env.LOG_LEVEL ?? defaultLevel) as pino.Level;
|
const level = (process.env.LOG_LEVEL ?? defaultLevel) as pino.Level;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user