Skip to content

commitgraph throws err 500 when commit message contains a pipe #1189

Closed
@philfry

Description

@philfry
Contributor
  • Gitea version (or commit ref): 1.1.0+5-gdbcd4527
  • Git version: 2.12.0
  • Operating system: Linux/CentOS7
  • Database (use [x]):
    • PostgreSQL
      MySQL
      MSSQL
      SQLite
  • Can you reproduce the bug at https://try.gitea.io:
  • Log gist:
[...uters/repo/commit.go:92 Graph()] [E] GetCommitGraph: Failed parsing grap line:* DATA:||... - Should containt 8 datafields

Description

steps to reproduce:

touch dummyfile
git add dummyfile
git commit -m "this is a testcommit | containing a pipe"
git push
# view commitgraph

In models/graph.go in GetCommitGraph(r *git.Repository) (GraphItems, error) calls a git log and uses a custom format using pipes as field separators. Later in graphItemFromString(s string, r *git.Repository) (GraphItem, error) the lines get split by that delimiter and the resulting array is being checked whether or not it has exactly 8 elements.
The easiest solution would be to check whether or not the array has at least 8 elements and merge the 8th to nth elements together.

Activity

added this to the 1.2.0 milestone on Mar 10, 2017
added a commit that references this issue on Mar 16, 2017

fix #1189, commit messages containing a pipe (#1218)

2b5e4b4
added a commit that references this issue on Apr 29, 2017

fix go-gitea#1189, commit messages containing a pipe (go-gitea#1218)

f6b8238
locked and limited conversation to collaborators on Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lunny@philfry

        Issue actions

          commitgraph throws err 500 when commit message contains a pipe · Issue #1189 · go-gitea/gitea