Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
A few places in core use crc32 for non-cryptographic hashing.
PHP's crc32() produces a signed int, which means it is not portable between 32 and 64 bit platforms. http://php.net/manual/en/function.crc32.php
Proposed resolution
Use hash('crc32b') instead.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | 2546680_crc32.patch | 2.38 KB | catch |
Comments
Comment #2
catchComment #3
longwaveDrupalKernel already uses hash('crc32b'), this fixes the other three instances to match.
Comment #4
Wim LeersWow, I had no idea PHP had such 32 vs. 64 bit distinctions! This would've lead to very, very, very hard-to-track-down bugs. Un-RTBC'd #2542830: Change placeholder token generation from using sha1 to crc32b to fix it there too.
Comment #5
alexpottThis issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 3f1ba54 and pushed to 8.0.x. Thanks!