mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 02:27:39 +00:00
Vulnerable regex test
This commit is contained in:
@@ -23,7 +23,7 @@ const HCVaultSyncDestinationConfigSchema = z.object({
|
|||||||
.trim()
|
.trim()
|
||||||
.min(1, "Path required")
|
.min(1, "Path required")
|
||||||
.max(128)
|
.max(128)
|
||||||
.transform((val) => new RE2("^/+|/+$", "g").replace(val, "")) // removes leading/trailing slashes
|
.transform((val) => val.replace(/^\/+|\/+$/g, "")) // removes leading/trailing slashes
|
||||||
.refine((val) => new RE2("^([a-zA-Z0-9._-]+/)*[a-zA-Z0-9._-]+$").test(val), {
|
.refine((val) => new RE2("^([a-zA-Z0-9._-]+/)*[a-zA-Z0-9._-]+$").test(val), {
|
||||||
message:
|
message:
|
||||||
"Invalid Vault path format. Use alphanumerics, dots, dashes, underscores, and single slashes between segments."
|
"Invalid Vault path format. Use alphanumerics, dots, dashes, underscores, and single slashes between segments."
|
||||||
|
|||||||
Reference in New Issue
Block a user