@hashgraph/solo
    Preparing search index...
    Index

    Constructors

    Methods

    • Joins the given paths. This is a wrapper around path.join. It is recommended to only use this when you are dealing with part of a path that is not a complete path reference on its own.

      This method is not safe unless literals are used as parameters. Use this instead of path.join(...) directly when you cannot confine a user to a base directory. It is best to avoid using user input directly for constructing paths. If you must use user input, it is recommended to use PathEx.safeJoinWithBaseDirConfinement(...) to join paths.

      For more information see: https://owasp.org/www-community/attacks/Path_Traversal

      Parameters

      • ...paths: string[]

      Returns string

    • This method requires that the path to a directory or file is real and exists.

      This method is not safe. Use this instead of path.join(...) directly when you cannot confine a user to a base directory. It is best to avoid using user input directly for constructing paths. If you must use user input, it is recommended to use PathEx.safeJoinWithBaseDirConfinement(...) to join paths.

      For more information see: https://owasp.org/www-community/attacks/Path_Traversal

      Parameters

      • ...paths: string[]

        The paths to join

      Returns string

    • This method requires that the path to a directory or file is real and exists.

      This method is not safe unless a literal is used as the parameter.

      Parameters

      • path: string

      Returns string

    • Resolves the given paths. This is a wrapper around path.resolve. It is recommended to only use this when you are dealing with part of a path that is not a complete path reference on its own.

      This method is not safe unless literals are used as parameters. Use this instead of path.resolve(...) directly when you cannot confine a user to a base directory.

      For more information see: https://owasp.org/www-community/attacks/Path_Traversal

      Parameters

      • ...paths: string[]

      Returns string

    • Securely joins paths while preventing path traversal attacks. Requires that the base directory is real and exists. This method requires that the path to a directory or file is real and exists.

      Parameters

      • baseDirectory: string

        The base directory to enforce

      • ...paths: string[]

        The paths to join

      Returns string

      The safely joined path.

      Error if the resolved path is outside the base directory.