Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Double quotes are not escaped in commit message #46

Open
ST-o-RM opened this issue Sep 13, 2017 · 2 comments
Open

Double quotes are not escaped in commit message #46

ST-o-RM opened this issue Sep 13, 2017 · 2 comments

Comments

@ST-o-RM
Copy link

ST-o-RM commented Sep 13, 2017

Context

Gitlab-Hook plugin version: 1.4.2
Gitlab version: 8.17.4
Jenkins version: 2.49

Problem description

We have some commit message with "double quotes". It results in ant build erroring out:

[code_analysis] $ ant -file ca_build.xml -DBRANCH_TO_BUILD=feature/revert -DCOMMITS.0.ID=e18c2a1305d54ba996a54b9e4c3e4e89bacb6d00 -Dtotal_commits_count=1 '-DCOMMITS.0.MESSAGE=Revert "feat: show notice when hour cost of wt unknown"

This reverts commit af2a1b4d50bca0473217b78b3816f2517bf9d771.'
Buildfile: /var/lib/jenkins/workspace/develop/build/code_analysis/ca_build.xml

BUILD FAILED
Target "show" does not exist in the project "CodeAnalysis". 

Can we somehow escape double quotes when sending a comit message from the gitlab to jenkins?

@javiplx
Copy link

javiplx commented Sep 20, 2017

Is that a parametrised job in some manner? Could you paste some details as how you are using this?
The part that parses commits messages is actually unmaintained, so I need some extra info to look after this issue.

@ST-o-RM
Copy link
Author

ST-o-RM commented Oct 5, 2017

Commit message is passed to parametrised job from gitlab payload as in manual
http://img.netpeak.ua/storm/150722386797_kiss_16kb.jpg
http://img.netpeak.ua/storm/150722127704_kiss_15kb.jpg

Then we send it to Telegram using groovy posbuild. But in build we also use some ant script. All input parameters are passed to ant and failed build if there is double quotes in message as in first comment example.

Some other similar issue in ghprb-plugin
janinko/ghprb#348
jenkinsci/ghprb-plugin#430

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants