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

Add backslash to list of 'crud' characters in real name

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Dec 1, 2008, 16:41 UTC
Message-ID
<alpine.LFD.2.00.0812010836280.3256@nehalem.linux-foundation.org>

We remove crud characters at the beginning and end of real-names so that when we see email addresses like

	From: "David S. Miller" <davem@davemloft.net>

we drop the quotes around the name when we parse that and split it up into name and email.

However, the list of crud characters was basically just a random list of common things that are found around names, and it didn't contain the backslash character that some insane scripts seem to use when quoting things. So now the kernel has a number of authors listed like

	Author: \"Rafael J. Wysocki\ <rjw@sisk.pl>
because the author name had started out as
	From: \"Rafael J. Wysocki\" <rjw@sisk.pl>

and the only "crud" character we noticed and removed was the final double-quote at the end.

We should probably do better quote removal from names anyway, but this is the minimal obvious patch.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 ident.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/ident.c b/ident.c
index 09cf0c9..99f1c85 100644
--- a/ident.c
+++ b/ident.c
@@ -121,6 +121,7 @@ static int crud(unsigned char c)
 		c == '<' ||
 		c == '>' ||
 		c == '"' ||
+		c == '\\' ||
 		c == '\'';
 }
 
Message 1 of 1 in “Add backslash to list of 'crud' characters in real name”
  1. Linus TorvaldsDec 1, 2008

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.