Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
other
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Jan 2013 at 03:01 UTC
Updated:
14 Jul 2021 at 22:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
pwolanin commentedComment #3
pwolanin commentedComment #4
pwolanin commentedComment #7
mgiffordcore/lib/Drupal/Component/Diff/Engine/DiffEngine.php: return md5($line);
core/lib/Drupal/Core/Password/PhpassHashedPassword.php: $password = md5($password);
Also it's in a few vendor libraries too.
Comment #8
mgiffordDecided to skip PhpassHashedPassword.php as there's logic there for sha256 too.
Comment #9
dawehnerYeah, that change there totally makes sense.
Comment #10
alexpottDebating the
md5()has been done and whilst there is no need for a cryptographic hash here this is the only case ofmd5()outside of dealing with old passwords. However in other places we're usinghash('crc32b', $value);where a hash is need for non-cryptographic purposes.Comment #11
cilefen commentedComment #20
lendudeReroll.
Is this still something we want to fix?
Comment #21
lendudeNow with the actual patch....
Comment #22
lendudeSheesh, now with the actual patch that actually contains data....
Comment #23
quietone commentedThe referenced doc page says to use \Drupal\Component\Utility\Crypt::hashBase64($data). Shouldn't that be used?
Comment #24
alexpott@quietone this is a non cryptographic hash so as per issue summary crc32b will do.
Comment #25
alexpottThis will only happen in D9 now...
Comment #26
quietone commented@alexpott, thanks. I wasn't sure.
OK. Then I guess this can go to RTBC.
Comment #27
alexpottEventually we should move to xxHash for non-cryptographic hashes - once the minimum version is PHP 8.1 - see https://php.watch/versions/8.1/xxHash
Comment #28
alexpottCommitted abc2310bb7 and pushed to 9.3.x. Thanks!
Whilst this is categorised as a bug I think it is okay to fix in 9.3.x only.