jenkinsci / jenkinsci/support-core-plugin
[JENKINS-68272] support-core creates invalid / incorrect markdown files due to lack of escaping markdown in plain text
- Dominant language
- Java
- Stars
- 19
- Forks
- 77
- Avg merge
- 17h 53m
- Merged PRs (30d)
- 3
Description
support-core plugin can create incorrect / invalid markdown files as it takes data in plain text and adds it to markdown files.
However the data from jenkisn in plain text may contain markdown characters.
this is the case for the update center - if there is a proxy in use the non proxy hosts can be of the format *.domain.com but this results in that being added verbatim into the update-center.md file, which results in the single * which is not valid.
e.g. non proxy hosts of *.cluster.local|*.example.com will result in the following in the markdown file
```
- No Proxy Hosts:
* *.cluster.local
* *.example.com
```
the markdown in the hostname should be escaped so that it is actually
```
- No Proxy Hosts:
* \*.cluster.local
* \*.example.com
```
https://github.com/jenkinsci/support-core-plugin/blob/1b50a0dfbe22352b117de282bcbd707b8b9bad40/src/main/java/com/cloudbees/jenkins/support/impl/UpdateCenter.java#L77 for one concrete example.
---
Originally reported by
teilo, imported from: support-core creates invalid / incorrect markdown files due to lack of escaping markdown in plain text
allan_burdajewicz
Raw content of original issue
support-core plugin can create incorrect / invalid markdown files as it takes data in plain text and adds it to markdown files.
However the data from jenkisn in plain text may contain markdown characters.
this is the case for the update center - if there is a proxy in use the non proxy hosts can be of the format *.domain.com but this results in that being added verbatim into the update-center.md file, which results in the single * which is not valid.
e.g. non proxy hosts of *.cluster.local|*.example.com will result in the following in the markdown file
- No Proxy Hosts:
* *.cluster.local
* *.example.comthe markdown in the hostname should be escaped so that it is actually
- No Proxy Hosts:
* \*.cluster.local
* \*.example.comhttps://github.com/jenkinsci/support-core-plugin/blob/1b50a0dfbe22352b117de282bcbd707b8b9bad40/src/main/java/com/cloudbees/jenkins/support/impl/UpdateCenter.java#L77 for one concrete example.
Contributor guide
Research direction
Start with src/main/java/com/cloudbees/jenkins/support/impl/UpdateCenter.java around line 77 and trace how proxy host data is written to update-center.md. Check the reported wildcard examples and ensure plain-text hostnames remain literal Markdown text rather than being interpreted as formatting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100