Fix snake case mismatching
This commit is contained in:
@@ -226,7 +226,7 @@ router.post(
|
|||||||
authType,
|
authType,
|
||||||
credentialId,
|
credentialId,
|
||||||
key,
|
key,
|
||||||
keyPassword,
|
key_password,
|
||||||
keyType,
|
keyType,
|
||||||
pin,
|
pin,
|
||||||
enableTerminal,
|
enableTerminal,
|
||||||
@@ -274,7 +274,7 @@ router.post(
|
|||||||
if (effectiveAuthType === "password") {
|
if (effectiveAuthType === "password") {
|
||||||
sshDataObj.password = password || null;
|
sshDataObj.password = password || null;
|
||||||
sshDataObj.key = null;
|
sshDataObj.key = null;
|
||||||
sshDataObj.key_password = null;
|
sshDataObj.keyPassword = null;
|
||||||
sshDataObj.keyType = null;
|
sshDataObj.keyType = null;
|
||||||
} else if (effectiveAuthType === "key") {
|
} else if (effectiveAuthType === "key") {
|
||||||
sshDataObj.key = key || null;
|
sshDataObj.key = key || null;
|
||||||
@@ -284,7 +284,7 @@ router.post(
|
|||||||
} else {
|
} else {
|
||||||
sshDataObj.password = null;
|
sshDataObj.password = null;
|
||||||
sshDataObj.key = null;
|
sshDataObj.key = null;
|
||||||
sshDataObj.key_password = null;
|
sshDataObj.keyPassword = null;
|
||||||
sshDataObj.keyType = null;
|
sshDataObj.keyType = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ router.put(
|
|||||||
authType,
|
authType,
|
||||||
credentialId,
|
credentialId,
|
||||||
key,
|
key,
|
||||||
keyPassword,
|
key_password,
|
||||||
keyType,
|
keyType,
|
||||||
pin,
|
pin,
|
||||||
enableTerminal,
|
enableTerminal,
|
||||||
@@ -458,7 +458,7 @@ router.put(
|
|||||||
sshDataObj.password = password;
|
sshDataObj.password = password;
|
||||||
}
|
}
|
||||||
sshDataObj.key = null;
|
sshDataObj.key = null;
|
||||||
sshDataObj.key_password = null;
|
sshDataObj.keyPassword = null;
|
||||||
sshDataObj.keyType = null;
|
sshDataObj.keyType = null;
|
||||||
} else if (effectiveAuthType === "key") {
|
} else if (effectiveAuthType === "key") {
|
||||||
if (key) {
|
if (key) {
|
||||||
@@ -474,7 +474,7 @@ router.put(
|
|||||||
} else {
|
} else {
|
||||||
sshDataObj.password = null;
|
sshDataObj.password = null;
|
||||||
sshDataObj.key = null;
|
sshDataObj.key = null;
|
||||||
sshDataObj.key_password = null;
|
sshDataObj.keyPassword = null;
|
||||||
sshDataObj.keyType = null;
|
sshDataObj.keyType = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -711,7 +711,7 @@ router.get(
|
|||||||
authType: resolvedHost.authType,
|
authType: resolvedHost.authType,
|
||||||
password: resolvedHost.password || null,
|
password: resolvedHost.password || null,
|
||||||
key: resolvedHost.key || null,
|
key: resolvedHost.key || null,
|
||||||
keyPassword: resolvedHost.keyPassword || null,
|
key_password: resolvedHost.key_password || null,
|
||||||
keyType: resolvedHost.keyType || null,
|
keyType: resolvedHost.keyType || null,
|
||||||
folder: resolvedHost.folder,
|
folder: resolvedHost.folder,
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
@@ -17,26 +17,18 @@ class FieldCrypto {
|
|||||||
private static readonly ENCRYPTED_FIELDS = {
|
private static readonly ENCRYPTED_FIELDS = {
|
||||||
users: new Set([
|
users: new Set([
|
||||||
"password_hash",
|
"password_hash",
|
||||||
"passwordHash",
|
|
||||||
"client_secret",
|
"client_secret",
|
||||||
"clientSecret",
|
|
||||||
"totp_secret",
|
"totp_secret",
|
||||||
"totpSecret",
|
|
||||||
"totp_backup_codes",
|
"totp_backup_codes",
|
||||||
"totpBackupCodes",
|
|
||||||
"oidc_identifier",
|
"oidc_identifier",
|
||||||
"oidcIdentifier",
|
|
||||||
]),
|
]),
|
||||||
ssh_data: new Set(["password", "key", "key_password", "keyPassword"]),
|
ssh_data: new Set(["password", "key", "key_password"]),
|
||||||
ssh_credentials: new Set([
|
ssh_credentials: new Set([
|
||||||
"password",
|
"password",
|
||||||
"private_key",
|
"private_key",
|
||||||
"privateKey",
|
|
||||||
"key_password",
|
"key_password",
|
||||||
"keyPassword",
|
|
||||||
"key",
|
"key",
|
||||||
"public_key",
|
"public_key",
|
||||||
"publicKey",
|
|
||||||
]),
|
]),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user