Make WordPress Core

Changeset 59541


Ignore:
Timestamp:
12/19/2024 03:42:32 AM (5 months ago)
Author:
SergeyBiryukov
Message:

Privacy: Replace hardcoded MD5 references in wp_credits_section_list().

The Credits API has been updated to return SHA-256 email hashes.

Follow-up to [59532], [meta14307].

Props haozi.
Fixes #62706, #60638.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/credits.php

    r58813 r59541  
    148148                echo '<a href="' . esc_url( sprintf( $credits_data['profiles'], $person_data[2] ) ) . '" class="web">';
    149149                $size   = $compact ? 80 : 160;
    150                 $data   = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
    151                 $data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size * 2 ) );
     150                $data   = get_avatar_data( $person_data[1] . '@sha256.gravatar.com', array( 'size' => $size ) );
     151                $data2x = get_avatar_data( $person_data[1] . '@sha256.gravatar.com', array( 'size' => $size * 2 ) );
    152152                echo '<span class="wp-person-avatar"><img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" /></span>' . "\n";
    153153                echo esc_html( $person_data[0] ) . "</a>\n\t";
Note: See TracChangeset for help on using the changeset viewer.