mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 15:40:47 +00:00
review fixes
This commit is contained in:
@@ -52,7 +52,7 @@ export const HCVaultSyncFns = {
|
||||
const variables = await listHCVaultVariables({ instanceUrl, accessToken, mount, path });
|
||||
let tainted = false;
|
||||
|
||||
for await (const entry of Object.entries(secretMap)) {
|
||||
for (const entry of Object.entries(secretMap)) {
|
||||
const [key, { value }] = entry;
|
||||
if (value !== variables[key]) {
|
||||
variables[key] = value;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import RE2 from "re2";
|
||||
import { z } from "zod";
|
||||
|
||||
import { SecretSyncs } from "@app/lib/api-docs";
|
||||
@@ -20,8 +21,8 @@ const HCVaultSyncDestinationConfigSchema = z.object({
|
||||
.string()
|
||||
.trim()
|
||||
.min(1, "Path required")
|
||||
.transform((val) => val.trim().replace(/^\/+|\/+$/g, "")) // removes leading/trailing slashes
|
||||
.refine((val) => /^([a-zA-Z0-9._-]+\/)*[a-zA-Z0-9._-]+$/.test(val), {
|
||||
.transform((val) => val.replace(/^\/+|\/+$/g, "")) // removes leading/trailing slashes
|
||||
.refine((val) => new RE2("^([a-zA-Z0-9._-]+/)*[a-zA-Z0-9._-]+$").test(val), {
|
||||
message:
|
||||
"Invalid Vault path format. Use alphanumerics, dots, dashes, underscores, and single slashes between segments."
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user