mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 13:56:43 +00:00
fix(secrets-service): throw on invalid env / path
This commit is contained in:
@@ -97,6 +97,7 @@ import {
|
||||
} from "./secret-types";
|
||||
import { TSecretVersionDALFactory } from "./secret-version-dal";
|
||||
import { TSecretVersionTagDALFactory } from "./secret-version-tag-dal";
|
||||
import { validateSecretPath } from "../secret-v2-bridge/secret-v2-bridge-fns";
|
||||
|
||||
type TSecretServiceFactoryDep = {
|
||||
secretDAL: TSecretDALFactory;
|
||||
@@ -616,6 +617,15 @@ export const secretServiceFactory = ({
|
||||
actionProjectType: ActionProjectType.SecretManager
|
||||
});
|
||||
|
||||
await validateSecretPath(
|
||||
{
|
||||
projectId,
|
||||
environment,
|
||||
secretPath: path
|
||||
},
|
||||
folderDAL
|
||||
);
|
||||
|
||||
let paths: { folderId: string; path: string }[] = [];
|
||||
|
||||
if (recursive) {
|
||||
|
||||
Reference in New Issue
Block a user