mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 00:29:34 +00:00
feat: better error notification for dynamic secret
This commit is contained in:
@@ -19,3 +19,11 @@ export const prefixWithSlash = (str: string) => {
|
||||
const vowelRegex = new RE2(/^[aeiou]/i);
|
||||
|
||||
export const startsWithVowel = (str: string) => vowelRegex.test(str);
|
||||
|
||||
export const sanitizeString = (dto: { unsanitizedString: string; tokens: string[] }) => {
|
||||
let sanitizedString = dto.unsanitizedString;
|
||||
dto.tokens.filter(Boolean).forEach((el) => {
|
||||
sanitizedString = sanitizedString.replaceAll(el, "[REDACTED]");
|
||||
});
|
||||
return sanitizedString;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user