Skip to content

Revision metadata breaks with | in commit author name #15949

@dosmanak

Description

@dosmanak

Hello, I put | symbol in my git user.name.
I broke the response from revision metadata api of argo server
/api/v1/applications/${reponame}/revisions/${commitid}/metadata?appNamespace=${namespace}

So that it returns

{"author":"PSy ","date":"1970-01-01T00:00:00Z","message":"1689860699|fix: do not use deploy in app label"}

This is cause by https://github.com/argoproj/argo-cd/blob/f8f9ae9accd413b417be1d188418f2b3b7c25e63/util/git/client.go#L632C38-L632C63

resp. the git show format expression --format="%an <%ae>|%at|%B" that is then split by |.

I suggest to rewrite the method without such formatting.

Metadata

Metadata

Labels

bugSomething isn't workingcomponent:gitIssues related to Git, SSH and repository connectiongood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions