stop supporting md5 checksum
This prevents a downgrade attack. Closes Homebrew/homebrew#38433. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
631742c527
commit
c9e45b9c26
@ -18,11 +18,9 @@ end
|
||||
|
||||
class Pathname
|
||||
def md5
|
||||
require 'digest/md5'
|
||||
opoo <<-EOS.undent
|
||||
MD5 support is deprecated and will be removed in a future version.
|
||||
Please switch this formula to #{Checksum::TYPES.map { |t| t.to_s.upcase } * ' or '}.
|
||||
odie <<-EOS.undent
|
||||
MD5 support has been dropped for security reasons.
|
||||
Please switch this formula to SHA256.
|
||||
EOS
|
||||
incremental_hash(Digest::MD5)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user