# Webhook sends wrong/incomplete file path

**URL:** <https://forum.gitea.com/t/webhook-sends-wrong-incomplete-file-path/2823>\
**Category:** Install/Maintain/Configure\
**Created:** [January 5, 2021, 10:37am UTC](https://forum.gitea.com/t/webhook-sends-wrong-incomplete-file-path/2823 "2021-01-05T10:37:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![msklenicka](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/msklenicka/32/1097_2.png) [@msklenicka](https://forum.gitea.com/u/msklenicka)\
**Post date:** [January 5, 2021, 10:37am UTC](https://forum.gitea.com/t/webhook-sends-wrong-incomplete-file-path/2823/1 "2021-01-05T10:37:49Z")

</div>

Hello, we started to use webhook gitea feature , and we discovered one “strange” behavior. When Path to modified file contains SPACE, then gitea sends incomplete path in commits.modified.  
Here is JSON example:  
{  
“secret”: “”,  
“ref”: “refs/heads/master”,  
“before”: “aed0bef8b7ef905893e815ebf2a25bceaddc159d”,  
“after”: “66069ec2616ce7f00a5722561cf38dd91b47112e”,  
“commits”: [  
{  
“id”: “66069ec2616ce7f00a5722561cf38dd91b47112e”,  
“message”: “Gitea Webhook test\n”,  
“url”: “[https://gitea.local/TEST/Core/commit/66069ec2616ce7f00a5722561cf38dd91b47112e](https://gitea.local/TEST/Core/commit/66069ec2616ce7f00a5722561cf38dd91b47112e)”,  
“author”: {  
“name”: “msklenicka”,  
“email”: “msklenicka@mymail.local”,  
“username”: “msklenicka”  
},  
“committer”: {  
“name”: “msklenicka”,  
“email”: “msklenicka@mymail.local”,  
“username”: “msklenicka”  
},  
“verification”: null,  
“timestamp”: “2021-01-05T10:45:28+01:00”,  
“added”: [],  
“removed”: [],  
“modified”: [  
“Java”  
]  
}  
]… }  
This is proper filepath: Java Source/jmesa.properties  
Gitea version: 1.12.1  
Is there any way how to fix this? We cannot change filepaths (We know that it is not good idea have whitecharacters in paths, but its our historical burden)  
Thank You very much for help

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)\
**Post date:** [January 6, 2021, 5:05pm UTC](https://forum.gitea.com/t/webhook-sends-wrong-incomplete-file-path/2823/2 "2021-01-06T17:05:35Z")

</div>

You mentioned you were on version `1.12.1`, are you able to upgrade to the latest stable version 1.13.1 and replicate?

---

<div class="post-metadata">

**Author:** ![msklenicka](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/msklenicka/32/1097_2.png) [@msklenicka](https://forum.gitea.com/u/msklenicka)\
**Post date:** [January 8, 2021, 1:05am UTC](https://forum.gitea.com/t/webhook-sends-wrong-incomplete-file-path/2823/3 "2021-01-08T01:05:54Z")

</div>

Hi, After update on version 1.13.1, I can confirm same error.

---

<div class="post-metadata">

**Author:** ![msklenicka](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/msklenicka/32/1097_2.png) [@msklenicka](https://forum.gitea.com/u/msklenicka)\
**Post date:** [January 21, 2021, 9:23am UTC](https://forum.gitea.com/t/webhook-sends-wrong-incomplete-file-path/2823/4 "2021-01-21T09:23:13Z")

</div>

Hi, After update on version 1.13.1, I can confirm same error.

---

<div class="post-metadata">

**Author:** ![msklenicka](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/msklenicka/32/1097_2.png) [@msklenicka](https://forum.gitea.com/u/msklenicka)\
**Post date:** [March 23, 2021, 3:44pm UTC](https://forum.gitea.com/t/webhook-sends-wrong-incomplete-file-path/2823/5 "2021-03-23T15:44:12Z")

</div>

Hello, is there any new information about this issue ?

---

<div class="post-metadata">

**Author:** ![msklenicka](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/msklenicka/32/1097_2.png) [@msklenicka](https://forum.gitea.com/u/msklenicka)\
**Post date:** [April 16, 2021, 1:00am UTC](https://forum.gitea.com/t/webhook-sends-wrong-incomplete-file-path/2823/6 "2021-04-16T01:00:00Z")

</div>

Hello,  
please tell me, do you have any new information about the error I reported above? I need to solve this problem somehow. If you say it’s my problem. It is also a solution. And I’ll know I have to fix it myself.

---

<div class="post-metadata">

**Author:** ![msklenicka](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/msklenicka/32/1097_2.png) [@msklenicka](https://forum.gitea.com/u/msklenicka)\
**Post date:** [May 13, 2021, 8:28pm UTC](https://forum.gitea.com/t/webhook-sends-wrong-incomplete-file-path/2823/7 "2021-05-13T20:28:41Z")

</div>

Quick fix for all , who has same trouble.  
gitea/modules/git/commit.go

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/8/83da0b24487ccb89b47eed2e8f4ad1ceae68eddd.png)
