Skip to content

Forbid special characters in object names #10566

@yhabteab

Description

@yhabteab

Describe the bug

Currently, Icinga 2 allows any characters in object names, which can lead to issues with certain characters that have special meanings in various contexts (e.g., backslashes, carriage returns, line feeds, newlines etc.). For example, to my limited knowledge, no one uses intentionally a newline char in object names, but since Icinga 2 allows it, he don't even notice it until some of the components (e.g., perf data writers) start to misbehave. Apart from that, Icinga Web 2 doesn't even allow such characters in object names, so if you try to open the object detail page of an object with a newline in its name, you'll be greeted with this.

Image

So, I propose to forbid all special characters in object names, or at least the ones that are known to cause issues.

ref/IP/60981

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/configurationDSL, parser, compiler, error handlingbugSomething isn't workingref/IP

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions