-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing name validation on object names at update #5434
Conversation
@@ -427,6 +427,8 @@ export class ObjectMetadataService extends TypeOrmQueryService<ObjectMetadataEnt | |||
input: UpdateOneObjectInput, | |||
workspaceId: string, | |||
): Promise<ObjectMetadataEntity> { | |||
validateObjectMetadataInput(input.update); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validateObjectMetadataInputOrThrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or if (!isValidObjectMetadataInput) { throw } )
try { | ||
if (objectMetadataInput.nameSingular) { | ||
validateMetadataName(objectMetadataInput.nameSingular); | ||
validateNameCharacters(objectMetadataInput.nameSingular); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also add orThrow here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
## Context as per title ## How was it tested? local (/metadata + in product)
Context
as per title
How was it tested?
local (/metadata + in product)