Polyman Documentation - v3.1.0
    Preparing search index...

    Function assertPlainName

    • Rejects names Polygon returns that are not a plain file name, so a hostile or corrupted name such as ../../x cannot make us write outside the problem directory.

      Parameters

      • name: string

        A file or language name received from Polygon

      Returns string

      The same name

      When the name contains a path separator or a control character, or is ./../empty