web-hook payload corrupted when commit label contain emoji #3591

Closed
opened 2025-11-02 05:18:23 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @koekaverna on GitHub (Jul 15, 2019).

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

Description

I have web-hooks and it works fine.
But after pushing commit with emoji in label (ex. "Test:😀 ⚒")
My hook receives corrupted payload:

{
  "secret": "MySecret",
  "ref": "refs/heads/master",
  "before": "12207931c6be911a76f65524092e1a8ed6933ff2",
  "after": "bfbbc1a2d4d8a968058f7fab58213f36fe865a35",
  "compare_url": "https://git.mygit.net/MyRepo/site/compare/12207931c6be911a76f65524092e1a8ed6933ff2...bfbbc1a2d4d8a968058f7fab58213f36fe865a35",
  "commits": [
    {
      "id": "bfbbc1a2d4d8a968058f7fab58213f36fe865a35",
      "message": "Test:

It ends before emoji.

Originally created by @koekaverna on GitHub (Jul 15, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.8.3 - Git version: 2.20.1 - Operating system: Ubuntu 19.04 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description I have web-hooks and it works fine. But after pushing commit with emoji in label (ex. "Test:😀 ⚒") My hook receives corrupted payload: ``` { "secret": "MySecret", "ref": "refs/heads/master", "before": "12207931c6be911a76f65524092e1a8ed6933ff2", "after": "bfbbc1a2d4d8a968058f7fab58213f36fe865a35", "compare_url": "https://git.mygit.net/MyRepo/site/compare/12207931c6be911a76f65524092e1a8ed6933ff2...bfbbc1a2d4d8a968058f7fab58213f36fe865a35", "commits": [ { "id": "bfbbc1a2d4d8a968058f7fab58213f36fe865a35", "message": "Test: ``` It ends before emoji.
GiteaMirror added the issue/staleissue/needs-feedback labels 2025-11-02 05:18:23 -06:00
Author
Owner

@lunny commented on GitHub (Jul 16, 2019):

Did your mysql database use utf8mb4 and your app.ini has Charset=utf8mb4 option?

@lunny commented on GitHub (Jul 16, 2019): Did your mysql database use `utf8mb4` and your app.ini has `Charset=utf8mb4` option?
Author
Owner

@stale[bot] commented on GitHub (Sep 14, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Sep 14, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Nov 13, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Nov 13, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@lunny commented on GitHub (Nov 13, 2019):

I think this is a configuration problme about mysql utf8mb4.

@lunny commented on GitHub (Nov 13, 2019): I think this is a configuration problme about mysql utf8mb4.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3591