claudioc / jingo

Node.js based Wiki
MIT License
1.02k stars 183 forks source link

Author name and email in git commits are incorrect if user's display name contains '<', '>' #240

Open Feufochmar opened 6 years ago

Feufochmar commented 6 years ago

This is an abuse based on the ability on some social networks to change the display name at any moment and use < and > in them. Github allows this for instance.

This issue could be used to hide the real email adress or usurpate the identity of another user when editing the wiki, by setting the display name to something like user <user@example.com>. With this example, the name and email that will be used in git commits are user and user@example.com instead of user <user@example.com> and real.email@example.com.

I'm unsure how this should be corrected, as there is a git limitation. If the name field contains < and > in the .gitconfig file, those are removed in the author's name field when commiting. So a user putting user <user@example.com> in the name field of their .gitconfig will be shown as user user@example.com in commits.

claudioc commented 6 years ago

Urgh... that could really be an issue :/

I will tentatively label this as a bug and will take a deeper look at it. Thanks for reporting.