Skip to content

check/sanitize committer/author e-Mail address #680

@moson-mo

Description

@moson-mo

git is stripping some characters from the name/email address like <, >, \n
https://git-scm.com/docs/git-commit#_commit_information

With go-git if we do something like this (see Email field):

w.Commit("bad commit", &git.CommitOptions{
	Author: &object.Signature{
		Name:  "Wooops",
		Email: "<",
		When:  time.Now(),
	},
})

We'll end up with git fsck errors like:

error in commit 438bfa0c6212aea91d9d7af14e8e5fe405c0d6b4: badEmail: invalid author/committer line - bad email

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is neededno-autocloseIssues/PRs to be ignored by stale bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy