Skip to content

Commit a704971

Browse files
committed
fix(validation): reject reserved FQN characters in entity and column names
Fixes #23268 Updated regex patterns in JSON schema definitions to block reserved FQN separator characters (::, >, ") and newlines in entity names. Files changed: - openmetadata-spec/.../type/basic.json: entityName, testCaseEntityName - openmetadata-spec/.../entity/data/table.json: columnName
1 parent 4be1757 commit a704971

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

openmetadata-spec/src/main/resources/json/schema/entity/data/table.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
"description": "Local name (not fully qualified name) of the column. ColumnName is `-` when the column is not named in struct dataType. For example, BigQuery supports struct with unnamed fields.",
236236
"type": "string",
237237
"minLength": 1,
238-
"pattern": "^((?!::).)*$"
238+
"pattern": "^((?!::)[^>\"\n])*$"
239239
},
240240
"partitionIntervalTypes": {
241241
"javaType": "org.openmetadata.schema.type.PartitionIntervalTypes",

openmetadata-spec/src/main/resources/json/schema/type/basic.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@
124124
"type": "string",
125125
"minLength": 1,
126126
"maxLength": 256,
127-
"pattern": "^((?!::).)*$"
127+
"pattern": "^((?!::)[^>\"\n])*$"
128128
},
129129
"testCaseEntityName": {
130130
"description": "Name that identifies a test definition and test case.",
131131
"type": "string",
132132
"minLength": 1,
133-
"pattern": "^((?!::).)*$"
133+
"pattern": "^((?!::)[^>\"\n])*$"
134134
},
135135
"fullyQualifiedEntityName": {
136136
"description": "A unique name that identifies an entity. Example for table 'DatabaseService.Database.Schema.Table'.",

0 commit comments

Comments
 (0)