[JIRA] (JENKINS-55599) Blue Ocean markup formatter

6 views
Skip to first unread message

tobias@tschech-online.de (JIRA)

unread,
Jan 15, 2019, 6:59:02 AM1/15/19
to jenkinsc...@googlegroups.com
Tobias Tschech created an issue
 
Jenkins / Bug JENKINS-55599
Blue Ocean markup formatter
Issue Type: Bug Bug
Assignee: Unassigned
Components: blueocean-plugin
Created: 2019-01-15 11:58
Priority: Major Major
Reporter: Tobias Tschech

Blue ocean does nut use any markup formatter for the build description. I use the owasp markup formatter to create an html description. In the "old" frontend it's getting displayed correctly but in BlueOcean it only shows the html code.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

gmogan@cloudbees.com (JIRA)

unread,
Mar 21, 2019, 6:01:03 PM3/21/19
to jenkinsc...@googlegroups.com
Gavin Mogan updated an issue
 
Jenkins / Improvement JENKINS-55599
Blue Ocean markup formatter
Change By: Gavin Mogan
Issue Type: Bug Improvement

gmogan@cloudbees.com (JIRA)

unread,
Apr 3, 2019, 9:19:03 PM4/3/19
to jenkinsc...@googlegroups.com
Gavin Mogan commented on Improvement JENKINS-55599
 
Re: Blue Ocean markup formatter

A PR (https://github.com/jenkinsci/blueocean-plugin/pull/1940) came in to allow html in some fields. It wasn't the safe way to solve this problem but a bunch of notes came up.

I've copied the comments, with a few lines deleted that don't make sense out of context. I think this is a newbie friendly task, so I want to make sure all the ideas are documented

dvdliao commented 12 days ago
We are setting the build description in our own jenkins library that does the gcs uploading
currentBuild.description = "Artifacts are available <a href='link'>here</a>" Definitely cant be putting JSX in here

halkeye commented 12 days ago

If we could safely guarentee that the run.description is safe html, then

https://github.com/jenkinsci/blueocean-plugin/blob/master/blueocean-dashboard/src/main/js/components/karaoke/components/RunDescription.jsx#L16
could be updated to something like:

<Alerts title={this.props.t('rundetail.pipeline.description')} message={<span dangerouslySetInnerHTML={{ __html: this.props.run.description }}</span>} />
But I don't think any of us are comfortably blindly trusting any user input at all to be html. It would have to go through the sanitizer first.

halkeye commented 12 days ago
I don't know the API offhand, but a quick search of jenkins codebase I found:

https://github.com/jenkinsci/jenkins/blob/0795e89b308ec7fcbda097858d58763d8531be8c/core/src/main/java/hudson/model/ParameterDefinition.java#L141-L152

So i'd say the blueocean rest api needs to be updated to escape description everywhere, then ui needs to be updated to trust description everywhere.

I'd say its a pretty quick task, maybe a day or two, perfect for a new contributor. the CB blueocean people probably won't get to it anytime soon, we are working on stability and bug fixes mainly for the immediate future.

halkeye commented 9 days ago
I would also make a new @exported field that is like filteredDescription or
something, so we don't ever accidently forget a description somewhere and
accidently cause xss

owen@nerdnetworks.org (JIRA)

unread,
Dec 11, 2019, 11:45:03 PM12/11/19
to jenkinsc...@googlegroups.com

Many people may just want this support so that they can create clickable URLs. If that is all that is desired, printing the URL in an `echo` step will render it clickable in the Blue Ocean build UI. See https://github.com/jenkinsci/blueocean-plugin/pull/1400 

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mauriceleon.mertens@netcologne.de (JIRA)

unread,
Feb 17, 2020, 11:51:04 AM2/17/20
to jenkinsc...@googlegroups.com

Not just links. We want to use the description with formatting the text. So it would be nice, if this could be possible.

richard.eckart@googlemail.com (JIRA)

unread,
Apr 30, 2020, 3:53:03 AM4/30/20
to jenkinsc...@googlegroups.com

When introducing new parameters, it would IMHO help users (people running the jobs) a lot if one could display a short parameter title (not the name) and also a longer description. With HTML/formatting support, it would be possible to e.g. make the short title <bold> and the description <small> and maybe give it a light color. In the normal Jenkins interface for parametrized jobs, this works - but unfortunately not in the Blue Ocean plugin.

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages