Skip to content

Project Manager allows to add assets with new line characters #534

Open
@BigRoy

Description

@BigRoy

What happened?

Somehow it's possible to add/create a new Avalon asset using the project manager that includes a new line character \n. It somehow manages to pass validation.

What did you expect?

This should never get through.

To Reproduce

E.g. copy past the text below including the new line:

invalid

Note how you can create an asset using this.

Additional context

It should not pass the schema.validate check which it magically does. Trying to create a name with a space in it does get captured correctly, however the schema does not invalidate a new line.

It only passes if the new line is at the end of the string. Even adding a space after it makes it fail.

Below examples are written with the escape characters explicitly written, when entering these in the asset name field copy pasting won't reproduce the same behavior. \n must be a new line, \t must be a tab (not spaces).

This incorrrectly passes validation:
invalid\n

This is correctly disallowed:
invalid\n (note space after \n)
invalid\t
invalid\naa
\ninvalid
\tinvalid

I'm not sure why it allows the \n at the end of the name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions