To avoid false positives weak algorithms should not be used (see https://www.drupal.org/node/845876)
Affected code:
docroot/modules/contrib/captcha/src/Element/Captcha.php 117
Solution:
use Drupal’s hashBase64 methods:
\Drupal\Component\Utility\Crypt::hashBase64($data)
\Drupal\Component\Utility\Crypt::hmacBase64($data, $key)
Comments
Comment #2
omkar06 commentedComment #3
omkar06 commentedAttaching revised patch.
Comment #4
nileshlohar commentedUpdated patch.
Comment #5
heine commentedWould it not make more sense to directly use Crypt::randomBytesBase64() ?
Comment #6
nileshlohar commentedThanks @Heine.
It makes sense.
Updating the patch.
Comment #7
omkar06 commentedPatch provided on #6 tested on local and it looks working as expected.
Comment #8
wundo commentedComment #9
wundo commentedComment #11
wundo commented