Skip to content

Commit

Permalink
Fixing bug in transform API validation
Browse files Browse the repository at this point in the history
Signed-off-by: Kshitij Tandon <[email protected]>
  • Loading branch information
tandonks committed Dec 26, 2024
1 parent 08d90b1 commit abb8b3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/routes/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function (services: NodeServices, router: IRouter, dataSourceEnab
params: schema.object({
index: schema.string({
validate: (value) => {
const invalidCharactersPattern = /[\s,:\"*+\/\\|?#><]/;
const invalidCharactersPattern = /[\s,:\"+\/\\|?#><]/;
if (value !== value.toLowerCase() || value.startsWith("_") || value.startsWith("-") || invalidCharactersPattern.test(value)) {
return "Invalid index name.";
}
Expand Down Expand Up @@ -148,7 +148,7 @@ export default function (services: NodeServices, router: IRouter, dataSourceEnab
{
source_index: schema.string({
validate: (value) => {
const invalidCharactersPattern = /[\s,:\"*+\/\\|?#><]/;
const invalidCharactersPattern = /[\s,:\"+\/\\|?#><]/;
if (
value !== value.toLowerCase() ||
value.startsWith("_") ||
Expand Down

0 comments on commit abb8b3c

Please sign in to comment.