git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH RFC] gitweb: Handle non-ASCII email addresses

From
JGJan-Benedict Glaw <jbglaw@lug-owl.de>
Date
Sep 15, 2021, 19:26 UTC
Message-ID
<20210915192647.6fnk7ktwldz7uubf@lug-owl.de>
Hi!

I accidentally had a bad user.email setting ("jbglaw@ług-owl.de" instead of "jbglaw@lug-owl.de") and this leads to incomplete HTML being generated by gitweb, along with an error message:

index.cgi: Wide character in subroutine entry at /usr/share/gitweb/index.cgi line 2208.
This patch may fix it, but I'm NOT a Perl guy:
--- 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;
 }


Comments?

Thanks,
  Jan-Benedict
Next: Jan-Benedict Glaw
Message 1 of 2 in “gitweb: Handle non-ASCII email addresses”
  1. gitweb: Handle non-ASCII email addressesJan-Benedict Glaw, Sep 15, 2021
  2. *ping* [PATCH RFC] gitweb: Handle non-ASCII email addressesJan-Benedict Glaw, Sep 22, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.