• Lukas 'Eipi' Eipert's avatar
    Change hashing algorithm in webpack · 8d42ec95
    Lukas 'Eipi' Eipert authored
    Webpack internally defaults to md4 hashing because it is fast.
    Similarly some loaders (e.g. cache-loader) use md5. This is generally no
    problem because they are mainly used for file hashes and nothing
    cryptography related.
    
    Unfortunately FIPS enabled versions of node do not allow to use these
    hasing algorithms because they are considered broken by cryptographic
    standards. All of these cryptographic functions come from openssl. So if
    one uses md4 or md5 on a FIPS enabled system, the webpack process will
    error.
    
    Luckily we can just monkey-patch the createHash function in node in
    order to use another algorithm. Thanks to this comment:
    https://github.com/webpack/webpack/issues/13572#issuecomment-923736472
    
    See also: https://gitlab.com/gitlab-org/gitlab/-/issues/322883
    
    Changelog: changed
    8d42ec95
vendor_dll_hash.js 598 Bytes