Skip to content
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

Adaguc-server configuration: Validate allowed characters in style and legend names during scanning #283

Open
maartenplieger opened this issue Aug 23, 2023 · 0 comments

Comments

@maartenplieger
Copy link
Member

Style and legend names are identifiers used in urls. We have seen style names in configurations with invalid tokens.

Validate stylenames, e.g. The stylename should not contain escapable characters like <, \ , /, >, (, ), etc.

The following style should be considered invalid:

  <Style name="dBZ>0(3D)">
    <Legend fixedclasses="true" tickinterval="10">dBZ>0(3D)</Legend>
    <Min>0</Min>
    <Max>80</Max>
    <ValueRange min="-50" max="80" />
    <RenderMethod>nearest,bilinear</RenderMethod>
    <NameMapping name="nearest" title="dBZ>0, nearest" abstract="Nearest neighbour interpolation"/>
    <NameMapping name="bilinear" title="dBZ>0, bilinear" abstract="Bilinear interpolation"/>
  </Style>

Instead it should be:

  <Style name="dBZ_more_than_0_3D">
    <Legend fixedclasses="true" tickinterval="10">dBZ_more_than_0_3D</Legend>
    <Min>0</Min>
    <Max>80</Max>
    <ValueRange min="-50" max="80" />
    <RenderMethod>nearest,bilinear</RenderMethod>
    <NameMapping name="nearest" title="dBZ>0, nearest" abstract="Nearest neighbour interpolation"/>
    <NameMapping name="bilinear" title="dBZ>0, bilinear" abstract="Bilinear interpolation"/>
  </Style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant