Skip to content

Webhook for "Issue Comment" contains no secret #4732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 7 tasks
maltehol opened this issue Aug 16, 2018 · 3 comments · Fixed by #5199
Closed
2 of 7 tasks

Webhook for "Issue Comment" contains no secret #4732

maltehol opened this issue Aug 16, 2018 · 3 comments · Fixed by #5199
Labels
Milestone

Comments

@maltehol
Copy link

  • Gitea version (or commit ref): 1.5
  • Git version: 2.1.4
  • Operating system: Raspbian
  • Database (use [x]):
    • PostgreSQL
    • MySQL (MariaDB)
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When setting up webhooks in gitea, I expect that every hook uses the secret one chooses.
But for issue_comment there is no secret field in the json which is send out.

The send json:

{
  "action": "created",
  "issue": {
    "id": 23,
    "url": "<url>",
    "number": 11,
    "user": {
      // User Object
    },
    "title": "123",
    "body": "",
    "labels": [],
    "milestone": null,
    "assignee": null,
    "assignees": null,
    "state": "open",
    "comments": 0,
    "created_at": "2018-08-13T08:39:29Z",
    "updated_at": "2018-08-16T16:44:36Z",
    "closed_at": null,
    "due_date": null,
    "pull_request": null
  },
  "comment": {
    "id": 42,
    "html_url": "<html_url>",
    "pull_request_url": "",
    "issue_url": "<issue_url>",
    "user": {
      // User object
    },
    "body": "No secret?",
    "created_at": "2018-08-16T16:44:36Z",
    "updated_at": "2018-08-16T16:44:36Z"
  },
  "repository": {
    "id": 6,
    "owner": {
      // User object
    },
    "name": "hook-test",
    "full_name": "mh/hook-test",
    "description": "",
    "empty": false,
    "private": true,
    "fork": false,
    "parent": null,
    "mirror": false,
    "size": 128,
    "html_url": "<html_url>",
    "ssh_url": "<ssh_url>",
    "clone_url": "<clone_url>",
    "website": "",
    "stars_count": 0,
    "forks_count": 0,
    "watchers_count": 1,
    "open_issues_count": 7,
    "default_branch": "master",
    "created_at": "2018-08-12T09:50:19Z",
    "updated_at": "2018-08-13T10:59:50Z",
    "permissions": {
      "admin": true,
      "push": true,
      "pull": true
    }
  },
  "sender": {
    // User object
  }
}

To reproduce:

  • Create a webhook in gitea, choose "Custom Events...." -> "Issue Comment"
  • Add a comment to a arbitrary issue in that repo
  • Edit the webhook and look at "Recent Deliveries"
@OvermindDL1
Copy link
Contributor

Confirmed issue still exists as of commit bd1bf2a.

@adelowo
Copy link
Member

adelowo commented Sep 10, 2018

Would take a look at this tomorrow

@AuspeXeu
Copy link

Similar to #5173

appleboy pushed a commit to go-gitea/go-sdk that referenced this issue Oct 27, 2018
)

affects webhooks for:
* Delete
* Fork
* IssueComment
* Release

Resolves: go-gitea/gitea#4732, go-gitea/gitea#5173
Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de>
@lunny lunny reopened this Oct 27, 2018
@lunny lunny added this to the 1.7.0 milestone Oct 27, 2018
lafriks pushed a commit that referenced this issue Oct 30, 2018
…5208)

* Updated dependency manager via `dep ensure -update code.gitea.io/sdk`
* Gopkg.toml was not changed as sdk version is set to "master"
* affects webhooks for: Delete, Fork, IssueComment, Release
* also contains changes from go-gitea/go-sdk#125 and hence a swagger update

Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de>
Resolves: #4732, #5173
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
6 participants