You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nix accepts outputHash values that resemble the SRI hash format but use invalid hash-algo values, such as md5 or sha1. (hash-algo refering to the term in the SRI grammar)
Nix should error out, probably with something like « 'md5' is not an SRI hash algorithm. »
nix-env --version output
nix-env (Nix) 2.17.0
Additional context
The SRI hash format's specification refers to “CSP Level 2” for the definition of hash-algo and base64-value, as used in its grammar. In turn, the CSP spec defines hash-algo to be one of sha256, sha384 or sha512.
User agents SHOULD refuse to support known-weak hashing functions like MD5 or SHA-1 and SHOULD restrict supported hashing functions to those known to be collision-resistant.
Describe the bug
Nix accepts
outputHash
values that resemble the SRI hash format but use invalidhash-algo
values, such asmd5
orsha1
. (hash-algo
refering to the term in the SRI grammar)Steps To Reproduce
Evaluate the following expressions:
Expected behavior
Nix should error out, probably with something like « 'md5' is not an SRI hash algorithm. »
nix-env --version
outputnix-env (Nix) 2.17.0
Additional context
hash-algo
andbase64-value
, as used in its grammar. In turn, the CSP spec defineshash-algo
to be one ofsha256
,sha384
orsha512
.Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: