Error when accessing git read-only archive

Jan-Benedict Glaw jbglaw@lug-owl.de
Wed Sep 15 18:34:20 GMT 2021


Hi,

On Wed, 2021-09-15 16:10:50 +0200, Mark Wielaard <mark@klomp.org> wrote:
[UTF-8 email address containing a 'ł']
> The issue is the gravatar support, which calls md5_hex($email).
> For now I disabled gravatar support on sourceware.org/gcc.gnu.org in
> /etc/gitweb.conf

I am not a Perl guy, but it seems this works (tested locally):


--- a/gitweb/gitweb.perl	2021-09-15 20:23:13.788195846 +0200
+++ b/gitweb/gitweb.perl	2021-09-15 20:24:19.911806868 +0200
@@ -2193,7 +2193,7 @@
 	my $size = shift;
 	$avatar_cache{$email} ||=
 		"//www.gravatar.com/avatar/" .
-			md5_hex($email) . "?s=";
+			md5_hex(utf8::is_utf8($email)? Encode::encode_utf8($email): $email) . "?s=";
 	return $avatar_cache{$email} . $size;
 }
 

I'll send that to the GIT mailing list and ask for verification.

Thanks,
  Jan-Benedict

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20210915/ccfdfa29/attachment.sig>


More information about the Gcc mailing list