Skip to content

Commit

Permalink
Privacy: Replace hardcoded MD5 references in `wp_credits_section_list…
Browse files Browse the repository at this point in the history
…()`.

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

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

Props haozi.
Fixes #62706, #60638.

git-svn-id: https://develop.svn.wordpress.org/trunk@59541 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Dec 19, 2024
1 parent 9e4b268 commit 17b50d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wp-admin/includes/credits.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ function wp_credits_section_list( $credits = array(), $slug = '' ) {
echo '<li class="wp-person" id="wp-person-' . esc_attr( $person_data[2] ) . '">' . "\n\t";
echo '<a href="' . esc_url( sprintf( $credits_data['profiles'], $person_data[2] ) ) . '" class="web">';
$size = $compact ? 80 : 160;
$data = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size ) );
$data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size * 2 ) );
$data = get_avatar_data( $person_data[1] . '@sha256.gravatar.com', array( 'size' => $size ) );
$data2x = get_avatar_data( $person_data[1] . '@sha256.gravatar.com', array( 'size' => $size * 2 ) );
echo '<span class="wp-person-avatar"><img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" /></span>' . "\n";
echo esc_html( $person_data[0] ) . "</a>\n\t";
if ( ! $compact && ! empty( $person_data[3] ) ) {
Expand Down

0 comments on commit 17b50d3

Please sign in to comment.