@eagleoutice/flowr - v2.16.3
    Preparing search index...

    Function joinUntrustedSegment

    • Joins base with a single path segment taken from an untrusted source (e.g., a file name, release tag, or hash read from a downloaded or project-supplied file), refusing every segment that could name anything outside base.

      Parameters

      • base: string
      • segment: string

      Returns string

      if the segment is empty, . or .., or contains a path separator or NUL