Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

interpolateName: Hash regex incorrectly mingles other values into the hash value #136

@techjoshua

Description

@techjoshua

/\[(?:([^:]+):)?(?:hash||contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi,

Regex fails for values like: [name].[md5:hash:base64:20].[ext]...
getHashDigest() is called with a hashType = 'name].[md5'

I suggest changing the regex to exclude closing brackets, like:

/\[(?:([^:\]]+):)?(?:hash||contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi
          ^^ added

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions